summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYongseok Koh <yskoh@mellanox.com>2018-10-23 16:52:09 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-26 22:14:06 +0200
commit58b1312e9d193f91c20eace59555b3ae3c88272d (patch)
tree8f6fbd2691a36961eace847a4fd2cacfde612e61 /drivers
parentdb48f9db5d9ffdfc851161e12f05ae099df44de0 (diff)
downloaddpdk-58b1312e9d193f91c20eace59555b3ae3c88272d.zip
dpdk-58b1312e9d193f91c20eace59555b3ae3c88272d.tar.gz
dpdk-58b1312e9d193f91c20eace59555b3ae3c88272d.tar.xz
net/mlx5: add warning message for Direct Verbs flow
In case that the library doesn't support DV flow, if enabled by 'dv_flow_en=1', print out a warning message and disable it. Fixes: 51e72d386c99 ("net/mlx5: add runtime parameter to enable Direct Verbs") Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Ori Kam <orika@mellanox.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/mlx5/mlx5.c6
-rw-r--r--drivers/net/mlx5/mlx5_flow.c20
2 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index d29c195..410c0c3 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1010,6 +1010,12 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
!defined(HAVE_IBV_DEVICE_COUNTERS_SET_V45)
DRV_LOG(DEBUG, "counters are not supported");
#endif
+#ifndef HAVE_IBV_FLOW_DV_SUPPORT
+ if (config.dv_flow_en) {
+ DRV_LOG(WARNING, "DV flow is not supported");
+ config.dv_flow_en = 0;
+ }
+#endif
config.ind_table_max_size =
attr.rss_caps.max_rwq_indirection_table_size;
/*
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 7cea631..106c55d 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1679,25 +1679,19 @@ const struct mlx5_flow_driver_ops mlx5_flow_null_drv_ops = {
* Pointer to the flow attributes.
*
* @return
- * flow driver type if supported, MLX5_FLOW_TYPE_MAX otherwise.
+ * flow driver type, MLX5_FLOW_TYPE_MAX otherwise.
*/
static enum mlx5_flow_drv_type
-flow_get_drv_type(struct rte_eth_dev *dev __rte_unused,
- const struct rte_flow_attr *attr)
+flow_get_drv_type(struct rte_eth_dev *dev, const struct rte_flow_attr *attr)
{
- struct priv *priv __rte_unused = dev->data->dev_private;
+ struct priv *priv = dev->data->dev_private;
enum mlx5_flow_drv_type type = MLX5_FLOW_TYPE_MAX;
- if (attr->transfer) {
+ if (attr->transfer)
type = MLX5_FLOW_TYPE_TCF;
- } else {
-#ifdef HAVE_IBV_FLOW_DV_SUPPORT
- type = priv->config.dv_flow_en ? MLX5_FLOW_TYPE_DV :
- MLX5_FLOW_TYPE_VERBS;
-#else
- type = MLX5_FLOW_TYPE_VERBS;
-#endif
- }
+ else
+ type = priv->config.dv_flow_en ? MLX5_FLOW_TYPE_DV :
+ MLX5_FLOW_TYPE_VERBS;
return type;
}