From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>,
netdev@vger.kernel.org, Tariq Toukan <tariqt@nvidia.com>,
Yevgeny Kliteynik <kliteyn@nvidia.com>,
Alex Vesker <valex@nvidia.com>
Subject: [net-next 04/15] net/mlx5: DR, Check for modify_header_argument device capabilities
Date: Fri, 14 Apr 2023 15:09:28 -0700 [thread overview]
Message-ID: <20230414220939.136865-5-saeed@kernel.org> (raw)
In-Reply-To: <20230414220939.136865-1-saeed@kernel.org>
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
.../net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c | 11 +++++++++++
.../ethernet/mellanox/mlx5/core/steering/dr_types.h | 3 +++
2 files changed, 14 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c
index 229f3684100c..e2cbc2b5bc27 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c
@@ -132,6 +132,17 @@ int mlx5dr_cmd_query_device(struct mlx5_core_dev *mdev,
caps->isolate_vl_tc = MLX5_CAP_GEN(mdev, isolate_vl_tc_new);
+ caps->support_modify_argument =
+ MLX5_CAP_GEN_64(mdev, general_obj_types) &
+ MLX5_GENERAL_OBJ_TYPES_CAP_HEADER_MODIFY_ARGUMENT;
+
+ if (caps->support_modify_argument) {
+ caps->log_header_modify_argument_granularity =
+ MLX5_CAP_GEN(mdev, log_header_modify_argument_granularity);
+ caps->log_header_modify_argument_max_alloc =
+ MLX5_CAP_GEN(mdev, log_header_modify_argument_max_alloc);
+ }
+
/* geneve_tlv_option_0_exist is the indication of
* STE support for lookup type flex_parser_ok
*/
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h
index a1c549fed9ca..9187e9d6ea54 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h
@@ -896,6 +896,9 @@ struct mlx5dr_cmd_caps {
struct mlx5dr_vports vports;
bool prio_tag_required;
struct mlx5dr_roce_cap roce_caps;
+ u16 log_header_modify_argument_granularity;
+ u16 log_header_modify_argument_max_alloc;
+ bool support_modify_argument;
u8 is_ecpf:1;
u8 isolate_vl_tc:1;
};
--
2.39.2
next prev parent reply other threads:[~2023-04-14 22:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-14 22:09 [pull request][net-next 00/15] mlx5 updates 2023-04-14 Saeed Mahameed
2023-04-14 22:09 ` [net-next 01/15] net/mlx5: DR, Move ACTION_CACHE_LINE_SIZE macro to header Saeed Mahameed
2023-04-17 7:20 ` patchwork-bot+netdevbpf
2023-04-14 22:09 ` [net-next 02/15] net/mlx5: DR, Add cache for modify header pattern Saeed Mahameed
2023-04-14 22:09 ` [net-next 03/15] net/mlx5: DR, Split chunk allocation to HW-dependent ways Saeed Mahameed
2023-04-14 22:09 ` Saeed Mahameed [this message]
2023-04-14 22:09 ` [net-next 05/15] net/mlx5: DR, Add create/destroy for modify-header-argument general object Saeed Mahameed
2023-04-14 22:09 ` [net-next 06/15] net/mlx5: DR, Add support for writing modify header argument Saeed Mahameed
2023-04-14 22:09 ` [net-next 07/15] net/mlx5: DR, Read ICM memory into dedicated buffer Saeed Mahameed
2023-04-14 22:09 ` [net-next 08/15] net/mlx5: DR, Fix QP continuous allocation Saeed Mahameed
2023-04-14 22:09 ` [net-next 09/15] net/mlx5: DR, Add modify header arg pool mechanism Saeed Mahameed
2023-04-14 22:09 ` [net-next 10/15] net/mlx5: DR, Add modify header argument pointer to actions attributes Saeed Mahameed
2023-04-14 22:09 ` [net-next 11/15] net/mlx5: DR, Apply new accelerated modify action and decapl3 Saeed Mahameed
2023-04-14 22:09 ` [net-next 12/15] net/mlx5: DR, Support decap L3 action using pattern / arg mechanism Saeed Mahameed
2023-04-14 22:09 ` [net-next 13/15] net/mlx5: DR, Modify header action of size 1 optimization Saeed Mahameed
2023-04-14 22:09 ` [net-next 14/15] net/mlx5: DR, Add support for the pattern/arg parameters in debug dump Saeed Mahameed
2023-04-14 22:09 ` [net-next 15/15] net/mlx5: DR, Enable patterns and arguments for supporting devices Saeed Mahameed
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=20230414220939.136865-5-saeed@kernel.org \
--to=saeed@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kliteyn@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=valex@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).