DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bnxt: fix vector mode for 32-bit x86
@ 2020-09-25 21:40 Lance Richardson
  2020-09-26  0:58 ` Ajit Khaparde
  0 siblings, 1 reply; 2+ messages in thread
From: Lance Richardson @ 2020-09-25 21:40 UTC (permalink / raw)
  To: Ajit Khaparde, Somnath Kotur; +Cc: dev

Descriptor valid mask should be 64-bit all ones, use
appropriate initializer type (unsigned long long) to
obtain correct value in 32-bit mode.

Fixes: deae85145c64 ("net/bnxt: handle multiple packets per loop in vector Rx")
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
index 3a5a50afd8..271e7908e3 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
@@ -164,7 +164,7 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	uint16_t cp_ring_size = cpr->cp_ring_struct->ring_size;
 	uint16_t rx_ring_size = rxr->rx_ring_struct->ring_size;
 	struct cmpl_base *cp_desc_ring = cpr->cp_desc_ring;
-	uint64_t valid, desc_valid_mask = ~0UL;
+	uint64_t valid, desc_valid_mask = ~0ULL;
 	const __m128i info3_v_mask = _mm_set_epi32(CMPL_BASE_V, CMPL_BASE_V,
 						   CMPL_BASE_V, CMPL_BASE_V);
 	uint32_t raw_cons = cpr->cp_raw_cons;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bnxt: fix vector mode for 32-bit x86
  2020-09-25 21:40 [dpdk-dev] [PATCH] net/bnxt: fix vector mode for 32-bit x86 Lance Richardson
@ 2020-09-26  0:58 ` Ajit Khaparde
  0 siblings, 0 replies; 2+ messages in thread
From: Ajit Khaparde @ 2020-09-26  0:58 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Somnath Kotur, dpdk-dev

On Fri, Sep 25, 2020 at 2:40 PM Lance Richardson
<lance.richardson@broadcom.com> wrote:
>
> Descriptor valid mask should be 64-bit all ones, use
> appropriate initializer type (unsigned long long) to
> obtain correct value in 32-bit mode.
>
> Fixes: deae85145c64 ("net/bnxt: handle multiple packets per loop in vector Rx")
> Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
> Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>

Patch applied to dpdk-next-net-brcm. Thanks

> ---
>  drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
> index 3a5a50afd8..271e7908e3 100644
> --- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
> +++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
> @@ -164,7 +164,7 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
>         uint16_t cp_ring_size = cpr->cp_ring_struct->ring_size;
>         uint16_t rx_ring_size = rxr->rx_ring_struct->ring_size;
>         struct cmpl_base *cp_desc_ring = cpr->cp_desc_ring;
> -       uint64_t valid, desc_valid_mask = ~0UL;
> +       uint64_t valid, desc_valid_mask = ~0ULL;
>         const __m128i info3_v_mask = _mm_set_epi32(CMPL_BASE_V, CMPL_BASE_V,
>                                                    CMPL_BASE_V, CMPL_BASE_V);
>         uint32_t raw_cons = cpr->cp_raw_cons;
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-26  0:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 21:40 [dpdk-dev] [PATCH] net/bnxt: fix vector mode for 32-bit x86 Lance Richardson
2020-09-26  0:58 ` Ajit Khaparde

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).