]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/mlx5e: IPoIB, Add inner TTC table to IPoIB flow steering
authorFeras Daoud <ferasda@mellanox.com>
Thu, 7 Sep 2017 13:05:10 +0000 (16:05 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Sun, 5 Nov 2017 04:27:11 +0000 (21:27 -0700)
For supported platforms, add inner TTC flow table to enhanced IPoIB
flow steering.

Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c

index 8c872e2e1aa087b71c8167eac00f78b0084c0d18..95facdf62c77b179deddaac750c6b6e5866d59d9 100644 (file)
@@ -1045,6 +1045,9 @@ void mlx5e_destroy_rqt(struct mlx5e_priv *priv, struct mlx5e_rqt *rqt);
 int mlx5e_create_ttc_table(struct mlx5e_priv *priv);
 void mlx5e_destroy_ttc_table(struct mlx5e_priv *priv);
 
+int mlx5e_create_inner_ttc_table(struct mlx5e_priv *priv);
+void mlx5e_destroy_inner_ttc_table(struct mlx5e_priv *priv);
+
 int mlx5e_create_tis(struct mlx5_core_dev *mdev, int tc,
                     u32 underlay_qpn, u32 *tisn);
 void mlx5e_destroy_tis(struct mlx5_core_dev *mdev, u32 tisn);
index 8016c8aa946df4905321d7a103ebaf8948d954c1..f0d11ad05ed2c2ab55d3c1ba68137de3d235d4f3 100644 (file)
@@ -1005,7 +1005,7 @@ err:
        return err;
 }
 
-static int mlx5e_create_inner_ttc_table(struct mlx5e_priv *priv)
+int mlx5e_create_inner_ttc_table(struct mlx5e_priv *priv)
 {
        struct mlx5e_ttc_table *ttc = &priv->fs.inner_ttc;
        struct mlx5_flow_table_attr ft_attr = {};
@@ -1041,7 +1041,7 @@ err:
        return err;
 }
 
-static void mlx5e_destroy_inner_ttc_table(struct mlx5e_priv *priv)
+void mlx5e_destroy_inner_ttc_table(struct mlx5e_priv *priv)
 {
        struct mlx5e_ttc_table *ttc = &priv->fs.inner_ttc;
 
index abf270d7f55605caeda209decf98526d04933dcc..d2a66dc4adc6d2933cfbc60c28cd49c67716a010 100644 (file)
@@ -255,15 +255,24 @@ static int mlx5i_create_flow_steering(struct mlx5e_priv *priv)
                priv->netdev->hw_features &= ~NETIF_F_NTUPLE;
        }
 
+       err = mlx5e_create_inner_ttc_table(priv);
+       if (err) {
+               netdev_err(priv->netdev, "Failed to create inner ttc table, err=%d\n",
+                          err);
+               goto err_destroy_arfs_tables;
+       }
+
        err = mlx5e_create_ttc_table(priv);
        if (err) {
                netdev_err(priv->netdev, "Failed to create ttc table, err=%d\n",
                           err);
-               goto err_destroy_arfs_tables;
+               goto err_destroy_inner_ttc_table;
        }
 
        return 0;
 
+err_destroy_inner_ttc_table:
+       mlx5e_destroy_inner_ttc_table(priv);
 err_destroy_arfs_tables:
        mlx5e_arfs_destroy_tables(priv);
 
@@ -273,6 +282,7 @@ err_destroy_arfs_tables:
 static void mlx5i_destroy_flow_steering(struct mlx5e_priv *priv)
 {
        mlx5e_destroy_ttc_table(priv);
+       mlx5e_destroy_inner_ttc_table(priv);
        mlx5e_arfs_destroy_tables(priv);
 }