summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_flow.c
diff options
context:
space:
mode:
authorYongseok Koh <yskoh@mellanox.com>2018-09-24 19:55:17 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-11 18:53:49 +0200
commit57123c00c1b8b6c8de7c88b1d16a7261d7ea9d3b (patch)
tree90a63a269081c4e8b980c05a90b7d85956954fc0 /drivers/net/mlx5/mlx5_flow.c
parent40c9ccf9e9f2e8f4b7a391ece3daad0a5ff418c3 (diff)
downloaddpdk-next-eventdev-57123c00c1b8b6c8de7c88b1d16a7261d7ea9d3b.zip
dpdk-next-eventdev-57123c00c1b8b6c8de7c88b1d16a7261d7ea9d3b.tar.gz
dpdk-next-eventdev-57123c00c1b8b6c8de7c88b1d16a7261d7ea9d3b.tar.xz
net/mlx5: add Linux TC flower driver for E-Switch flow
Flows having 'transfer' attribute have to be inserted to E-Switch on the NIC and the control path uses Linux TC flower interface via Netlink socket. This patch adds the flow driver on top of the new flow engine. Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_flow.c')
-rw-r--r--drivers/net/mlx5/mlx5_flow.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index a8fca11..078b076 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -42,6 +42,7 @@ extern const struct eth_dev_ops mlx5_dev_ops_isolate;
#ifdef HAVE_IBV_FLOW_DV_SUPPORT
extern const struct mlx5_flow_driver_ops mlx5_flow_dv_drv_ops;
#endif
+extern const struct mlx5_flow_driver_ops mlx5_flow_tcf_drv_ops;
extern const struct mlx5_flow_driver_ops mlx5_flow_verbs_drv_ops;
const struct mlx5_flow_driver_ops mlx5_flow_null_drv_ops;
@@ -51,6 +52,7 @@ const struct mlx5_flow_driver_ops *flow_drv_ops[] = {
#ifdef HAVE_IBV_FLOW_DV_SUPPORT
[MLX5_FLOW_TYPE_DV] = &mlx5_flow_dv_drv_ops,
#endif
+ [MLX5_FLOW_TYPE_TCF] = &mlx5_flow_tcf_drv_ops,
[MLX5_FLOW_TYPE_VERBS] = &mlx5_flow_verbs_drv_ops,
[MLX5_FLOW_TYPE_MAX] = &mlx5_flow_null_drv_ops
};
@@ -1628,7 +1630,9 @@ flow_get_drv_type(struct rte_eth_dev *dev __rte_unused,
struct priv *priv __rte_unused = 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;