From patchwork Fri Jun 28 22:35:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 11023501 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 312D6138D for ; Fri, 28 Jun 2019 22:36:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47CF128872 for ; Fri, 28 Jun 2019 22:36:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C18528876; Fri, 28 Jun 2019 22:36:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFEA328872 for ; Fri, 28 Jun 2019 22:36:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726832AbfF1WgD (ORCPT ); Fri, 28 Jun 2019 18:36:03 -0400 Received: from mail-eopbgr70049.outbound.protection.outlook.com ([40.107.7.49]:23750 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726754AbfF1WgB (ORCPT ); Fri, 28 Jun 2019 18:36:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=testarcselector01; d=microsoft.com; cv=none; b=cXW3HVjqb3AgaWQVbaO+WWS02qXHS/55HX8Y0sxNwQBuOcVtNjxN3ZmK7Ds2wfVasHnnBkBT+HaOIih1QEjLlh4ujfClvC57JRNQUCx7+vTlxhl2qfQgKUSAB9X89G3RFIpaYJeual7LbUgE1pkqrdFVvvGNEvfE9/7tIQaCfTs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=testarcselector01; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JcTQuYLVYLCnx4bH4u1zARas+AzANZADCkg4tJ2nuHc=; b=Okpe9KTFy6lD6U9kSNhfSvPNx6TepMCTe4V5NbV94oVbJclnQd1EGv0Fo15/PMrBc9UM+SEjwkxO1h4TKg2dwn8Q5aea03Gu5IG5Y+uE6CcwUMSegNE3bApWXOIqB9O2DDKZyDkn6Y1fzpumtKNhH5FHjdEddDmyxFTGl3DxhYE= ARC-Authentication-Results: i=1; test.office365.com 1;spf=none;dmarc=none;dkim=none;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JcTQuYLVYLCnx4bH4u1zARas+AzANZADCkg4tJ2nuHc=; b=hMRdBo6ppLbYVJmpSyiq9nO53lqdAMD8zYrfbD57g6AaWkSPEJgrTPT8beu+GvcMUgsLcLMvy+zR6gje2bwChoZJ1UtEG8hzDfs/xjNH/6jTH0jniLpJ7cHJwlUGyynjIGyBZbVdOZ9Mr6r5DmJTzTl6QmdK45e5qElfGQ5KFsI= Received: from DB6PR0501MB2759.eurprd05.prod.outlook.com (10.172.227.7) by DB6PR0501MB2357.eurprd05.prod.outlook.com (10.168.56.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.17; Fri, 28 Jun 2019 22:35:52 +0000 Received: from DB6PR0501MB2759.eurprd05.prod.outlook.com ([fe80::a901:6951:59de:3278]) by DB6PR0501MB2759.eurprd05.prod.outlook.com ([fe80::a901:6951:59de:3278%2]) with mapi id 15.20.2008.014; Fri, 28 Jun 2019 22:35:52 +0000 From: Saeed Mahameed To: Saeed Mahameed , Leon Romanovsky CC: "netdev@vger.kernel.org" , "linux-rdma@vger.kernel.org" , Bodong Wang , Parav Pandit , Mark Bloch Subject: [PATCH mlx5-next 03/18] net/mlx5: E-Switch, Use vport index when init rep Thread-Topic: [PATCH mlx5-next 03/18] net/mlx5: E-Switch, Use vport index when init rep Thread-Index: AQHVLgHX+qXNpoAsLkiKqwRBqMEFUA== Date: Fri, 28 Jun 2019 22:35:51 +0000 Message-ID: <20190628223516.9368-4-saeedm@mellanox.com> References: <20190628223516.9368-1-saeedm@mellanox.com> In-Reply-To: <20190628223516.9368-1-saeedm@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.21.0 x-originating-ip: [209.116.155.178] x-clientproxiedby: BY5PR13CA0035.namprd13.prod.outlook.com (2603:10b6:a03:180::48) To DB6PR0501MB2759.eurprd05.prod.outlook.com (2603:10a6:4:84::7) authentication-results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: df059c76-c2dd-43d4-7798-08d6fc18f97f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:DB6PR0501MB2357; x-ms-traffictypediagnostic: DB6PR0501MB2357: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-forefront-prvs: 00826B6158 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(396003)(346002)(366004)(136003)(376002)(189003)(199004)(107886003)(6436002)(1076003)(3846002)(6116002)(256004)(66446008)(50226002)(6636002)(66066001)(53936002)(36756003)(71200400001)(71190400001)(186003)(8676002)(52116002)(4326008)(5660300002)(26005)(6506007)(305945005)(450100002)(11346002)(446003)(478600001)(76176011)(64756008)(99286004)(386003)(102836004)(6512007)(110136005)(2906002)(316002)(66476007)(68736007)(14454004)(81166006)(486006)(86362001)(81156014)(73956011)(66946007)(2616005)(6486002)(476003)(66556008)(8936002)(25786009)(54906003)(7736002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0501MB2357;H:DB6PR0501MB2759.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: F5PGH4qMlKcrdaDCM8CQi12L7XBzWZ5F9Klb2qEctwvnSc2gywESIRNsCtQe9UJcIv4Xwh0Naw7+T5rvm+lEfGU2NOhTjauieD3/WOgiV1w8MalG5azepDkUiITSVTn3sQQcUuglCa+6AjRJ2G3FIIlkmlcfJUsrRHXSUfA1vkFIHWpDKEq4huWq2+MQKwSi4WAOfi9/NFeSpDzUm+Jqv8r5Cbq48AV2pa13bx0Rucyqo/rJ9w7Z5F+YJck+RUab68ZgC1zTpF+XC7c85n7ml26nnpp/KJth7XCG9lfJPbe5zR4eAkE1u94lgFRRkpJuWZs9VP4cmZveU6rB8opDQggC21y7g4xo+1JLCJkzwDKPvxlEVOffVq6paCLUCv+6z+j97XutKCilc+4XdrKLQ0GOSSLotPSzrPXbuWf6AB0= MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: df059c76-c2dd-43d4-7798-08d6fc18f97f X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2019 22:35:51.9753 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: saeedm@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2357 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bodong Wang Driver is referring to the array index when doing rep initialization, using vport is confusing as it's normally interpreted as vport number. This patch doesn't change any functionality. Signed-off-by: Bodong Wang Reviewed-by: Parav Pandit Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c index 174b0ec4162f..bc639a846714 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c @@ -1399,7 +1399,7 @@ int esw_offloads_init_reps(struct mlx5_eswitch *esw) struct mlx5_core_dev *dev = esw->dev; struct mlx5_eswitch_rep *rep; u8 hw_id[ETH_ALEN], rep_type; - int vport; + int vport_index; esw->offloads.vport_reps = kcalloc(total_vports, sizeof(struct mlx5_eswitch_rep), @@ -1409,8 +1409,8 @@ int esw_offloads_init_reps(struct mlx5_eswitch *esw) mlx5_query_nic_vport_mac_address(dev, 0, hw_id); - mlx5_esw_for_all_reps(esw, vport, rep) { - rep->vport = mlx5_eswitch_index_to_vport_num(esw, vport); + mlx5_esw_for_all_reps(esw, vport_index, rep) { + rep->vport = mlx5_eswitch_index_to_vport_num(esw, vport_index); ether_addr_copy(rep->hw_id, hw_id); for (rep_type = 0; rep_type < NUM_REP_TYPES; rep_type++)