From: Saeed Mahameed <saeed@kernel.org>
To: Leon Romanovsky <leonro@nvidia.com>, Saeed Mahameed <saeedm@nvidia.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
Mark Bloch <mbloch@nvidia.com>, Maor Gottlieb <maorg@nvidia.com>
Subject: [PATCH mlx5-next 2/5] net/mlx5: fs, expose flow table ID to users
Date: Sun, 3 Jul 2022 13:54:04 -0700 [thread overview]
Message-ID: <20220703205407.110890-3-saeed@kernel.org> (raw)
In-Reply-To: <20220703205407.110890-1-saeed@kernel.org>
From: Mark Bloch <mbloch@nvidia.com>
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>
---
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 6 ++++++
include/linux/mlx5/fs.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index 14187e50e2f9..1da3dc7c95fa 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -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)
diff --git a/include/linux/mlx5/fs.h b/include/linux/mlx5/fs.h
index ece3e35622d7..eee07d416b56 100644
--- a/include/linux/mlx5/fs.h
+++ b/include/linux/mlx5/fs.h
@@ -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
--
2.36.1
next prev parent reply other threads:[~2022-07-03 20:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-03 20:54 [PATCH mlx5-next 0/5] mlx5-next updates 2022-07-03 Saeed Mahameed
2022-07-03 20:54 ` [PATCH mlx5-next 1/5] net/mlx5: Expose the ability to point to any UID from shared UID Saeed Mahameed
2022-07-03 20:54 ` Saeed Mahameed [this message]
2022-07-03 20:54 ` [PATCH mlx5-next 3/5] net/mlx5: fs, allow flow table creation with a UID Saeed Mahameed
2022-07-03 20:54 ` [PATCH rdma-next 4/5] RDMA/mlx5: Refactor get flow table function Saeed Mahameed
2022-07-03 20:54 ` [PATCH rdma-next 5/5] RDMA/mlx5: Expose steering anchor to userspace Saeed Mahameed
2022-07-13 22:31 ` Saeed Mahameed
2022-07-15 8:08 ` Jason Gunthorpe
2022-07-17 19:52 ` Saeed Mahameed
2022-07-18 12:03 ` Leon Romanovsky
2022-07-19 17:54 ` [PATCH mlx5-next 0/5] mlx5-next updates 2022-07-03 Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220703205407.110890-3-saeed@kernel.org \
--to=saeed@kernel.org \
--cc=jgg@nvidia.com \
--cc=leonro@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@nvidia.com \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).