diff mbox series

[6/6] net/hns3: fix vector Rx burst default value

Message ID 1619408092-54050-7-git-send-email-humin29@huawei.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series optimization and bugfix for hns3 PMD | expand

Checks

Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/github-robot success github build: passed
ci/intel-Testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/checkpatch success coding style OK

Commit Message

Min Hu (Connor) April 26, 2021, 3:34 a.m. UTC
From: Chengwen Feng <fengchengwen@huawei.com>

Currently, driver uses the macro HNS3_DEFAULT_RX_BURST whose value is
32 to limit the vector Rx burst size, as a result, the burst size user
configure can't exceed 32.

This patch fixes this problem by defining the macro
HNS3_DEFAULT_RX_BURST as 64.

Fixes: a3d4f4d291d7 ("net/hns3: support NEON Rx")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ferruh Yigit April 27, 2021, 1:46 p.m. UTC | #1
On 4/26/2021 4:34 AM, Min Hu (Connor) wrote:
> From: Chengwen Feng <fengchengwen@huawei.com>
> 
> Currently, driver uses the macro HNS3_DEFAULT_RX_BURST whose value is
> 32 to limit the vector Rx burst size, as a result, the burst size user
> configure can't exceed 32.
> 
> This patch fixes this problem by defining the macro
> HNS3_DEFAULT_RX_BURST as 64.
> 
> Fixes: a3d4f4d291d7 ("net/hns3: support NEON Rx")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> ---
>  drivers/net/hns3/hns3_rxtx.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
> index 1e2e994..ba24e00 100644
> --- a/drivers/net/hns3/hns3_rxtx.h
> +++ b/drivers/net/hns3/hns3_rxtx.h
> @@ -20,7 +20,7 @@
>  #define HNS3_DEFAULT_TX_RS_THRESH	32
>  #define HNS3_TX_FAST_FREE_AHEAD		64
>  
> -#define HNS3_DEFAULT_RX_BURST		32
> +#define HNS3_DEFAULT_RX_BURST		64

It seems in the vector Rx path, the number of receive packets are limited
silently to 'HNS3_DEFAULT_RX_BURST' independent from what user requested/configured.

There can be driver/HW limitations to 'HNS3_DEFAULT_RX_BURST' that is OK, but
instead of limiting user request, what do you think about Rx in the
'HNS3_DEFAULT_RX_BURST' blocks until user request justified?

I mean something like following implementation:
https://git.dpdk.org/dpdk/commit/?id=d96394ea263c
fengchengwen April 27, 2021, 2:34 p.m. UTC | #2
From:Ferruh Yigit <ferruh.yigit@intel.com>
To:humin (Q) <humin29@huawei.com>;dev <dev@dpdk.org>
Date:2021-04-27 21:47:08
Subject:Re: [dpdk-dev] [PATCH 6/6] net/hns3: fix vector Rx burst default value

On 4/26/2021 4:34 AM, Min Hu (Connor) wrote:
> From: Chengwen Feng < fengchengwen@huawei.com<mailto:fengchengwen@huawei.com>>
>
> Currently, driver uses the macro HNS3_DEFAULT_RX_BURST whose value is
> 32 to limit the vector Rx burst size, as a result, the burst size user
> configure can't exceed 32.
>
> This patch fixes this problem by defining the macro
> HNS3_DEFAULT_RX_BURST as 64.
>
> Fixes: a3d4f4d291d7 ("net/hns3: support NEON Rx")
> Cc: stable@dpdk.org<mailto:stable@dpdk.org>
>
> Signed-off-by: Chengwen Feng < fengchengwen@huawei.com<mailto:fengchengwen@huawei.com>>
> Signed-off-by: Min Hu (Connor) < humin29@huawei.com<mailto:humin29@huawei.com>>
> ---
> drivers/net/hns3/hns3_rxtx.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
> index 1e2e994..ba24e00 100644
> --- a/drivers/net/hns3/hns3_rxtx.h
> +++ b/drivers/net/hns3/hns3_rxtx.h
> @@ -20,7 +20,7 @@
> #define HNS3_DEFAULT_TX_RS_THRESH    32
> #define HNS3_TX_FAST_FREE_AHEAD              64
>
> -#define HNS3_DEFAULT_RX_BURST                32
> +#define HNS3_DEFAULT_RX_BURST                64

It seems in the vector Rx path, the number of receive packets are limited
silently to 'HNS3_DEFAULT_RX_BURST' independent from what user requested/configured.

There can be driver/HW limitations to 'HNS3_DEFAULT_RX_BURST' that is OK, but
instead of limiting user request, what do you think about Rx in the
'HNS3_DEFAULT_RX_BURST' blocks until user request justified?

I mean something like following implementation:
https://git.dpdk.org/dpdk/commit/?id=d96394ea263c


sound good, will fix in v2, thanks
diff mbox series

Patch

diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index 1e2e994..ba24e00 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -20,7 +20,7 @@ 
 #define HNS3_DEFAULT_TX_RS_THRESH	32
 #define HNS3_TX_FAST_FREE_AHEAD		64
 
-#define HNS3_DEFAULT_RX_BURST		32
+#define HNS3_DEFAULT_RX_BURST		64
 #if (HNS3_DEFAULT_RX_BURST > 64)
 #error "PMD HNS3: HNS3_DEFAULT_RX_BURST must <= 64\n"
 #endif