From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Alex Vesker <valex@mellanox.com>,
Maor Gottlieb <maorg@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 2/7] net/mlx5: DR, Remove redundant vport number from action
Date: Tue, 24 Sep 2019 09:41:26 +0000 [thread overview]
Message-ID: <20190924094047.15915-3-saeedm@mellanox.com> (raw)
In-Reply-To: <20190924094047.15915-1-saeedm@mellanox.com>
From: Alex Vesker <valex@mellanox.com>
The vport number is part of the vport_cap, there is no reason
to store in a separate variable on the vport.
Fixes: 9db810ed2d37 ("net/mlx5: DR, Expose steering action functionality")
Signed-off-by: Alex Vesker <valex@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c | 4 ++--
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
index 7d81a7735de5..b74b7d0f6590 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
@@ -615,7 +615,7 @@ static int dr_action_handle_cs_recalc(struct mlx5dr_domain *dmn,
* that recalculates the CS and forwards to the vport.
*/
ret = mlx5dr_domain_cache_get_recalc_cs_ft_addr(dest_action->vport.dmn,
- dest_action->vport.num,
+ dest_action->vport.caps->num,
final_icm_addr);
if (ret) {
mlx5dr_err(dmn, "Failed to get FW cs recalc flow table\n");
@@ -744,7 +744,7 @@ int mlx5dr_actions_build_ste_arr(struct mlx5dr_matcher *matcher,
dest_action = action;
if (rx_rule) {
/* Loopback on WIRE vport is not supported */
- if (action->vport.num == WIRE_PORT)
+ if (action->vport.caps->num == WIRE_PORT)
goto out_invalid_arg;
attr.final_icm_addr = action->vport.caps->icm_address_rx;
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 a37ee6359be2..78f899fb3305 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h
@@ -745,7 +745,6 @@ struct mlx5dr_action {
struct {
struct mlx5dr_domain *dmn;
struct mlx5dr_cmd_vport_cap *caps;
- u32 num;
} vport;
struct {
u32 vlan_hdr; /* tpid_pcp_dei_vid */
--
2.21.0
next prev parent reply other threads:[~2019-09-24 9:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-24 9:41 [pull request][net 0/7] Mellanox, mlx5 fixes 2019-09-24 Saeed Mahameed
2019-09-24 9:41 ` [net 1/7] net/mlx5: DR, Fix SW steering HW bits and definitions Saeed Mahameed
2019-09-24 9:41 ` Saeed Mahameed [this message]
2019-09-24 9:41 ` [net 3/7] net/mlx5: DR, Fix getting incorrect prev node in ste_free Saeed Mahameed
2019-09-24 9:41 ` [net 4/7] net/mlx5: DR, Allow matching on vport based on vhca_id Saeed Mahameed
2019-09-24 9:41 ` [net 5/7] net/mlx5: Add device ID of upcoming BlueField-2 Saeed Mahameed
2019-09-24 9:41 ` [net 6/7] net/mlx5e: Fix traffic duplication in ethtool steering Saeed Mahameed
2019-09-24 9:41 ` [net 7/7] net/mlx5e: Fix matching on tunnel addresses type Saeed Mahameed
2019-09-24 9:51 ` [pull request][net 0/7] Mellanox, mlx5 fixes 2019-09-24 Saeed Mahameed
2019-09-26 7:16 ` David Miller
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=20190924094047.15915-3-saeedm@mellanox.com \
--to=saeedm@mellanox.com \
--cc=davem@davemloft.net \
--cc=maorg@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=valex@mellanox.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