net/mlx5e: Move sample attr allocation to tc_action sample parse op
There is no reason to wait with the kmalloc to after parsing all other actions. There could still be a failure later and before offloading the rule. So alloc the mem when parsing. The memory is being released on mlx5e_flow_put() which is called also on error flow. Signed-off-by:Roi Dayan <roid@nvidia.com> Reviewed-by:
Oz Shlomo <ozsh@nvidia.com> Signed-off-by:
Saeed Mahameed <saeedm@nvidia.com>
Showing
- drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.h 0 additions, 1 deletiondrivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.h
- drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/sample.c 6 additions, 1 deletiondrivers/net/ethernet/mellanox/mlx5/core/en/tc/act/sample.c
- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c 0 additions, 10 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en_tc.c
Please register or sign in to comment