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 C4C85C43381 for ; Tue, 5 Mar 2019 20:00:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 87B782075B for ; Tue, 5 Mar 2019 20:00:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="eXkLNX/H" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727615AbfCEUAG (ORCPT ); Tue, 5 Mar 2019 15:00:06 -0500 Received: from mail-eopbgr10063.outbound.protection.outlook.com ([40.107.1.63]:52196 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726118AbfCEUAF (ORCPT ); Tue, 5 Mar 2019 15:00:05 -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=u1RyT1zgg23mcsvoOYSYwXMeuaUQf0NSHILKH7W6nQ8=; b=eXkLNX/HFndD6nekJx/2IiHKmEqDKLj6V88wjblm/1qEfE9JnNMe/M22eXB1eopJm4MqEgmKKu6od2UPFAekLlu84iUHpjYFe7Fezkl1z6pg+xFagS/NqE/e/vkk2sHHkxhjX7bHLKriWV7RSixbGbd37C7XfubOXgVv1PO/mbQ= Received: from VI1PR0501MB2271.eurprd05.prod.outlook.com (10.169.135.8) by VI1PR0501MB2703.eurprd05.prod.outlook.com (10.172.15.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.19; Tue, 5 Mar 2019 19:59:58 +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.020; Tue, 5 Mar 2019 19:59:57 +0000 From: Parav Pandit To: Jakub Kicinski , Jiri Pirko CC: "davem@davemloft.net" , "netdev@vger.kernel.org" , "oss-drivers@netronome.com" Subject: RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports Thread-Topic: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports Thread-Index: AQHU0FlVGn07mv/5S0qtfXL/6zV0naX4F3YAgACpvYCAAl2OgIABFocAgACw24CAAGdAAIAALFzw Date: Tue, 5 Mar 2019 19:59:57 +0000 Message-ID: References: <20190301180453.17778-1-jakub.kicinski@netronome.com> <20190301180453.17778-5-jakub.kicinski@netronome.com> <20190302094116.GQ2314@nanopsycho> <20190302114847.733759a1@cakuba.netronome.com> <20190304075609.GV2314@nanopsycho> <20190304163302.7e40219e@cakuba.netronome.com> <20190305110601.GC2314@nanopsycho> <20190305091534.36200de6@cakuba.hsd1.ca.comcast.net> In-Reply-To: <20190305091534.36200de6@cakuba.hsd1.ca.comcast.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=parav@mellanox.com; x-originating-ip: [208.176.44.194] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9239de5d-6bea-4b9a-ee9c-08d6a1a524d6 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:VI1PR0501MB2703; x-ms-traffictypediagnostic: VI1PR0501MB2703: x-microsoft-exchange-diagnostics: =?us-ascii?Q?1;VI1PR0501MB2703;23:CZlNj7/ByQuTJM5kr5ffqNteaMOQgQXIcOTBw/S?= =?us-ascii?Q?DuQTpjPOWEA547TdSMgIKxLEh6dIWWSgols8wwX6iAxuP13fg+2hhcSq7hCn?= =?us-ascii?Q?wZZDgAiWvblvxFbyi1ZOWOGDEnEhokjFPegAxIR2SB8Wwlp4iS8RgtTaxKeT?= =?us-ascii?Q?ADdBqXSfoeBUdaC2wV1HpizbjQXcPutkl5NmMamyFJoasemMUzHlsKsq83FF?= =?us-ascii?Q?GnIaCB0KJAyrX2PsAvILQA5iu+v6zFCTojqwsjcWco3SIF4EFIsV6FEm9GLL?= =?us-ascii?Q?Zkc/6R+FBP3Un+IdzPynGcOy2oBH7jW+7C0zyJ5PWcwyQG8fAFf5AQq+c+ID?= =?us-ascii?Q?SbVNHkrNVClclDESo/I3Aj1h9xnRt7j9A+j5zPDLcnbPlq5eraTnanyev8mm?= =?us-ascii?Q?rVPtFAprCvP6R926pA9ksKadrKfa8Nq177+5vjLG0VKym+mMGNi9CqiOauXA?= =?us-ascii?Q?WaYZjISGEC66iU+RPAcW9wvEzdED1y947IsouapHSQ3qR5GeT3hwpy9eOOfW?= =?us-ascii?Q?GBx2g9X2LjGCKX086l/U4DJGE+Aw8+VM2ERrhWUUyelLwIPPoSG7YU8vrFbC?= =?us-ascii?Q?Oa1kghaTIo/Gk2EY/5QMDX86QD3Wnz6qt9ofB4XJfQjUWQKSBeBmNgS6b2Af?= =?us-ascii?Q?bfk1Q7sY5WxAuBC6sKGlA72m8wdHFvvac3dP/l/LDveXOqxv7HLZ/MUUZdyr?= =?us-ascii?Q?N0/x/i9YwLb7AoHX5jq9n/UKaUrrMNkuQR9028+sZQZKiIXgrT/9hUA7Uw4E?= =?us-ascii?Q?7tbg/laHaxvSvw+SiqXq6T/pcNgN2HEvOAdm0v239rFrpXCImil85yknLdfZ?= =?us-ascii?Q?7h0iPCTFdt84oPLCZuZVFrwLJ5e0Lyv7EdqBydktC8vp8Jbu6doPumAsZCL5?= =?us-ascii?Q?j8bQabgR9NmSIQPUnPAYak8nR8Bj3fkpuYqyfgEtAEHIMh09aBxlneRDzHXT?= =?us-ascii?Q?Zt1d/sRqdYY5DZF94awVV381Q2Sik1cruWwIBRZFrVcjYZRhy7whBLqWQaIZ?= =?us-ascii?Q?GKa/yM3eqhiGGrOPMWD9HX92FCwTWIeWIFlC7m1djj1ijNl9V7Lr1Fqt9/Ph?= =?us-ascii?Q?k+NQa/7125stJZaWuy23MOIpjy2hg8zid1hzxR4XqXPmWO9wUgWnln9i3qSh?= =?us-ascii?Q?P7Iid5S8VEnREvJQdWu/ZoR/8CnVHbvK9NkC2WVWPOmkM0VPXeZzxrkGY2Ut?= =?us-ascii?Q?QFB73aD7u2K4sVQaojDsJtD6nWW4jWKS/BHVNGEvKyiQvNF00emzhoqEwP61?= =?us-ascii?Q?+VxvzNm/lw+1nGghELartBT9ixMK749V27d1O3S+Y?= x-microsoft-antispam-prvs: x-forefront-prvs: 0967749BC1 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(376002)(39860400002)(136003)(366004)(346002)(189003)(199004)(13464003)(68736007)(6436002)(3846002)(6116002)(97736004)(11346002)(486006)(316002)(6506007)(476003)(53546011)(7736002)(55016002)(53936002)(5660300002)(9686003)(229853002)(86362001)(52536013)(25786009)(446003)(66066001)(478600001)(105586002)(6246003)(71190400001)(8676002)(14454004)(71200400001)(54906003)(81166006)(81156014)(106356001)(7696005)(76176011)(4326008)(110136005)(74316002)(186003)(99286004)(33656002)(8936002)(256004)(93886005)(305945005)(26005)(2906002)(102836004);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0501MB2703;H:VI1PR0501MB2271.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: ajV+lxqVujPaKHO9w2zFbY39j7G9PEV5v8gBAf6uawBQ3hK6iP6kwT7OS+UGhBQ5nO3ONaFoJl1H0F4kXPmVTr6r7HNfJDiUPqW5Gfc/wD2836xtat2jLP41eVF7jIlKhm3X03qN36lNrjgRx3vqv/KLjj3p7hT5ywwKGhYM1j4+VvlbTM6f6cbnCwgzXVY0OQZ1v6e1pMk3XXbaECUNs/N86l+5QggNHV5tF9bE8ZDUdWcVxcrPl29t0flRbWMkcwVD1RL1c7XXm2GIZN2mOr9VvYdpEYadFG+7Vz3nbH3Mma3Yz46wmGSN8TiZACBiQNeE7/i7kztEKYIiYjwJ3Irp/g5fLY42hIDxtPigj3w/DTxcW16Fm0py017mQpmediw2g5GsysSzEIL/U08xlwt2HiopP695bEuA3Xdh+EM= 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: 9239de5d-6bea-4b9a-ee9c-08d6a1a524d6 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Mar 2019 19:59:57.7353 (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: VI1PR0501MB2703 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 Jakub Kicinski > Sent: Tuesday, March 5, 2019 11:16 AM > To: Jiri Pirko > Cc: davem@davemloft.net; netdev@vger.kernel.org; oss- > drivers@netronome.com > Subject: Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink P= CI > ports >=20 > On Tue, 5 Mar 2019 12:06:01 +0100, Jiri Pirko wrote: > > >> >as ports. Can we invent a new command (say "partition"?) that'd ta= ke > > >> >the bus info where the partition is to be spawned? > > >> > > >> Got it. But the question is how different this object would be from > > >> the existing "port" we have today. > > > > > >They'd be where "the other side of a PCI link" is represented, > > >restricting ports to only ASIC's forwarding plane ports. > > > > Basically a "host port", right? It can still be the same port object, > > only with different flavour and attributes. So we would have: > > > > 1) pci/0000:05:00.0/0: type eth netdev enp5s0np0 > > flavour physical switch_id 00154d130d2f > > 2) pci/0000:05:00.0/10000: type eth netdev enp5s0npf0s0 > > flavour pci_pf pf 0 subport 0 > > switch_id 00154d130d2f > > peer pci/0000:05:00.0/1 > > 3) pci/0000:05:00.0/10001: type eth netdev enp5s0npf0vf0 > > flavour pci_vf pf 0 vf 0 > > switch_id 00154d130d2f > > peer pci/0000:05:10.1/0 > > 4) pci/0000:05:00.0/10001: type eth netdev enp5s0npf0s1 > > flavour pci_pf pf 0 subport 1 > > switch_id 00154d130d2f > > peer pci/0000:05:00.0/2 > > 5) pci/0000:05:00.0/1: type eth netdev enp5s0f0?? > > flavour host <---------------- > > peer pci/0000:05:00.0/10000 > > 6) pci/0000:05:10.1/0: type eth netdev enp5s10f0 > > flavour host <---------------- > > peer pci/0000:05:00.0/10001 > > 7) pci/0000:05:00.0/2: type eth netdev enp5s0f0?? > > flavour host <---------------- > > peer pci/0000:05:00.0/10001 > > > > I think it looks quite clear, it gives complete topology view. >=20 > Okay, I have some of questions :) >=20 > What do we use for port_index? >=20 port_index to refer a port for port attribute query/config. > What are the operations one can perform on "host ports"? >=20 Set port parameters. I see use case for mac address, rdma port guid, port speed that should be e= mulated. > If we have PCI parameters, do they get set on the ASIC side of the port o= r the > host side of the port? >=20 Hostport has host facing parameters. Eswitch port has switch facing parameters (configured/queried/managed throu= gh netdev/ovs). > How do those behave when device is passed to VM? >=20 > You have a VF devlink instance there - what ports does it show? >=20 VF devlink port in VM will show the port it got. It will likely have only read permission for the port attributes as today.= =20 For example, it will not know which switchport it is connected to. > How do those look when the PF is connected to another host? Do they get > spawned at all? >=20 > Will this not be confusing to DSA folks who have a CPU port?