From: Bhagyada Modali <bhagyada.modali@amd.com>
To: <chandu@amd.com>, <ferruh.yigit@amd.com>
Cc: <dev@dpdk.org>, <stable@dpdk.org>,
Bhagyada Modali <bhagyada.modali@amd.com>
Subject: [PATCH v2 2/3] net/axgbe: clear buffers in failure scenario in scattered rx
Date: Wed, 7 Sep 2022 23:31:08 -0400 [thread overview]
Message-ID: <20220908033109.126547-2-bhagyada.modali@amd.com> (raw)
In-Reply-To: <20220908033109.126547-1-bhagyada.modali@amd.com>
Clearing mbuf, first_seg when chaining mbufs fail.
Increment the error count for the same.
Fixes: 965b3127d425 ("net/axgbe: support scattered Rx")
Cc: stable@dpdk.org
Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
---
drivers/net/axgbe/axgbe_rxtx.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index e1488483bc..c1f51ed6d6 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -418,8 +418,10 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
if (first_seg != NULL) {
if (rte_pktmbuf_chain(first_seg, mbuf) != 0) {
- rte_mempool_put(rxq->mb_pool,
- first_seg);
+ rte_pktmbuf_free(first_seg);
+ first_seg = NULL;
+ rte_pktmbuf_free(mbuf);
+ rxq->errors++;
eop = 0;
break;
}
--
2.25.1
next prev parent reply other threads:[~2022-09-08 3:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 17:33 [PATCH 1/3] net/axgbe: reset the end of packet " Bhagyada Modali
2022-09-07 17:33 ` [PATCH 2/3] net/axgbe: clear buffers in failure scenario " Bhagyada Modali
2022-09-07 17:33 ` [PATCH 3/3] net/axgbe: save segment data in scattered Rx Bhagyada Modali
2022-09-08 3:31 ` [PATCH v2 1/3] net/axgbe: reset the end of packet in scattered rx Bhagyada Modali
2022-09-08 3:31 ` Bhagyada Modali [this message]
2022-09-08 3:31 ` [PATCH v2 3/3] net/axgbe: save segment data in scattered Rx Bhagyada Modali
2022-09-08 13:56 ` [PATCH v2 1/3] net/axgbe: reset the end of packet in scattered rx Namburu, Chandu-babu
2022-09-21 14:39 ` 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=20220908033109.126547-2-bhagyada.modali@amd.com \
--to=bhagyada.modali@amd.com \
--cc=chandu@amd.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=stable@dpdk.org \
/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).