From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9460DC43381 for ; Mon, 4 Mar 2019 05:12:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5709F20823 for ; Mon, 4 Mar 2019 05:12:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="v+tHJq47" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726063AbfCDFMU (ORCPT ); Mon, 4 Mar 2019 00:12:20 -0500 Received: from mail-eopbgr50081.outbound.protection.outlook.com ([40.107.5.81]:21891 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725550AbfCDFMU (ORCPT ); Mon, 4 Mar 2019 00:12:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wSqaD2g1WK4PGpWWDiMAj4XJjxArc0dCvTHGwVkgOwI=; b=v+tHJq47wj97HxMqR6SHwQ6l0aDNsbLVuSla7k6oAMh14KouSLh+SKayTWv0POL4AiftoHlXNBuX5BRM90eTJchM0qUJq4TQ1VJZrSvz21EpLuQfhL3Z9JhrU27q4Inle6BmGi8nJEmoDKPuI7U97g0heloq4KpSG4S175Xu8zo= Received: from VI1PR0501MB2271.eurprd05.prod.outlook.com (10.169.135.8) by VI1PR0501MB2173.eurprd05.prod.outlook.com (10.169.134.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.18; Mon, 4 Mar 2019 05:12:12 +0000 Received: from VI1PR0501MB2271.eurprd05.prod.outlook.com ([fe80::a0b8:7ed8:d657:2f59]) by VI1PR0501MB2271.eurprd05.prod.outlook.com ([fe80::a0b8:7ed8:d657:2f59%6]) with mapi id 15.20.1665.019; Mon, 4 Mar 2019 05:12:12 +0000 From: Parav Pandit To: Jiri Pirko , Jakub Kicinski CC: "davem@davemloft.net" , "netdev@vger.kernel.org" , "oss-drivers@netronome.com" Subject: RE: [PATCH net-next v2 0/7] devlink: expose PF and VF representors as ports Thread-Topic: [PATCH net-next v2 0/7] devlink: expose PF and VF representors as ports Thread-Index: AQHU0FlS5jy+kvndzEGt0c6Dh2j6DaX4IICAgALPw9A= Date: Mon, 4 Mar 2019 05:12:12 +0000 Message-ID: References: <20190301180453.17778-1-jakub.kicinski@netronome.com> <20190302101337.GR2314@nanopsycho> In-Reply-To: <20190302101337.GR2314@nanopsycho> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [68.203.16.89] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 856c2b7f-f5bd-403e-dc7e-08d6a05ff5ce x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:VI1PR0501MB2173; x-ms-traffictypediagnostic: VI1PR0501MB2173: x-microsoft-exchange-diagnostics: =?us-ascii?Q?1;VI1PR0501MB2173;23:7YrG+uMFHCMVah/pCputsy/mpSowbNSIsOTJjYI?= =?us-ascii?Q?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MIfUCaxb0fTD6Fyc?= =?us-ascii?Q?7FAUruqjv3O7y+3p0xbofLKcfdmposW1mPw7TMxD6D+q4yNg75DGCYFZS57M?= =?us-ascii?Q?0nwzowH07S6rClNggJJ74twyT5fvUssF8+Fv9MM5fGPqCTS8onD/ucVJshHX?= =?us-ascii?Q?6+uDqJB8d78l78r1RXVLm7rpiGbZ7H5P3tNzsJpudKGEK9e5JEofyOFPz6cY?= =?us-ascii?Q?F32u044BT+cx22GMdBegKtIVR1cis5MDCwyj0VhNGLafyvxak4ZslP/3OluC?= =?us-ascii?Q?45bCunOq9pk+gqn+tb0iYY3M0FOjumnUS7ZFZ5SIpvJ6wLrbKBeyIvi6rBqU?= =?us-ascii?Q?umDpCzf8Wpgf/i0UAvS1qudHIhC6BXwW362P4S1oWAcWBybNwWsVtB3+36JN?= =?us-ascii?Q?yzwSZ9q0cU6JDGuKFo5tFXS00hvdVKGE5kIrnXqmUaL2Z?= x-microsoft-antispam-prvs: x-forefront-prvs: 09669DB681 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(366004)(346002)(39860400002)(136003)(396003)(13464003)(55674003)(199004)(189003)(51444003)(66066001)(105586002)(71200400001)(8936002)(186003)(71190400001)(229853002)(8676002)(55016002)(106356001)(11346002)(76176011)(3846002)(476003)(102836004)(316002)(9686003)(110136005)(53936002)(54906003)(486006)(478600001)(6436002)(6116002)(81166006)(256004)(86362001)(14444005)(81156014)(446003)(26005)(52536013)(99286004)(2906002)(74316002)(4326008)(14454004)(7696005)(33656002)(7736002)(305945005)(97736004)(6246003)(6346003)(53546011)(25786009)(68736007)(5660300002)(6506007);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0501MB2173;H:VI1PR0501MB2271.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=parav@mellanox.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: dm/zfzyVpodKE9juqvnhBvaCumAh4kRbM8O7WNhJw01kWyXB+liWABCTfkdBRoDi5VIQHzGKVJ3RySxBJsyBGsOE61IIEWyOneEk9CQClwqWZWt7OPyCc+xd7kR/0nx/ygzxjlbDNlNKec+KHSDQjhzvUjNlR01rEbylLZ+MBrlb2MGpx/x9S3qTDMTY+/VBOc2SDbFM4HJ9G5MHJjqsbL8hjqr9s0aOZOhVGkPNFSOnPUoI2GKQouuoD3JRCA4/RxzAybs20TEI6SgkzBTfLFMGSPX7o0iF+Ts38WbfUXiI3c5lFQwikX/4JyyyfjnAu9jifJaP5PO+2BkeusW0fVeGnB7J89753CuvxMnZruZPv9vGN/G54m9c8BaiyRJ20mykj+DyCp1+6EHItS1mJCbFOLjRI+wgcN1ttlnxFDw= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 856c2b7f-f5bd-403e-dc7e-08d6a05ff5ce X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Mar 2019 05:12:12.4294 (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-Transport-CrossTenantHeadersStamped: VI1PR0501MB2173 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > -----Original Message----- > From: netdev-owner@vger.kernel.org On > Behalf Of Jiri Pirko > Sent: Saturday, March 2, 2019 4:14 AM > To: Jakub Kicinski > Cc: davem@davemloft.net; netdev@vger.kernel.org; oss- > drivers@netronome.com > Subject: Re: [PATCH net-next v2 0/7] devlink: expose PF and VF represento= rs > as ports >=20 > Fri, Mar 01, 2019 at 07:04:46PM CET, jakub.kicinski@netronome.com wrote: > >Hi! > > > >This series is a long overdue follow up to Jiri's work on providing a > >common .ndo_phys_port_name implementation based on devlink ports. > > > >First devlink port flavours for PF and VF ports are added, and > >registered by the NFP. Port numbers and split info are reserved for > >physical and DSA ports. For PCIe ports we add pf/vf identifiers. > >Note that devices may have more than one PF, including multi host > >scenarios where not all pfs are connected to the same host. > > > >The port_index is slightly tricky to figure out, we use a bit of math > >to create unique IDs for ports. > > > >Next subports for PCIe ports are introduced. This is in case device has > >more than one netdev on a physical function (e.g. multi port SmartNIC). > > > >With the above features in place we can remove the ndo_phys_port_name > >implementation from the NFP and use the standard devlink one for port > >netdevs. > > > >Last but not least a concept of peer netdevs is added. In multi-host > >scenarios its currently not possible to figure out which PF is > >associated with the local host. Peer device is "the other side of the > >wire" for PCIe ports. In case of NFP we only link the PF netdevs, but > >it should be possible to also link VF peers after VF driver probes, if > >users request it. > > > >This is the conceptual image of devlink instances: > > > > HOST A || HOST B > > || > > PF A | V | V | V | V || PF B | V | V | V > > |*F |*F |*F |*F ... || |*F |*F |*F > >*port A0 |*port A1 | 0 | 1 | 2 | 3 ||*port B0 |*port B1 | 0 | 1 | 2 > > || > > PCI Express link || PCI Express link > > \ \ \ | | | | | / / / > > \ \ \ | | | | | / / / > > /\ \______\______\'___|___|__________|_______'____/___/___/__ > /\ > > || |+PF0s0|+PF0s1 |+VF0|+VF1| ...| |+PF1s0|+PF1s1|+VF0|+VF1| = || > > i || |------ ------ ----- ---- ----|--- ------ ------ ---- ----| = || i > >d n H || | <<=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D = | || d n H > >e s O || | =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D>> = | || e s O > >v t S || | SR-IOV e-switch | = || v t S > >l a T || | <<=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D = | || l a T > >i n || | =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D>> = | || i n > >n c A || | ________ _________ ________ | = || n c B > >k e || | |+Phys 0 |+Phys 1 |+Phys 2 | | = || k e > > || \---------------------------------------------------------/ = || > > \/ | | | = \/ > > | | | > > || || > > MAC 0 || MAC 1 || MAC 2 > > || || > > > > '+' marks the devlink ports and port (-representor-) netdevs '*' marks > > host netdevs (actual VF/PF netdev) >=20 > As I wrote in the reply to patch 4, I think we need to figure out if we w= ant to > model all entities that belong under specific devlink instance/pci addres= s - > which I prefer, or we want to have only eswitch ports there. >=20 > One way or another, I think that it is not good idea to merge this patchs= et > this late, I would prefer to wait for next net-next opening... > In the meantime we can sync and make this whole thing crystal clear, for > everyone. >=20 Yes, please. I replied in other thread, we should not bring peer port concept. It is con= voluted. We just need hostport and switchport representation (likely as port flavour= s) to configure each separately. Whether a given devlink device is PF or VF is devlink devie attribute anywa= y.