summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
diff options
context:
space:
mode:
authorMaor Gottlieb2015-12-10 16:12:40 +0100
committerDavid S. Miller2015-12-12 06:15:23 +0100
commitde8575e014685034728396f9d69169428be9cc3d (patch)
tree05b8f799c737ef89fc7b9048e91c0e29ff669ec4 /drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
parentnet/mlx5_core: Introduce flow steering firmware commands (diff)
downloadkernel-qcow2-linux-de8575e014685034728396f9d69169428be9cc3d.tar.gz
kernel-qcow2-linux-de8575e014685034728396f9d69169428be9cc3d.tar.xz
kernel-qcow2-linux-de8575e014685034728396f9d69169428be9cc3d.zip
net/mlx5_core: Add flow steering base data structures
Introducing the base data structure and its operations that are going to represent ConnectX-4 Flow Steering, this data structure is basically a tree and all Flow steering objects such as (Flow Table/Flow Group/FTE/etc ..) are represented as fs_node(s). fs_node is the base object which describes a basic tree node, with the following extra info: type: describes the runtime type of the node (Object). lock: lock this node sub-tree. ref_count: number of children + current references. remove_func: a generic destructor. fs_node types will be used and explained once the usage is added in the following patches. Signed-off-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Moni Shoua <monis@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/fs_core.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/fs_core.h6
1 files changed, 6 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 e8b34a9b147b..ae03ae497cbf 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
@@ -56,6 +56,12 @@ struct fs_node {
struct list_head list;
struct list_head children;
enum fs_node_type type;
+ struct fs_node *parent;
+ struct fs_node *root;
+ /* lock the node for writing and traversing */
+ struct mutex lock;
+ atomic_t refcount;
+ void (*remove_func)(struct fs_node *);
};
struct mlx5_flow_rule {