From: <pbhagavatula@marvell.com>
To: <jerinj@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>,
"Kiran Kumar K" <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>
Cc: <dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>
Subject: [PATCH] event/cnxk: fix incorrect mbuf offset calculation
Date: Tue, 25 Oct 2022 21:16:53 +0530 [thread overview]
Message-ID: <20221025154653.10482-1-pbhagavatula@marvell.com> (raw)
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Fix incorrect mbuf offset calculation when HEADROOM exceeds 128B
while processing event vectors.
Fixes: 7fbbc981d54f("event/cnxk: support vectorized Rx event fast path")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Change-Id: I1c33c8a5cce29c3ea7eb0411f4e1bedf42053167
---
drivers/net/cnxk/cn10k_rx.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/cnxk/cn10k_rx.h b/drivers/net/cnxk/cn10k_rx.h
index 4e22ceda02..721127dddd 100644
--- a/drivers/net/cnxk/cn10k_rx.h
+++ b/drivers/net/cnxk/cn10k_rx.h
@@ -1203,9 +1203,11 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
mbuf23 = vqsubq_u64(mbuf23, data_off);
} else {
mbuf01 =
- vsubq_u64(vld1q_u64((uint64_t *)cq0), data_off);
- mbuf23 = vsubq_u64(vld1q_u64((uint64_t *)(cq0 + 16)),
- data_off);
+ vsubq_u64(vld1q_u64((uint64_t *)cq0),
+ vdupq_n_u64(sizeof(struct rte_mbuf)));
+ mbuf23 =
+ vsubq_u64(vld1q_u64((uint64_t *)(cq0 + 16)),
+ vdupq_n_u64(sizeof(struct rte_mbuf)));
}
/* Move mbufs to scalar registers for future use */
--
2.38.0
next reply other threads:[~2022-10-25 15:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-25 15:46 pbhagavatula [this message]
2022-10-25 16:11 ` [PATCH v2] " pbhagavatula
2022-11-07 12:00 ` Jerin Jacob
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=20221025154653.10482-1-pbhagavatula@marvell.com \
--to=pbhagavatula@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@marvell.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).