From patchwork Fri Jun 28 22:35:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 1124565 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="JEfwc5to"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 45bBSC4Sr8z9s4V for ; Sat, 29 Jun 2019 08:35:55 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726822AbfF1Wfw (ORCPT ); Fri, 28 Jun 2019 18:35:52 -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 S1726563AbfF1Wfv (ORCPT ); Fri, 28 Jun 2019 18:35:51 -0400 ARC-Seal: i=1; a=rsa-sha256; s=testarcselector01; d=microsoft.com; cv=none; b=uKTkZT3aEPUsdBUkG21cEqAlHmNkZMdEk9lG88Q60x1gXkZh+b12kpqkXzqqPVS/B+ylt2CiFfT7aFGqUeKJtfL6a7JPfpKugRcg4hDZa7pNAhx7cuQTYzbNLTV3ivJmXoojjAS2yXgaXMUu9rX7NNGUXZ/TEwv1SShbtabhHBc= 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=O02QSOhjzcH13hGPUSRgDeQmGExAnfifaSPxJ7MpgQ0=; b=nTqahErw2QWKfKFWRtceKO0zHHRx6nMJdwX5ezOjY5rahT97FUwlKafA078XvlJLNiyShqhKVC/d5AN8MLYkjLuUQQw/ZTlRvKA4DzOtRmdRNppD6fDOCW88BpflM9kx8hBaD8FScIgrWXqVwG0zSXf01NoqQFQEQzR9d6EnhFE= 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=O02QSOhjzcH13hGPUSRgDeQmGExAnfifaSPxJ7MpgQ0=; b=JEfwc5torkTClOXq1/6N0LHBKj+EXxAHt7CglOgXs71jcGv84CxUIipyAH/06Vpuvph/ynkAC8r797Pt3K3KqCLjnHVE4XwbxAb0qDX8EcWyRNL2KAk1UaWOP9oMrLl3Lw4gtpkuPIrkLCybNRjGXjS5u+i7hCio1U5zzLxRvFI= 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:46 +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:46 +0000 From: Saeed Mahameed To: Saeed Mahameed , Leon Romanovsky CC: "netdev@vger.kernel.org" , "linux-rdma@vger.kernel.org" Subject: [PATCH mlx5-next 00/18] Mellanox, mlx5 E-Switch and low level updates Thread-Topic: [PATCH mlx5-next 00/18] Mellanox, mlx5 E-Switch and low level updates Thread-Index: AQHVLgHTW0uU5afEVkKEOy1vM16gTA== Date: Fri, 28 Jun 2019 22:35:46 +0000 Message-ID: <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: 382ee878-a0df-4e15-8368-08d6fc18f651 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:8882; x-forefront-prvs: 00826B6158 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(396003)(346002)(366004)(136003)(376002)(189003)(199004)(53754006)(6436002)(1076003)(3846002)(6116002)(256004)(66446008)(50226002)(6636002)(15650500001)(66066001)(53936002)(36756003)(71200400001)(71190400001)(186003)(8676002)(52116002)(4326008)(5660300002)(14444005)(26005)(6506007)(305945005)(450100002)(478600001)(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: cZ7wBWrop23duknfLv9Hb/Hr9/zjiqSv/sGkRn9GN6VxiTzTw+HburuRJ7Be5maHtn0no6Y/f3vntINGu+bJIluxiB/ybCD9cDtLt9XU6p/hiGEocCNREvy9hfHzue8pwGB7Pt5ZaTl0u48Ra9NMhUEMG2AMTVQFsbnlDQa2R4GhB3AKvKp+3rXa+71ddDC3KhcHiZBWKyGCQ9YEC5bWD3VJelAR7fpHwXgyrr9kmZoL6HLwFG54rG+rq5uPNg8Hu68DUOSEmspdel01ywJAynwWVLIUDfGoKvbSjcugT76lm8Z6PqN+m+GFEUjbv3Ugur/JykZWH/yXb4P6gOJzTBq6d1W1oTbj6d5a4bwwc16LlDmUgo8ZWqRmCnhADOpdHRBcIDmiq1DLocxoX0+9msYH+lPe4uiDYyec/BcjLjY= MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 382ee878-a0df-4e15-8368-08d6fc18f651 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2019 22:35:46.4257 (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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi All, This series includes some low level updates mainly in the E-Switch netdev and rdma vport representors areas. From Parav and Huy: 1) Added hardware bits and structures definitions for sub-functions 2) Small code cleanup and improvement for PF pci driver. From Bodong: 3) Use the correct name semantics of vport index and vport number 4) Cleanup the rep and netdev reference when unloading IB rep. 5) Bluefield (ECPF) updates and refactoring for better E-Switch management on ECPF embedded CPU NIC: 5.1) Consolidate querying eswitch number of VFs 5.2) Register event handler at the correct E-Switch init stage 5.3) Setup PF's inline mode and vlan pop when the ECPF is the E-Swtich manager ( the host PF is basically a VF ). 5.4) Handle Vport UC address changes in switchdev mode. From Shay: 6) Add support for MCQI and MCQS hardware registers. In case of no objections these patches will be applied to mlx5-next and will be sent later as pull request to both rdma-next and net-next trees. Thanks, Saeed. --- Bodong Wang (12): net/mlx5: E-Switch, Use vport index when init rep {IB, net}/mlx5: E-Switch, Use index of rep for vport to IB port mapping RDMA/mlx5: Cleanup rep when doing unload net/mlx5: Don't handle VF func change if host PF is disabled net/mlx5: E-Switch, Use correct flags when configuring vlan net/mlx5: Handle host PF vport mac/guid for ECPF net/mlx5: E-Switch, Refactor eswitch SR-IOV interface net/mlx5: E-Switch, Consolidate eswitch function number of VFs net/mlx5: E-Switch, Reg/unreg function changed event at correct stage net/mlx5: E-Switch, Use iterator for vlan and min-inline setups net/mlx5: E-Switch, Consider host PF for inline mode and vlan pop net/mlx5: E-Switch, Handle UC address change in switchdev mode Huy Nguyen (1): net/mlx5: Rename mlx5_pci_dev_type to mlx5_coredev_type Parav Pandit (4): net/mlx5: Add hardware definitions for sub functions net/mlx5: Move pci status reg access mutex to mlx5_pci_init net/mlx5: Limit scope of mlx5_get_next_phys_dev() to PCI PF devices net/mlx5: Reduce dependency on enabled_vfs counter and num_vfs Shay Agroskin (1): net/mlx5: Added MCQI and MCQS registers' description to ifc drivers/infiniband/hw/mlx5/ib_rep.c | 22 +- drivers/infiniband/hw/mlx5/ib_rep.h | 2 +- drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/dev.c | 9 +- .../ethernet/mellanox/mlx5/core/en_dcbnl.c | 2 +- .../net/ethernet/mellanox/mlx5/core/en_main.c | 4 +- .../net/ethernet/mellanox/mlx5/core/en_rep.c | 8 +- .../net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- .../net/ethernet/mellanox/mlx5/core/eswitch.c | 151 ++++++++------ .../net/ethernet/mellanox/mlx5/core/eswitch.h | 44 +++- .../mellanox/mlx5/core/eswitch_offloads.c | 196 ++++++++---------- .../ethernet/mellanox/mlx5/core/fpga/conn.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/lag.c | 4 +- .../net/ethernet/mellanox/mlx5/core/main.c | 7 +- .../net/ethernet/mellanox/mlx5/core/rdma.c | 2 +- .../net/ethernet/mellanox/mlx5/core/sriov.c | 27 +-- .../net/ethernet/mellanox/mlx5/core/vport.c | 28 ++- include/linux/mlx5/driver.h | 13 +- include/linux/mlx5/eswitch.h | 8 +- include/linux/mlx5/mlx5_ifc.h | 161 +++++++++++++- include/linux/mlx5/vport.h | 4 +- 22 files changed, 446 insertions(+), 253 deletions(-)