From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30068.outbound.protection.outlook.com [40.107.3.68]) by dpdk.org (Postfix) with ESMTP id 12F578D8F for ; Thu, 28 Jun 2018 11:06:15 +0200 (CEST) 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=dxDfUBkdIYeWeVx0U4NKv9ylq8s4Gfnc2VpvuFi7c/0=; b=jqZA/w4spFakhsFNjN6pAZX6CmygmGCa7DLsyjiyVNIYTPl+/RBFYhR2NE+DBqsHS5M7IY4T+oYwz/pzuN+N/Kl08IFYggP/8NTM+GTS8j0MoBtbfAxNAi3zHINR3qDAki3WUANqDK2Ks5cvdVQF9hBDJ+aLOXZ1s1vXWASdurs= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4204.eurprd05.prod.outlook.com (52.134.107.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.20; Thu, 28 Jun 2018 09:06:13 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::4c94:2db9:b8c5:cc6b]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::4c94:2db9:b8c5:cc6b%5]) with mapi id 15.20.0884.025; Thu, 28 Jun 2018 09:06:13 +0000 From: Shahaf Shuler To: Adrien Mazarguil CC: "Xueming(Steven) Li" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 6/7] net/mlx5: probe all port representors Thread-Index: AQHUA7qglxyeqjm7kUStlpk5b3NHZ6RimMCAgAGgu8CAD/WlAIABE3LwgAAuxgCAAARCgA== Date: Thu, 28 Jun 2018 09:06:13 +0000 Message-ID: References: <20180525161814.13873-1-adrien.mazarguil@6wind.com> <20180614083047.10812-1-adrien.mazarguil@6wind.com> <20180614083047.10812-7-adrien.mazarguil@6wind.com> <20180627133228.GV4025@6wind.com> <20180628084543.GA4025@6wind.com> In-Reply-To: <20180628084543.GA4025@6wind.com> 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=shahafs@mellanox.com; x-originating-ip: [31.154.10.105] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB4204; 7:peyIlWkIzXEk9u3Z0EVX73HLwqEPGeDRlpXTi6mSIx0gN+vuJqT4PPhwW8JaLVVX/7DogtkNOp1UCXpdWYRFzR9meIaVdqND6S82qd6SMXuDRv9VEv8M2jaZhiDZE1lPrhOVj8fCgVWiq73UgVYRnWYzHLMkyagt3gx9UxGvDK2kLbazIt4twcmP5CUeepQbv9+3d4juteBYgeDmhZbrosnvajWqxb5XPZW1R46G0DItuwE13RETkXymnZQ+gNhH x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: ad6cef53-8cd5-4ddd-d872-08d5dcd665fe x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652034)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4204; x-ms-traffictypediagnostic: DB7PR05MB4204: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(278428928389397); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231254)(944501410)(52105095)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:DB7PR05MB4204; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4204; x-forefront-prvs: 0717E25089 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39860400002)(346002)(366004)(376002)(396003)(13464003)(199004)(189003)(54906003)(7696005)(6246003)(446003)(5660300001)(105586002)(8936002)(55016002)(102836004)(6916009)(26005)(9686003)(76176011)(99286004)(186003)(74316002)(106356001)(6506007)(33656002)(305945005)(2906002)(53546011)(7736002)(316002)(81166006)(8676002)(476003)(66066001)(53936002)(25786009)(81156014)(86362001)(5250100002)(478600001)(14454004)(93886005)(5024004)(6116002)(3846002)(68736007)(256004)(14444005)(97736004)(2900100001)(6436002)(4326008)(11346002)(486006)(229853002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4204; H:DB7PR05MB4426.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) x-microsoft-antispam-message-info: aFqZqI974qsLEnPZAkCfQ7ANAftLLd65ZXUoTVhQLBpvUFJitWORs8+MI4MDZP3+9DuFsHvjuoPQPKJ4DVK/xAJTcahTYbmBGQgDt05Qjvy80CgWpjfCv7lBYTIp7AHrRwDPTuL8Wziu67Ym9TdH72rajU9ZXz5/hEROUR0VB3tWJWhdHieYLbWmDo2f2skDXIilAxlG4a4f+3M5FqYSP03ps1IXzKyC1cKDCcCfVEQ4UYHNNXxvQ+/Y6dAhSWkMCyWPwVptWT0RzgrGQI0PDLVIzZ0gh5/Fz9hsq+CBcmX6SztQczZrb9dEyni1WH3+tqEk+rctpjj1bNUQVfGRbMthbcIxK245Jm4P3YsiY9w= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM 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: ad6cef53-8cd5-4ddd-d872-08d5dcd665fe X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2018 09:06:13.3504 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4204 Subject: Re: [dpdk-dev] [PATCH v2 6/7] net/mlx5: probe all port representors X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 09:06:15 -0000 Thursday, June 28, 2018 11:46 AM, Adrien Mazarguil: > Subject: Re: [dpdk-dev] [PATCH v2 6/7] net/mlx5: probe all port represent= ors >=20 > On Thu, Jun 28, 2018 at 06:01:54AM +0000, Shahaf Shuler wrote: > > Wednesday, June 27, 2018 4:32 PM, Adrien Mazarguil: > > > Subject: Re: [dpdk-dev] [PATCH v2 6/7] net/mlx5: probe all port > > > representors > > > > > > On Sun, Jun 17, 2018 at 10:15:07AM +0000, Shahaf Shuler wrote: > > > > Hi Adrien, > > > > > > > > Saturday, June 16, 2018 11:58 AM, Xueming(Steven) Li: > > > > > Subject: RE: [dpdk-dev] [PATCH v2 6/7] net/mlx5: probe all port > > > > > representors > > > > > > > > > > > -----Original Message----- > > > > > > From: dev On Behalf Of Adrien > Mazarguil > > > > > > Sent: Thursday, June 14, 2018 4:35 PM > > > > > > To: Shahaf Shuler > > > > > > Cc: dev@dpdk.org > > > > > > Subject: [dpdk-dev] [PATCH v2 6/7] net/mlx5: probe all port > > > > > > representors > > > > > > > > > > > > Probe existing port representors in addition to their master > > > > > > device and > > > > > associate them automatically. > > > > > > > > > > > > To avoid name collision between Ethernet devices, their names > > > > > > use the same convention as ixgbe and i40e PMDs, that is, > > > > > > instead of only a PCI > > > > > address in DBDF notation: > > > > > > > > > > > > - "net_{DBDF}_0" for master/switch devices. > > > > > > > > This is breaking compatibility for application using the device > > > > names in > > > order to attach them to the application (e.g. OVS-DPDK). > > > > Before this patch the naming scheme for non-representor port is > "{DBDF}". > > > > > > > > Can we preserve the compatibility and add appropriate suffix for > > > > the > > > representor case? > > > > > > There's one issue if representors are hot-plugged. The name of the > > > master device, which happens to be that of the switch domain, cannot = be > updated. > > > The form "net_{DBDF}_0" seems expected for PMDs that support > > > representors (see ixgbe and i40e). > > > > > > Now since representor hot-plugging is not supported yet, I guess we > > > could postpone this problem by keeping the old format in the > > > meantime, however ideally, these applications should not rely on it. > > > The only safe assumption they can make is the uniqueness of any given > name among ethdevs. > > > > > > PCI bus addresses, if needed, should be retrieved by looking at the > > > underlying bus object. > > > > Am not sure I understand. Those application attach the device to the > application based on its name, which happens to be the PCI address in cas= e > of mlx5. >=20 > I'm only saying it's not future-proof seeing what happens when they rely = on > it. Moreover this forces them to convert the name to some binary form > instead of e.g. simply checking RTE_DEV_TO_PCI(dev->device)->addr where > needed and only use the name as some kind of opaque identifier. >=20 > > > By the way, while thinking again about a past comment from Xueming > > > [1], maybe it's finally time to remove support for multiple Verbs > > > ports on mlx5 after all. This should drop another unnecessary loop > > > and the need for the unused "port %u" suffix at all while naming the > device. > > > > > > So how about the following plan for v3: > > > > > > - Adding a patch that drops support for multiple Verbs ports (note fo= r > > > Xueming, yes I changed my mind *again* :) > > > > I am OK w/ that. > > > > > > > > - If you really think this will break OVS (please confirm), > > > > It will. >=20 > Out of curiosity, can you point me to the relevant code in OVS? Maybe > something can be done on their side. For example the command to add new port to the ovs bridge is done on the fo= llowing syntax ovs-vsctl add-port ovsbr0 dpdk0 \ =20 -- set interface dpdk0 type=3Ddpdk \ =20 options:dpdk-devargs=3D"0000:81:00.0" \ ofport_request=3D1 =20 OVS users/automation are using the PCI address for Mellanox PMDs. w/ your c= hange they will need to use net_0000:81:00.0 to attach the port.=20 >=20 > Either ixgbe and i40e are unaffected by the very same change, or they als= o > break OVS, in which case there's an issue we need to solve with the > representor interface in DPDK before it's too late. >=20 > > then when no > > > "representor" parameter is provided (regardless of the presence of = any > > > representors), name format will use the usual "{DBDF}" notation as = you > > > suggested. > > > > > > - Otherwise as soon as a "representor" is found on the command line, > > > the new > > > format will be used, again regardless of the presence of any > representors. > > > > > > - In both cases, representors if any, will be named according to the > format > > > specified in this patch. > > > > Can we do the following? > > In case representor is found the naming will be DBDF_representor_%d In > > case no-representor naming will be DBDF > > > > Just removing the net prefix. >=20 > Yes, I'll remove it. We'll standardize on the naming used for ixgbe/i40e = only > once the above concerns are addressed. >=20 > -- > Adrien Mazarguil > 6WIND