net/mlx5: fix LRO dependency to include DV flow

Message ID 8fd5a11fbe9cde80ac55b2cbec9d79e3fac56bf5.1571921204.git.dekelp@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: fix LRO dependency to include DV flow |

Checks

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

Commit Message

Dekel Peled Oct. 24, 2019, 12:46 p.m. UTC
  Rx queue for LRO is created using DevX. Flows created on this queue
must use the DV flow engine.

This patch adds check of dv_flow_en=1 when configuring LRO support
on device spawn.
Documentation is updated accordingly.

Fixes: 175f1c21d033 ("net/mlx5: check conditions to enable LRO")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
 doc/guides/nics/mlx5.rst | 2 +-
 drivers/net/mlx5/mlx5.c  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
  

Comments

Slava Ovsiienko Oct. 24, 2019, 1:42 p.m. UTC | #1
> -----Original Message-----
> From: Dekel Peled <dekelp@mellanox.com>
> Sent: Thursday, October 24, 2019 15:47
> To: Matan Azrad <matan@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>; Shahaf Shuler <shahafs@mellanox.com>
> Cc: Ori Kam <orika@mellanox.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH] net/mlx5: fix LRO dependency to include DV flow
> 
> Rx queue for LRO is created using DevX. Flows created on this queue must
> use the DV flow engine.
> 
> This patch adds check of dv_flow_en=1 when configuring LRO support on
> device spawn.
> Documentation is updated accordingly.
> 
> Fixes: 175f1c21d033 ("net/mlx5: check conditions to enable LRO")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  doc/guides/nics/mlx5.rst | 2 +-
>  drivers/net/mlx5/mlx5.c  | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index
> 600cea7..45fa968 100644
> --- a/doc/guides/nics/mlx5.rst
> +++ b/doc/guides/nics/mlx5.rst
> @@ -203,7 +203,7 @@ Limitations
> 
>  - LRO:
> 
> -  - Requires DevX to be enabled.
> +  - Requires DevX and DV flow to be enabled.
>    - KEEP_CRC offload cannot be supported with LRO.
>    - The first mbuf length, without head-room,  must be big enough to include
> the
>      TCP header (122B).
> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index
> b99c5a9..5977d06 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c
> @@ -2033,7 +2033,8 @@ struct mlx5_dev_spawn_data {
>  		if (priv->counter_fallback)
>  			DRV_LOG(INFO, "Use fall-back DV counter
> management\n");
>  		/* Check for LRO support. */
> -		if (config.dest_tir && config.hca_attr.lro_cap) {
> +		if (config.dest_tir && config.hca_attr.lro_cap &&
> +		    config.dv_flow_en) {
>  			/* TBD check tunnel lro caps. */
>  			config.lro.supported = config.hca_attr.lro_cap;
>  			DRV_LOG(DEBUG, "Device supports LRO");
> --
> 1.8.3.1
  
Raslan Darawsheh Oct. 29, 2019, 8:57 a.m. UTC | #2
Hi,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Dekel Peled
> Sent: Thursday, October 24, 2019 3:47 PM
> To: Matan Azrad <matan@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>; Shahaf Shuler <shahafs@mellanox.com>
> Cc: Ori Kam <orika@mellanox.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix LRO dependency to include DV
> flow
> 
> Rx queue for LRO is created using DevX. Flows created on this queue
> must use the DV flow engine.
> 
> This patch adds check of dv_flow_en=1 when configuring LRO support
> on device spawn.
> Documentation is updated accordingly.
> 
> Fixes: 175f1c21d033 ("net/mlx5: check conditions to enable LRO")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>


Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 600cea7..45fa968 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -203,7 +203,7 @@  Limitations
 
 - LRO:
 
-  - Requires DevX to be enabled.
+  - Requires DevX and DV flow to be enabled.
   - KEEP_CRC offload cannot be supported with LRO.
   - The first mbuf length, without head-room,  must be big enough to include the
     TCP header (122B).
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index b99c5a9..5977d06 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2033,7 +2033,8 @@  struct mlx5_dev_spawn_data {
 		if (priv->counter_fallback)
 			DRV_LOG(INFO, "Use fall-back DV counter management\n");
 		/* Check for LRO support. */
-		if (config.dest_tir && config.hca_attr.lro_cap) {
+		if (config.dest_tir && config.hca_attr.lro_cap &&
+		    config.dv_flow_en) {
 			/* TBD check tunnel lro caps. */
 			config.lro.supported = config.hca_attr.lro_cap;
 			DRV_LOG(DEBUG, "Device supports LRO");