[dpdk-stable] [PATCH 14/67] net/mlx5: fix CRC strip capability query

Yongseok Koh yskoh at mellanox.com
Tue Jun 5 02:10:36 CEST 2018


From: Shahaf Shuler <shahafs at mellanox.com>

[ backported from upstream commit cd230a3ed985894efafe326cbbf5db7f9e45b25c ]

IBV_WQ_FLAGS_SCATTER_FCS is a WQ flag to be used to configure the CRC
strip on a queue upon creation.

Using IBV_RAW_PACKET_CAP_SCATTER_FCS instead to query to capability.
Even though this is RAW_QP capability, it is being used by rdma-core to
indicate for both RAW_QP and WQ.

Fixes: 43e9d9794cde ("net/mlx5: support upstream rdma-core")
Cc: stable at dpdk.org

Reported-by: Alex Rosenbaum <alexr at mellanox.com>
Signed-off-by: Shahaf Shuler <shahafs at mellanox.com>
Acked-by: Yongseok Koh <yskoh at mellanox.com>
---
 drivers/net/mlx5/mlx5.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 7dc3dc399..f83508cf9 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -939,9 +939,8 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 		DEBUG("VLAN stripping is %ssupported",
 		      (priv->hw_vlan_strip ? "" : "not "));
 
-		priv->hw_fcs_strip =
-				!!(device_attr_ex.orig_attr.device_cap_flags &
-				IBV_WQ_FLAGS_SCATTER_FCS);
+		priv->hw_fcs_strip = !!(device_attr_ex.raw_packet_caps &
+					IBV_RAW_PACKET_CAP_SCATTER_FCS);
 		DEBUG("FCS stripping configuration is %ssupported",
 		      (priv->hw_fcs_strip ? "" : "not "));
 
-- 
2.11.0



More information about the stable mailing list