From: James Hershaw <james.hers...@corigine.com>

Remove usage of the rte_panic() function from the nfp PMD.

Update the nfp_net_nfd3_xmit_pkts() function to match the functionality
of the nfp_net_nfdk_xmit_pkts(), rather than use rte_panic()

Update the logging within both the nfp_net_nfd3_xmit_pkts() and
nfp_net_nfdk_xmit_pkts() functions to only make use of a single
log when encountering a transmission with multiple segments when
NFP_NET_CFG_CTRL_GATHER is not set, and to change the log-level to
ERR.

Signed-off-by: James Hershaw <james.hers...@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderl...@corigine.com>
Reviewed-by: Chaoyong He <chaoyong...@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower.c | 3 +--
 drivers/net/nfp/nfp_rxtx.c          | 7 +++----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/nfp/flower/nfp_flower.c 
b/drivers/net/nfp/flower/nfp_flower.c
index 7b46dc0f6a..e0e94e0a36 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -532,8 +532,7 @@ nfp_flower_pf_xmit_pkts(void *tx_queue,
 
                if (unlikely(pkt->nb_segs > 1 &&
                                !(hw->cap & NFP_NET_CFG_CTRL_GATHER))) {
-                       PMD_INIT_LOG(INFO, "NFP_NET_CFG_CTRL_GATHER not set");
-                       PMD_INIT_LOG(INFO, "Multisegment packet unsupported");
+                       PMD_INIT_LOG(ERR, "Multisegment packet not supported");
                        goto xmit_end;
                }
 
diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c
index 4a7574fd65..5f23128ac9 100644
--- a/drivers/net/nfp/nfp_rxtx.c
+++ b/drivers/net/nfp/nfp_rxtx.c
@@ -986,8 +986,8 @@ nfp_net_nfd3_xmit_pkts(void *tx_queue, struct rte_mbuf 
**tx_pkts, uint16_t nb_pk
 
                if (unlikely(pkt->nb_segs > 1 &&
                             !(hw->cap & NFP_NET_CFG_CTRL_GATHER))) {
-                       PMD_INIT_LOG(INFO, "NFP_NET_CFG_CTRL_GATHER not set");
-                       rte_panic("Multisegment packet unsupported\n");
+                       PMD_INIT_LOG(ERR, "Multisegment packet not supported");
+                       goto xmit_end;
                }
 
                /* Checking if we have enough descriptors */
@@ -1466,8 +1466,7 @@ nfp_net_nfdk_xmit_pkts(void *tx_queue, struct rte_mbuf 
**tx_pkts, uint16_t nb_pk
 
                if (unlikely(pkt->nb_segs > 1 &&
                                !(hw->cap & NFP_NET_CFG_CTRL_GATHER))) {
-                       PMD_INIT_LOG(INFO, "NFP_NET_CFG_CTRL_GATHER not set");
-                       PMD_INIT_LOG(INFO, "Multisegment packet unsupported");
+                       PMD_INIT_LOG(ERR, "Multisegment packet not supported");
                        goto xmit_end;
                }
 
-- 
2.29.3

Reply via email to