Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2570243yba; Mon, 6 May 2019 08:09:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqwm+PY3Q66LKFeY3csbGxJvOL0WmvG6l+SuYwnNM+OeFbFbps2JYWY3fuHtfTLDSpgChbjo X-Received: by 2002:a63:e408:: with SMTP id a8mr14254933pgi.146.1557155345794; Mon, 06 May 2019 08:09:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557155345; cv=none; d=google.com; s=arc-20160816; b=MIECl0ULBRG3HqqJvnzZhlXX+s7ziKr4SPah+usj91nbh4E1Sw25NbKdh2YhTskUtY MtbFtlw8L9afdqPoX+SbhFioJXd4TASwzzLWzK+1fzap+8nx2ZTvAWXZwg0q6RDyfLO/ ognGq6dSyLS/OjmiFzfpPKj6Bm8F+nl9k3mVUQE3G8W4kjC3qmqKIld7yde1gksyuE2B hNd7M2W3D0nA3YkT2lY28hXOdOsJfS0GxroSJ9aXVdDrIfhvnH5lbAVGL11uuv9ycTe2 XlarTFqUKaiGYRGDkBav882T+eZn3lR4uh76VdVyAcOPazG5y/syhTQzx7DCtJbAxRr+ HEHw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HDnstkbg4zUIE/tW8240vQd1RMI3aErNex4RYHxfnds=; b=FG1rMAO74k1fy+YMOXNGk64T6/0beJ5ie0AtrErqdpU5fp8FGY7RRLGQPWkUXJn3tX y+WperlAP6tnCCBR7amAmzv1pzaxwp9+xsK8Psm77DGUMsBwHYEeNgbspq6KPNofSVrh UI3DVI9heZd9ClOrNRwm5arccRvFxelzu873atyxiP7+3ZMOUxYz2TaoNyFrBM/cYMh+ QLVz2I45sH9llFn7jfNDx/t5UaEv4KXMCBJVdCWCT7KdjdBxtinYCpp0/6LDCT+3RUge KwFOBfjxzSg1ALBrZl+p8Q1X9x0BfE9peE2bQuvvjdRv7xFpxgH0/9mtg/DkTvH7xyKx Jy9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zqnxfq6W; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v14si15040957pfa.252.2019.05.06.08.08.44; Mon, 06 May 2019 08:09:05 -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=zqnxfq6W; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727271AbfEFOgz (ORCPT + 99 others); Mon, 6 May 2019 10:36:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:57354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727258AbfEFOgv (ORCPT ); Mon, 6 May 2019 10:36:51 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BC56C21479; Mon, 6 May 2019 14:36:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557153411; bh=1xlbXTkWIfvBtYiqfLWjpaCpdyW8JWxFrLwg6Y1z4T4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zqnxfq6WfoosTyrFCzBg4e0yL5r1Ut1pvCLQC4cri4osCydqiTa13xs5bJhpRg4U9 WFWGV2kw3awHUTlHePSF1FqynOHZCP0b0Yi7cIW5VMry3/kLGro2cA7tRS5MI4CA+w ptMU2lWoucP/v+nOUT3e/ltvNaBdpnvPDxHfs2Do= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Omri Kahalon , Max Gurtovoy , Saeed Mahameed , "Sasha Levin (Microsoft)" Subject: [PATCH 5.0 048/122] net/mlx5: E-Switch, Fix esw manager vport indication for more vport commands Date: Mon, 6 May 2019 16:31:46 +0200 Message-Id: <20190506143059.253102176@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190506143054.670334917@linuxfoundation.org> References: <20190506143054.670334917@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ 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.20.1