diff mbox series

net/mlx5: do not select legacy MPW implicitly

Message ID 1591897320-15192-1-git-send-email-akozyrev@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers show
Series net/mlx5: do not select legacy MPW implicitly | expand

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/checkpatch success coding style OK

Commit Message

Alexander Kozyrev June 11, 2020, 5:42 p.m. UTC
The Legacy MPW (multi-packet write) should not be engaged implicitly.
We should exclude this function form a Tx burst routine selection process
unless it is requested specifically by setting the txq_mpw_en devarg.
Exclude this function from the selection process the same way it is done
for the Enhanced MPW in the mlx5_select_tx_function() routine.

Fixes: eb8121ab9dac ("net/mlx5: introduce Tx burst routine template")
Cc: stable@dpdk.org

Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Slava Ovsiienko June 12, 2020, 7:59 p.m. UTC | #1
> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@mellanox.com>
> Sent: Thursday, June 11, 2020 20:42
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Raslan Darawsheh <rasland@mellanox.com>; Slava
> Ovsiienko <viacheslavo@mellanox.com>
> Subject: [PATCH] net/mlx5: do not select legacy MPW implicitly
> 
> The Legacy MPW (multi-packet write) should not be engaged implicitly.
> We should exclude this function form a Tx burst routine selection process
> unless it is requested specifically by setting the txq_mpw_en devarg.
> Exclude this function from the selection process the same way it is done for
> the Enhanced MPW in the mlx5_select_tx_function() routine.
> 
> Fixes: eb8121ab9dac ("net/mlx5: introduce Tx burst routine template")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  drivers/net/mlx5/mlx5_rxtx.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
> index 6a17a9a..df58af5 100644
> --- a/drivers/net/mlx5/mlx5_rxtx.c
> +++ b/drivers/net/mlx5/mlx5_rxtx.c
> @@ -5542,6 +5542,9 @@ enum mlx5_txcmp_code {
>  			/* Does not meet requested offloads at all. */
>  			continue;
>  		}
> +		if ((olx ^ tmp) & MLX5_TXOFF_CONFIG_MPW)
> +			/* Do not enable legacy MPW if not configured. */
> +			continue;
>  		if ((olx ^ tmp) & MLX5_TXOFF_CONFIG_EMPW)
>  			/* Do not enable eMPW if not configured. */
>  			continue;
> --
> 1.8.3.1
Raslan Darawsheh June 15, 2020, 8:51 a.m. UTC | #2
Hi,

> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@mellanox.com>
> Sent: Thursday, June 11, 2020 8:42 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Raslan Darawsheh <rasland@mellanox.com>; Slava
> Ovsiienko <viacheslavo@mellanox.com>
> Subject: [PATCH] net/mlx5: do not select legacy MPW implicitly
> 
> The Legacy MPW (multi-packet write) should not be engaged implicitly.
> We should exclude this function form a Tx burst routine selection process
> unless it is requested specifically by setting the txq_mpw_en devarg.
> Exclude this function from the selection process the same way it is done
> for the Enhanced MPW in the mlx5_select_tx_function() routine.
> 
> Fixes: eb8121ab9dac ("net/mlx5: introduce Tx burst routine template")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_rxtx.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
> index 6a17a9a..df58af5 100644
> --- a/drivers/net/mlx5/mlx5_rxtx.c
> +++ b/drivers/net/mlx5/mlx5_rxtx.c
> @@ -5542,6 +5542,9 @@ enum mlx5_txcmp_code {
>  			/* Does not meet requested offloads at all. */
>  			continue;
>  		}
> +		if ((olx ^ tmp) & MLX5_TXOFF_CONFIG_MPW)
> +			/* Do not enable legacy MPW if not configured. */
> +			continue;
>  		if ((olx ^ tmp) & MLX5_TXOFF_CONFIG_EMPW)
>  			/* Do not enable eMPW if not configured. */
>  			continue;
> --
> 1.8.3.1


Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
diff mbox series

Patch

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 6a17a9a..df58af5 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -5542,6 +5542,9 @@  enum mlx5_txcmp_code {
 			/* Does not meet requested offloads at all. */
 			continue;
 		}
+		if ((olx ^ tmp) & MLX5_TXOFF_CONFIG_MPW)
+			/* Do not enable legacy MPW if not configured. */
+			continue;
 		if ((olx ^ tmp) & MLX5_TXOFF_CONFIG_EMPW)
 			/* Do not enable eMPW if not configured. */
 			continue;