[2/3] net/nfp: remove panic usage for multisegment Tx
Checks
Commit Message
From: James Hershaw <james.hershaw@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.hershaw@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
---
drivers/net/nfp/flower/nfp_flower.c | 3 +--
drivers/net/nfp/nfp_rxtx.c | 7 +++----
2 files changed, 4 insertions(+), 6 deletions(-)
@@ -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;
}
@@ -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;
}