* [dpdk-dev] [PATCH] net/octeontx2: fix CQE ring prefetch on wrap around case
@ 2019-09-13 15:31 jerinj
2019-10-04 12:24 ` Jerin Jacob
0 siblings, 1 reply; 2+ messages in thread
From: jerinj @ 2019-09-13 15:31 UTC (permalink / raw)
To: dev, Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K
Cc: Kommula Shiva Shankar, stable
From: Kommula Shiva Shankar <kshankar@marvell.com>
When computing the head of CQE ring of prefetch, use qmask to point to
the correct head index on wrap around case.
Fixes: cc4d7693f2d9 ("net/octeontx2: support Rx")
Cc: stable@dpdk.org
Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/net/octeontx2/otx2_rx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/octeontx2/otx2_rx.c b/drivers/net/octeontx2/otx2_rx.c
index 701efc858..48565db03 100644
--- a/drivers/net/octeontx2/otx2_rx.c
+++ b/drivers/net/octeontx2/otx2_rx.c
@@ -61,7 +61,8 @@ nix_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
while (packets < nb_pkts) {
/* Prefetch N desc ahead */
- rte_prefetch_non_temporal((void *)(desc + (CQE_SZ(head + 2))));
+ rte_prefetch_non_temporal((void *)(desc +
+ (CQE_SZ((head + 2) & qmask))));
cq = (struct nix_cqe_hdr_s *)(desc + CQE_SZ(head));
mbuf = nix_get_mbuf_from_cqe(cq, data_off);
--
2.23.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] net/octeontx2: fix CQE ring prefetch on wrap around case
2019-09-13 15:31 [dpdk-dev] [PATCH] net/octeontx2: fix CQE ring prefetch on wrap around case jerinj
@ 2019-10-04 12:24 ` Jerin Jacob
0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2019-10-04 12:24 UTC (permalink / raw)
To: Jerin Jacob
Cc: dpdk-dev, Nithin Dabilpuram, Kiran Kumar K,
Kommula Shiva Shankar, stable
On Fri, Sep 13, 2019 at 9:01 PM <jerinj@marvell.com> wrote:
>
> From: Kommula Shiva Shankar <kshankar@marvell.com>
>
> When computing the head of CQE ring of prefetch, use qmask to point to
> the correct head index on wrap around case.
>
> Fixes: cc4d7693f2d9 ("net/octeontx2: support Rx")
> Cc: stable@dpdk.org
>
> Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
> Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/master. Thanks
> ---
> drivers/net/octeontx2/otx2_rx.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/octeontx2/otx2_rx.c b/drivers/net/octeontx2/otx2_rx.c
> index 701efc858..48565db03 100644
> --- a/drivers/net/octeontx2/otx2_rx.c
> +++ b/drivers/net/octeontx2/otx2_rx.c
> @@ -61,7 +61,8 @@ nix_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
>
> while (packets < nb_pkts) {
> /* Prefetch N desc ahead */
> - rte_prefetch_non_temporal((void *)(desc + (CQE_SZ(head + 2))));
> + rte_prefetch_non_temporal((void *)(desc +
> + (CQE_SZ((head + 2) & qmask))));
> cq = (struct nix_cqe_hdr_s *)(desc + CQE_SZ(head));
>
> mbuf = nix_get_mbuf_from_cqe(cq, data_off);
> --
> 2.23.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-04 12:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-13 15:31 [dpdk-dev] [PATCH] net/octeontx2: fix CQE ring prefetch on wrap around case jerinj
2019-10-04 12:24 ` Jerin Jacob
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).