[dpdk-dev] [PATCH] net/mlx5: fix checksum offload cap

Shahaf Shuler shahafs at mellanox.com
Wed Oct 4 10:28:43 CEST 2017


The PMD was using the wrong flag to query device checksum capabilities

Fixes: bba710e6b99b ("net/mlx5: support upstream rdma-core")
Cc: shacharbe at mellanox.com

Signed-off-by: Shahaf Shuler <shahafs at mellanox.com>
---
 drivers/net/mlx5/mlx5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 229b824bc..a4b718417 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -649,8 +649,8 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 		}
 
 		priv->hw_csum =
-			((device_attr_ex.device_cap_flags_ex &
-			  IBV_DEVICE_UD_IP_CSUM));
+			!!(device_attr_ex.device_cap_flags_ex &
+			   IBV_DEVICE_RAW_IP_CSUM);
 		DEBUG("checksum offloading is %ssupported",
 		      (priv->hw_csum ? "" : "not "));
 
-- 
2.12.0



More information about the dev mailing list