net/mlx5: fix CRC strip capability query

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: 43e9d9794c ("net/mlx5: support upstream rdma-core")
Cc: stable@dpdk.org

Reported-by: Alex Rosenbaum <alexr@mellanox.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
This commit is contained in:
Shahaf Shuler 2018-02-01 20:53:53 +02:00 committed by Ferruh Yigit
parent c3299d7686
commit cd230a3ed9

View File

@ -867,9 +867,8 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
DEBUG("VLAN stripping is %ssupported",
(config.hw_vlan_strip ? "" : "not "));
config.hw_fcs_strip =
!!(device_attr_ex.orig_attr.device_cap_flags &
IBV_WQ_FLAGS_SCATTER_FCS);
config.hw_fcs_strip = !!(device_attr_ex.raw_packet_caps &
IBV_RAW_PACKET_CAP_SCATTER_FCS);
DEBUG("FCS stripping configuration is %ssupported",
(config.hw_fcs_strip ? "" : "not "));