Skip to content

Commit

Permalink
net/mlx5: fs, expose flow table ID to users
Browse files Browse the repository at this point in the history
Expose the flow table ID to users. This will be used by downstream
patches to allow creating steering rules that point to a flow table ID.

Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
mark-bloch authored and Saeed Mahameed committed Jul 17, 2022
1 parent f484da8 commit 6c27c56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,12 @@ struct mlx5_flow_table *mlx5_create_flow_table(struct mlx5_flow_namespace *ns,
}
EXPORT_SYMBOL(mlx5_create_flow_table);

u32 mlx5_flow_table_id(struct mlx5_flow_table *ft)
{
return ft->id;
}
EXPORT_SYMBOL(mlx5_flow_table_id);

struct mlx5_flow_table *
mlx5_create_vport_flow_table(struct mlx5_flow_namespace *ns,
struct mlx5_flow_table_attr *ft_attr, u16 vport)
Expand Down
1 change: 1 addition & 0 deletions include/linux/mlx5/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,5 @@ struct mlx5_pkt_reformat *mlx5_packet_reformat_alloc(struct mlx5_core_dev *dev,
void mlx5_packet_reformat_dealloc(struct mlx5_core_dev *dev,
struct mlx5_pkt_reformat *reformat);

u32 mlx5_flow_table_id(struct mlx5_flow_table *ft);
#endif

0 comments on commit 6c27c56

Please sign in to comment.