From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Omri Kahalon <omrik@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>,
Sasha Levin <sashal@kernel.org>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: [PATCH AUTOSEL 4.19 17/52] net/mlx5: E-Switch, Fix esw manager vport indication for more vport commands
Date: Wed, 24 Apr 2019 10:38:35 -0400 [thread overview]
Message-ID: <20190424143911.28890-17-sashal@kernel.org> (raw)
In-Reply-To: <20190424143911.28890-1-sashal@kernel.org>
From: Omri Kahalon <omrik@mellanox.com>
[ Upstream commit eca4a928585ac08147e5cc8e2111ecbc6279ee31 ]
Traditionally, the PF (Physical Function) which resides on vport 0 was
the E-switch manager. Since the ECPF (Embedded CPU Physical Function),
which resides on vport 0xfffe, was introduced as the E-Switch manager,
the assumption that the E-switch manager is on vport 0 is incorrect.
Since the eswitch code already uses the actual vport value, all we
need is to always set other_vport=1.
Signed-off-by: Omri Kahalon <omrik@mellanox.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
index 26c9f9421901..55ccd90beeb0 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -80,8 +80,7 @@ static int arm_vport_context_events_cmd(struct mlx5_core_dev *dev, u16 vport,
opcode, MLX5_CMD_OP_MODIFY_NIC_VPORT_CONTEXT);
MLX5_SET(modify_nic_vport_context_in, in, field_select.change_event, 1);
MLX5_SET(modify_nic_vport_context_in, in, vport_number, vport);
- if (vport)
- MLX5_SET(modify_nic_vport_context_in, in, other_vport, 1);
+ MLX5_SET(modify_nic_vport_context_in, in, other_vport, 1);
nic_vport_ctx = MLX5_ADDR_OF(modify_nic_vport_context_in,
in, nic_vport_context);
@@ -109,8 +108,7 @@ static int modify_esw_vport_context_cmd(struct mlx5_core_dev *dev, u16 vport,
MLX5_SET(modify_esw_vport_context_in, in, opcode,
MLX5_CMD_OP_MODIFY_ESW_VPORT_CONTEXT);
MLX5_SET(modify_esw_vport_context_in, in, vport_number, vport);
- if (vport)
- MLX5_SET(modify_esw_vport_context_in, in, other_vport, 1);
+ MLX5_SET(modify_esw_vport_context_in, in, other_vport, 1);
return mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
}
--
2.19.1
next prev parent reply other threads:[~2019-04-24 14:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190424143911.28890-1-sashal@kernel.org>
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 06/52] batman-adv: Reduce claim hash refcnt only for removed entry Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 07/52] batman-adv: Reduce tt_local " Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 08/52] batman-adv: Reduce tt_global " Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 09/52] batman-adv: fix warning in function batadv_v_elp_get_throughput Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 12/52] igb: Fix WARN_ONCE on runtime suspend Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 13/52] fm10k: Fix a potential NULL pointer dereference Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 16/52] net: hns3: fix compile error Sasha Levin
2019-04-24 14:38 ` Sasha Levin [this message]
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 18/52] bonding: show full hw address in sysfs for slave entries Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 19/52] net: stmmac: use correct DMA buffer size in the RX descriptor Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 20/52] net: stmmac: ratelimit RX error logs Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 21/52] net: stmmac: don't stop NAPI processing when dropping a packet Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 22/52] net: stmmac: don't overwrite discard_frame status Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 23/52] net: stmmac: fix dropping of multi-descriptor RX frames Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 24/52] net: stmmac: don't log oversized frames Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 26/52] debugfs: fix use-after-free on symlink traversal Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 37/52] net: hns: fix KASAN: use-after-free in hns_nic_net_xmit_hw() Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 38/52] net: hns: Use NAPI_POLL_WEIGHT for hns driver Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 39/52] net: hns: Fix probabilistic memory overwrite when HNS driver initialized Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 40/52] net: hns: fix ICMP6 neighbor solicitation messages discard problem Sasha Levin
2019-04-24 14:38 ` [PATCH AUTOSEL 4.19 41/52] net: hns: Fix WARNING when remove HNS driver with SMMU enabled Sasha Levin
2019-04-24 14:39 ` [PATCH AUTOSEL 4.19 42/52] libcxgb: fix incorrect ppmax calculation Sasha Levin
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=20190424143911.28890-17-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=omrik@mellanox.com \
--cc=saeedm@mellanox.com \
--cc=stable@vger.kernel.org \
/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).