Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp659850yba; Wed, 24 Apr 2019 07:36:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpbpssmgbC9ZxUYw3MZd55OQ5uC0UWYfq4E4SRvbAiEGu/HuYv7f99A94Tnuz/pAoxDNMe X-Received: by 2002:a17:902:9006:: with SMTP id a6mr26484414plp.259.1556116590063; Wed, 24 Apr 2019 07:36:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556116590; cv=none; d=google.com; s=arc-20160816; b=r+eoai8RVXgUXaSzSM21ESgLXs0JBcQy1g6qsZub3VriKHCb4JNrskmb/ylhM6drba iejRowudnSlJzHEda1ueAv5GJPIFTQabYTYFZ2r5x7RsSUzmN76LnPeTfaj0xDdLHEY0 ADBXG9iRLwcynjNvFv5mnhN84nGXrRSbdLlPfYtWhTpOf3PtsVJ3p5Hrxmu4Ymy7B3Z0 yE0dYvX0EHjoZb8L5bJsYHnB6WaYji2nvvi7A65PnaWAJ2yV/uoV/4Si3/yYcEVsUlAS aHpjjz5Kcs37o0CTS/27y6x0qULPHJepQW0zfUFUj+hnT2SDyXYfVF0iSEpqkk8NU2WH F4xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ek4lNFONFbB+bCLYBfbmgZ/QecenjLECwF3MhVuJKg8=; b=ufikfgG5270AquW4QXFIZVx68bM3Sh0q9xW2i1fQ3773AkwkJYJv+piqz1PHBD5AbA xMtZ9kXvFNnC4O1/Ykm64Q1m2F9uldLnBBmOFCdHPm6Wzw9jV5Ek1qFoGqrh5zgyNIRB y8Z1ctZsViQZ3nEqppRVKBL9OFZ7v38N1CbJEKdQQIE+21LsnHM9aKMCf2w70TTeRCAn yi0zV01xizuLVcDzlZxaglGEoOlzsSdAAbZ4KwaS3AgYcfDIk4VLJwDSxSEFIwmImEK3 3NTmNg21AR0VWkklc36GeRrSbUHipXw9zDIgNwHgE7juj9SNywD/Y576A+/5hwLDx3rO 5GMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xLSRyecC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5si13525861pgp.315.2019.04.24.07.36.14; Wed, 24 Apr 2019 07:36:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xLSRyecC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731169AbfDXOet (ORCPT + 99 others); Wed, 24 Apr 2019 10:34:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:38622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731153AbfDXOer (ORCPT ); Wed, 24 Apr 2019 10:34:47 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BF84E21900; Wed, 24 Apr 2019 14:34:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556116486; bh=DqdQEbpVP7GV2qxFZlVhyGL4LkpK+VDBwO6hX6UI/YQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xLSRyecC9yiJaIVB/tLMiWU80Qj0DAgTwMw/VI0Th0xvkAqZWfR2mJ2rTE7jprMsu 2XhLir/vX50ZV3wY5iwmR1d5ExV4g6DGpK1xzYSYfaUb/1AfpM8EhuTqimh8WgjuZ3 +br0GVI/ZMAidVonGYrqgIBN+8ireZiM26iTlYo0= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Omri Kahalon , Saeed Mahameed , Sasha Levin , netdev@vger.kernel.org, linux-rdma@vger.kernel.org Subject: [PATCH AUTOSEL 5.0 25/66] net/mlx5: E-Switch, Fix esw manager vport indication for more vport commands Date: Wed, 24 Apr 2019 10:32:59 -0400 Message-Id: <20190424143341.27665-25-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190424143341.27665-1-sashal@kernel.org> References: <20190424143341.27665-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Omri Kahalon [ 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 Reviewed-by: Max Gurtovoy Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin (Microsoft) --- 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 13c48883ed61..619f96940b65 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c @@ -81,8 +81,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); @@ -110,8 +109,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