From: xiejianhua@phytium.com.cn
To: Bruce Richardson <bruce.richardson@intel.com>,
Anatoly Burakov <anatoly.burakov@intel.com>,
dev@dpdk.org
Cc: Yuhailong <yuhailong1088@phytium.com.cn>,
Joyce Kong <joyce.kong@arm.com>,
Ruifeng Wang <ruifeng.wang@arm.com>,
Jianhua Xie <xiejianhua@phytium.com.cn>
Subject: [PATCH] net/ice: fix descriptor scan on Arm
Date: Tue, 2 Dec 2025 14:04:14 +0800 [thread overview]
Message-ID: <20251202060414.113275-1-xiejianhua@phytium.com.cn> (raw)
From: Yuhailong <yuhailong1088@phytium.com.cn>
This patch borrows i40 patch:
commit 65b2ec7b4f6b ("net/i40e: fix descriptor scan on Arm")
For Arm platforms, reading descs can get re-ordered, then the status
of DD bits will be discontinuous, so add the logic to only process
continuous descs by checking DD bits.
Cc: Joyce Kong <joyce.kong@arm.com>
Cc: Ruifeng Wang <ruifeng.wang@arm.com>
Signed-off-by: Yuhailong <yuhailong1088@phytium.com.cn>
Signed-off-by: Jianhua Xie <xiejianhua@phytium.com.cn>
---
drivers/net/intel/ice/ice_rxtx.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/net/intel/ice/ice_rxtx.c b/drivers/net/intel/ice/ice_rxtx.c
index 74db0fbec9..b9358e49ba 100644
--- a/drivers/net/intel/ice/ice_rxtx.c
+++ b/drivers/net/intel/ice/ice_rxtx.c
@@ -1888,7 +1888,7 @@ ice_rx_scan_hw_ring(struct ci_rx_queue *rxq)
struct rte_mbuf *mb;
uint16_t stat_err0;
uint16_t pkt_len, hdr_len;
- int32_t s[ICE_LOOK_AHEAD], nb_dd;
+ int32_t s[ICE_LOOK_AHEAD], nb_dd, var = 0;
int32_t i, j, nb_rx = 0;
uint64_t pkt_flags = 0;
uint32_t *ptype_tbl = rxq->ice_vsi->adapter->ptype_tbl;
@@ -1930,8 +1930,18 @@ ice_rx_scan_hw_ring(struct ci_rx_queue *rxq)
rte_smp_rmb();
/* Compute how many status bits were set */
- for (j = 0, nb_dd = 0; j < ICE_LOOK_AHEAD; j++)
- nb_dd += s[j] & (1 << ICE_RX_FLEX_DESC_STATUS0_DD_S);
+ for (j = 0, nb_dd = 0; j < ICE_LOOK_AHEAD; j++) {
+ var = s[j] & (1 << ICE_RX_FLEX_DESC_STATUS0_DD_S);
+#ifdef RTE_ARCH_ARM
+ /* For Arm platforms, only compute continuous status bits */
+ if (var)
+ nb_dd += 1;
+ else
+ break;
+#else
+ nb_dd += var;
+#endif
+ }
nb_rx += nb_dd;
--
2.30.2
reply other threads:[~2025-12-02 6:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20251202060414.113275-1-xiejianhua@phytium.com.cn \
--to=xiejianhua@phytium.com.cn \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=joyce.kong@arm.com \
--cc=ruifeng.wang@arm.com \
--cc=yuhailong1088@phytium.com.cn \
/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).