DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com,
	James Hershaw <james.hershaw@corigine.com>,
	Chaoyong He <chaoyong.he@corigine.com>
Subject: [PATCH 2/3] net/nfp: remove panic usage for multisegment Tx
Date: Fri,  3 Feb 2023 15:57:35 +0800	[thread overview]
Message-ID: <20230203075736.18616-3-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20230203075736.18616-1-chaoyong.he@corigine.com>

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(-)

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


  parent reply	other threads:[~2023-02-03  7:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03  7:57 [PATCH 0/3] remove usage of rte_panic() and ASSERT() from PMD Chaoyong He
2023-02-03  7:57 ` [PATCH 1/3] net/nfp: remove panic usage during reconfig Chaoyong He
2023-02-03  7:57 ` Chaoyong He [this message]
2023-02-03  7:57 ` [PATCH 3/3] net/nfp: remove ASSERT() macro Chaoyong He
2023-02-03 18:57 ` [PATCH 0/3] remove usage of rte_panic() and ASSERT() from PMD Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230203075736.18616-3-chaoyong.he@corigine.com \
    --to=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=james.hershaw@corigine.com \
    --cc=niklas.soderlund@corigine.com \
    --cc=oss-drivers@corigine.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).