net/mlx5: Refactor FTE and FG creation code
authorMaor Gottlieb <maorg@mellanox.com>
Wed, 26 Jul 2017 13:28:26 +0000 (16:28 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 26 Sep 2017 17:52:02 +0000 (20:52 +0300)
commit19f100fef4ad46f21cfdfb1eeeb63fc38c2e57f1
tree5a621d2ded64b61cdf94ebafd6a778ae11f3eeb7
parent46719d77d5f38b8ef04aa5a5cd91263b11d741d7
net/mlx5: Refactor FTE and FG creation code

Split the creation code to two parts:
1) Object allocation - allocate the steering node and initialize
its resources.

2) The firmware command execution.

Adding active flag to each node - this flag indicates if the
object exists in the hardware or not, if not we don't free
the hardware resource in error flow.

This change will give us the ability to take write lock on the
parent node (e.g. FG for FTE creationg) only on the first part.

Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h