From: Vamsi Krishna <vattunuru@marvell.com>
To: <jerinj@marvell.com>
Cc: <dev@dpdk.org>, Vamsi Attunuru <vattunuru@marvell.com>,
<stable@dpdk.org>
Subject: [PATCH v0 1/1] net/octeon_ep: fix mbuf data offset update
Date: Mon, 14 Jul 2025 11:10:41 +0530 [thread overview]
Message-ID: <20250714054041.2257589-1-vattunuru@marvell.com> (raw)
From: Vamsi Attunuru <vattunuru@marvell.com>
Buffer refill routine uses mempool API instead of pktmbuf
alloc to avoid mbuf reset. Patch uses rearm to update the
mbuf fields. Also it removes redundant refill count update.
Fixes: 35dee56cee00 ("net/octeon_ep: add new fastpath routines")
Cc: stable@dpdk.org
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
---
drivers/net/octeon_ep/cnxk_ep_rx.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/octeon_ep/cnxk_ep_rx.c b/drivers/net/octeon_ep/cnxk_ep_rx.c
index 7465e0a017..a10e9c536e 100644
--- a/drivers/net/octeon_ep/cnxk_ep_rx.c
+++ b/drivers/net/octeon_ep/cnxk_ep_rx.c
@@ -10,7 +10,6 @@ cnxk_ep_process_pkts_scalar_mseg(struct rte_mbuf **rx_pkts, struct otx_ep_droq *
{
struct rte_mbuf **recv_buf_list = droq->recv_buf_list;
uint32_t total_pkt_len, bytes_rsvd = 0;
- uint16_t port_id = droq->otx_ep_dev->port_id;
uint16_t nb_desc = droq->nb_desc;
uint16_t pkts;
@@ -22,7 +21,7 @@ cnxk_ep_process_pkts_scalar_mseg(struct rte_mbuf **rx_pkts, struct otx_ep_droq *
uint32_t pkt_len = 0;
mbuf = recv_buf_list[droq->read_idx];
- info = rte_pktmbuf_mtod(mbuf, struct otx_ep_droq_info *);
+ info = cnxk_pktmbuf_mtod(mbuf, struct otx_ep_droq_info *);
total_pkt_len = rte_bswap16(info->length >> 48) + OTX_EP_INFO_SIZE;
@@ -37,7 +36,7 @@ cnxk_ep_process_pkts_scalar_mseg(struct rte_mbuf **rx_pkts, struct otx_ep_droq *
if (!pkt_len) {
/* Note the first seg */
first_buf = mbuf;
- mbuf->data_off += OTX_EP_INFO_SIZE;
+ *(uint64_t *)&mbuf->rearm_data = droq->rearm_data;
mbuf->pkt_len = cpy_len - OTX_EP_INFO_SIZE;
mbuf->data_len = cpy_len - OTX_EP_INFO_SIZE;
} else {
@@ -57,12 +56,10 @@ cnxk_ep_process_pkts_scalar_mseg(struct rte_mbuf **rx_pkts, struct otx_ep_droq *
droq->refill_count++;
}
mbuf = first_buf;
- mbuf->port = port_id;
rx_pkts[pkts] = mbuf;
bytes_rsvd += pkt_len;
}
- droq->refill_count += new_pkts;
droq->pkts_pending -= pkts;
/* Stats */
droq->stats.pkts_received += pkts;
--
2.34.1
reply other threads:[~2025-07-14 5:40 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=20250714054041.2257589-1-vattunuru@marvell.com \
--to=vattunuru@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.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).