From: Mingjin Ye <mingjinx.ye@intel.com>
To: dev@dpdk.org
Cc: qiming.yang@intel.com, stable@dpdk.org, yidingx.zhou@intel.com,
Mingjin Ye <mingjinx.ye@intel.com>,
Qi Zhang <qi.z.zhang@intel.com>,
Ferruh Yigit <ferruh.yigit@intel.com>,
Jingjing Wu <jingjing.wu@intel.com>,
Wenzhuo Lu <wenzhuo.lu@intel.com>,
Xiaoyun Li <xiaoyun.li@intel.com>
Subject: [PATCH v3 1/2] net/ice: fix scalar Rx path segment
Date: Fri, 11 Nov 2022 12:04:00 +0000 [thread overview]
Message-ID: <20221111120401.802805-1-mingjinx.ye@intel.com> (raw)
In-Reply-To: <20221109125609.724612-1-mingjinx.ye@intel.com>
CRC is stripped by the hardware in the scattered Rx path. The last buffer
is invalid if it's packet length is zero.
This patch adds a judgment for the last buffer length to fix this issue,
it would free the mbuf associated to the last one if the last buffer is
empty.
Fixes: 6eac0b7fde95 ("net/ice: support advance Rx/Tx")
Cc: stable@dpdk.org
Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
---
drivers/net/ice/ice_rxtx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 0a2b0376ac..e6ddd2513d 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2111,6 +2111,10 @@ ice_recv_scattered_pkts(void *rx_queue,
} else
rxm->data_len = (uint16_t)(rx_packet_len -
RTE_ETHER_CRC_LEN);
+ } else if (rx_packet_len == 0) {
+ rte_pktmbuf_free_seg(rxm);
+ first_seg->nb_segs--;
+ last_seg->next = NULL;
}
first_seg->port = rxq->port_id;
--
2.34.1
next prev parent reply other threads:[~2022-11-11 4:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 17:20 [PATCH] net/ice: fix scalar Rx and Tx " Mingjin Ye
2022-11-04 6:57 ` Xu, Ke1
2022-11-09 12:56 ` [PATCH v2] " Mingjin Ye
2022-11-10 2:01 ` Xu, Ke1
2022-11-10 10:37 ` Zhang, Qi Z
2022-11-11 3:12 ` Ye, MingjinX
2022-11-11 12:04 ` Mingjin Ye [this message]
2022-11-11 4:59 ` [PATCH v3 1/2] net/ice: fix scalar Rx " Zhang, Qi Z
2022-11-11 12:04 ` [PATCH v3 2/2] net/ice: fix scalar Tx " Mingjin Ye
2022-11-11 5:09 ` Zhang, Qi Z
2022-11-11 8:30 ` Ye, MingjinX
2022-11-11 8:45 ` Zhang, Qi Z
2022-11-11 16:01 ` [PATCH v4 1/2] net/ice: fix scalar Rx " Mingjin Ye
2022-11-11 16:01 ` [PATCH v4 2/2] net/ice: fix scalar Tx " Mingjin Ye
2022-11-11 16:12 ` [PATCH v4 1/2] net/ice: fix scalar Rx " Mingjin Ye
2022-11-11 9:03 ` Zhang, Qi Z
2022-11-11 9:13 ` Xu, Ke1
2022-11-11 16:12 ` [PATCH v4 2/2] net/ice: fix scalar Tx " Mingjin Ye
2022-11-11 9:01 ` Zhang, Qi Z
2022-11-11 9:14 ` Xu, Ke1
2023-09-19 8:15 ` David Marchand
2023-09-27 8:44 ` David Marchand
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=20221111120401.802805-1-mingjinx.ye@intel.com \
--to=mingjinx.ye@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=stable@dpdk.org \
--cc=wenzhuo.lu@intel.com \
--cc=xiaoyun.li@intel.com \
--cc=yidingx.zhou@intel.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).