net/mlx5e: Split nic tc flow allocation and creation
authorAriel Levkovich <lariel@mellanox.com>
Tue, 28 Apr 2020 18:59:25 +0000 (21:59 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 23 Sep 2020 22:44:35 +0000 (15:44 -0700)
commit08247066b82cec3da87b02e4f802e02d2952fa3d
treeb969d2b1c423b33bdceccd6bfa8cb1446372bef9
parent6a0646744c484227d74b0204783bca4dda61cf7b
net/mlx5e: Split nic tc flow allocation and creation

For future support of CT offload with nic tc flows, where
the flow rule is not created immediately but rather following
a future event, the patch is splitting the nic rule creation
and deletion into 2 parts:
1. Creating/Deleting and setting the rule attributes.
2. Creating/Deleting the flow table and flow rule itself.

This way the attributes can be prepared and stored in the
flow handle when the tc flow is created but the rule can
actually be created at any point in the future, using these
pre allocated attributes.

Signed-off-by: Ariel Levkovich <lariel@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.h