summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_flow_dv.c
diff options
context:
space:
mode:
authorMoti Haimovsky <motih@mellanox.com>2018-10-18 21:29:22 +0300
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-26 22:14:05 +0200
commit684dafe795d024ab7c77553b2f75427d2b134c56 (patch)
tree797cbbb19a5f790161a1e123592af6884b583b5a /drivers/net/mlx5/mlx5_flow_dv.c
parent743fdbeb456a12919f39718429bff8fb75e86c52 (diff)
downloaddpdk-next-eventdev-684dafe795d024ab7c77553b2f75427d2b134c56.zip
dpdk-next-eventdev-684dafe795d024ab7c77553b2f75427d2b134c56.tar.gz
dpdk-next-eventdev-684dafe795d024ab7c77553b2f75427d2b134c56.tar.xz
net/mlx5: add flow query abstraction interface
Flow engine now supports multiple driver paths with each having its own flow query implantation routine. This patch adds an abstraction to the flow query routine in accordance to commit 0c76d1c9a18d ("net/mlx5: add abstraction for multiple flow drivers") done by Yongseok Koh. Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_flow_dv.c')
-rw-r--r--drivers/net/mlx5/mlx5_flow_dv.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index becbc57..58e3c33 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1363,6 +1363,24 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
}
}
+/**
+ * Query a flow.
+ *
+ * @see rte_flow_query()
+ * @see rte_flow_ops
+ */
+static int
+flow_dv_query(struct rte_eth_dev *dev __rte_unused,
+ struct rte_flow *flow __rte_unused,
+ const struct rte_flow_action *actions __rte_unused,
+ void *data __rte_unused,
+ struct rte_flow_error *error __rte_unused)
+{
+ rte_errno = ENOTSUP;
+ return -rte_errno;
+}
+
+
const struct mlx5_flow_driver_ops mlx5_flow_dv_drv_ops = {
.validate = flow_dv_validate,
.prepare = flow_dv_prepare,
@@ -1370,6 +1388,7 @@ const struct mlx5_flow_driver_ops mlx5_flow_dv_drv_ops = {
.apply = flow_dv_apply,
.remove = flow_dv_remove,
.destroy = flow_dv_destroy,
+ .query = flow_dv_query,
};
#endif /* HAVE_IBV_FLOW_DV_SUPPORT */