summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
diff options
context:
space:
mode:
authorMaor Gottlieb <maorg@mellanox.com>2017-07-26 16:28:26 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2017-09-26 20:52:02 +0300
commit19f100fef4ad46f21cfdfb1eeeb63fc38c2e57f1 (patch)
tree5a621d2ded64b61cdf94ebafd6a778ae11f3eeb7 /drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
parent46719d77d5f38b8ef04aa5a5cd91263b11d741d7 (diff)
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/fs_core.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/fs_core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
index 02c969c3d333..6e5d25b4f8de 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
@@ -82,6 +82,7 @@ struct fs_node {
/* lock the node for writing and traversing */
struct mutex lock;
atomic_t refcount;
+ bool active;
void (*remove_func)(struct fs_node *);
};