summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2016-11-15 08:58:12 +0000
committerhselasky <hselasky@FreeBSD.org>2016-11-15 08:58:12 +0000
commit5b6883f26c63222213fe3cbeff6d357121e8a6d6 (patch)
treec90541ec099ab3b0109b711f0f2e98bb13caf174
parent94703291661095298b16c6defe0c5cd364b64f65 (diff)
downloadFreeBSD-src-5b6883f26c63222213fe3cbeff6d357121e8a6d6.zip
FreeBSD-src-5b6883f26c63222213fe3cbeff6d357121e8a6d6.tar.gz
MFC r308413:
Query flow table capabilities according to the correct capability bit for infiniband. Sponsored by: Mellanox Technologies
-rw-r--r--sys/dev/mlx5/mlx5_core/mlx5_fw.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fw.c b/sys/dev/mlx5/mlx5_core/mlx5_fw.c
index c9060c8..625e3ed 100644
--- a/sys/dev/mlx5/mlx5_core/mlx5_fw.c
+++ b/sys/dev/mlx5/mlx5_core/mlx5_fw.c
@@ -167,7 +167,11 @@ int mlx5_query_hca_caps(struct mlx5_core_dev *dev)
return err;
}
- if (MLX5_CAP_GEN(dev, nic_flow_table)) {
+ if ((MLX5_CAP_GEN(dev, port_type) ==
+ MLX5_CMD_HCA_CAP_PORT_TYPE_ETHERNET &&
+ MLX5_CAP_GEN(dev, nic_flow_table)) ||
+ (MLX5_CAP_GEN(dev, port_type) == MLX5_CMD_HCA_CAP_PORT_TYPE_IB &&
+ MLX5_CAP_GEN(dev, ipoib_enhanced_offloads))) {
err = mlx5_core_get_caps(dev, MLX5_CAP_FLOW_TABLE,
HCA_CAP_OPMOD_GET_CUR);
if (err)
OpenPOWER on IntegriCloud