summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_flow_dv.c
diff options
context:
space:
mode:
authorYongseok Koh <yskoh@mellanox.com>2018-09-24 19:55:14 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-11 18:53:49 +0200
commit0c76d1c9a18d855c7d7a38db66ed7b21923c814f (patch)
treeaa90e0e96147be991e7527beb05f1c34c8febef0 /drivers/net/mlx5/mlx5_flow_dv.c
parent51e72d386c99035d67705b60eeab409313071d32 (diff)
downloaddpdk-next-eventdev-0c76d1c9a18d855c7d7a38db66ed7b21923c814f.zip
dpdk-next-eventdev-0c76d1c9a18d855c7d7a38db66ed7b21923c814f.tar.gz
dpdk-next-eventdev-0c76d1c9a18d855c7d7a38db66ed7b21923c814f.tar.xz
net/mlx5: add abstraction for multiple flow drivers
Flow engine has to support multiple driver paths. Verbs/DV for NIC flow steering and Linux TC flower for E-Switch flow steering. In the future, another flow driver could be added (devX). Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_flow_dv.c')
-rw-r--r--drivers/net/mlx5/mlx5_flow_dv.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 447f376..3bb462c 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1358,23 +1358,13 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
}
}
-/**
- * Fills the flow_ops with the function pointers.
- *
- * @param[out] flow_ops
- * Pointer to driver_ops structure.
- */
-void
-mlx5_flow_dv_get_driver_ops(struct mlx5_flow_driver_ops *flow_ops)
-{
- *flow_ops = (struct mlx5_flow_driver_ops) {
- .validate = flow_dv_validate,
- .prepare = flow_dv_prepare,
- .translate = flow_dv_translate,
- .apply = flow_dv_apply,
- .remove = flow_dv_remove,
- .destroy = flow_dv_destroy,
- };
-}
+const struct mlx5_flow_driver_ops mlx5_flow_dv_drv_ops = {
+ .validate = flow_dv_validate,
+ .prepare = flow_dv_prepare,
+ .translate = flow_dv_translate,
+ .apply = flow_dv_apply,
+ .remove = flow_dv_remove,
+ .destroy = flow_dv_destroy,
+};
#endif /* HAVE_IBV_FLOW_DV_SUPPORT */