]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit747a882028c6cd2510c1be33e7965865bd209401
tree5a621d2ded64b61cdf94ebafd6a778ae11f3eeb7
parente800c992bfd3a941112572983a8d55d64a488148
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