From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0057.outbound.protection.outlook.com [104.47.33.57]) by dpdk.org (Postfix) with ESMTP id 162F3282 for ; Wed, 15 Feb 2017 18:25:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=KZLkXt+LOH9fw9Bbj20aYYaPyepcTnTT+B9xA2OmrSE=; b=FhBp/ttYpuIutarj4M/fS3jgVquzHJkdM/cd3SNUXRgXvVW7G+5cCljJ59jYLDFfHW1nIvMQndxs61cJ3TfOhxH0Egzy0ogf5CjyxNROhfuMFJjiovVBqO6IDdu3oiKdRDtpUYOdfeefjRlsHwZN8KJis/7zVy4Lsu8Ju+0Wbo4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from localhost.localdomain (122.171.169.88) by BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Wed, 15 Feb 2017 17:25:47 +0000 Date: Wed, 15 Feb 2017 22:55:31 +0530 From: Jerin Jacob To: Shreyansh Jain Cc: "Wiles, Keith" , Jan Blunck , "dev@dpdk.org" Message-ID: <20170215172530.GA8119@localhost.localdomain> References: <1487152929-23627-1-git-send-email-jblunck@infradead.org> <1487152929-23627-4-git-send-email-jblunck@infradead.org> <485202cf-3644-5ee9-45b5-d443569bf5b5@nxp.com> <7843A545-14B6-4CD9-9689-ABD123B85890@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [122.171.169.88] X-ClientProxiedBy: PN1PR01CA0036.INDPRD01.PROD.OUTLOOK.COM (10.164.136.136) To BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) X-MS-Office365-Filtering-Correlation-Id: aeea606c-69ee-43ef-f514-08d455c7af6f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 3:sICXDnEi8mNXNfslji4NARjK2VsjVf/0Qak2fY+yKkVK+RWGrMwUDuazBGdlb4kZDxzjMR9a4Z9zFOsK0uul5uiQnnxNWHe1xI0u+rSfcMqQquljoKvHmo4VEHf1bOHUiEUzpoHl+ZrtMfiTzYRAxqK5Vw1ztCmeSpbb6P3a4k+uzjfUYfhvc8yEZSnAbapisl0jmSUA6aZxWeOLj8t+vMtxdxy4dkTTZPlodNWZFjcajei7k29m+HaX+BLs/FawLJDUfZoJCosd9j/U7OIsxQ==; 25:QCLh4B1cDXhc5CoZMnzab2a9+RgdewQxgDAdruOoONZSEb1ngI1yTMInzQIvsWoScas/fiPan2WucZrACWr7NqCArvau6klKWbMWM0PGmU33eG48WHv5qr5nBbqt6VPHwLo/Ec+otPZfSc1a0IajswvPPrXLztpH2RgpiQ9r/84Eb2jPeJ2tS1ZNM6TT96yCZRuRzevizPmCOZvzF0ahwoSJ7MikPEhm7uqK5JEXKcJlb+vNiI1uSerp2OUApqnMbRaKAE6wG0bJWORy+9jFPHksF0oUggncXO0a7B31xSqSuut1i0SOh0t/tG+UuZbSitwRxK99AdQehpIqjyhmKk5Yl3ENsMOCAqjlVCOs1mNptKkBF42VLwCnOWJ9ltjM6fpe0gcyojtY1wl1VnroFrRq6h7PrG2O0iJGzX+ZsGqOIRSepz2sc6IlZb8G9Vyk1HawkhOblN0rLN6nZhDieg== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 31:sO1p+oap72HMesLyzF4TDwIfS80RYFydlDx6JmTGm1NIuPOTRnNOt/skvYNiHL93s73gUL1aSv5AwPmTVDUbWNmXw3TGqAOrBT6LAIPyZmSgY6AyEHK4WhNZIRdAkx+P5cLCt0dOLtXHn1DSGQf5eEJDDCgK5pnTAIMeeb/hOCMh/fIgIpyKz5q3mcxgO8F1l+0bi043VRgjO18HNhOOKMaJZ8NAceZfLJYetDWbjmlweK7j7mUvSu/p8eZyvBG+bEUkIgJTCgMaGxMnyjkBKw==; 20:aUZZfj0HfJNcn9V9eIy+Hw7XNXa1oEfgx/SC2uF+XmMNy33Wzfqj6FHjwig6N/xxPeV7wo80m6lOPHvdd2YXAO0Tq9rgH+oxEhx/1b9+rP/SrsfnBuM+cei1FHArfpoG4wVNh2tmv7vv2SM1OUH2UxSKqZnBocKhXSuaMTCYLfxdZ/HT772a84jaWpBzO3D0NZlGqvvsykxrkDXeoQ8L0Z00XuJ7xwqqfP9fwqymRmoz02zG4J5ROJnFhEQGfuuMMyrZSkN6PjFCj/+TNPm6ci7BzYRgBzV3Amwb2YvwqtKfsO9Gg4xCdmAlrOeYtAryYIQO3nW5QFdZeNRlQXvEX2ZoekPzvmNnuko9qYOvqDYam5Z8bWJGdqaXB3BKNWRqlGIg3tKyoV44A8VryzcPw0xRsAohZ214+U5/+gXRXWzDmYQDobWZ4NHnbbiy8g4VmtcPfKYjAnc/pdMkqAH2oohFUeh0FpeBZmWHwPnJXHUKJMIlzXEA6q/GMAyVtqgT9UDiTLzfip24rPIAYMKH0PK0cgBZtCB1LnbId+POZhREkWhWcJnzQJ7YQupa9PzeyghRj+1Pais0OUl7/pI7J0n5Fc0ec0vH2btXGa7ebTA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(155532106045638)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123558025)(20161123562025)(20161123560025)(20161123555025)(20161123564025)(6042181)(6072148); SRVR:BN3PR0701MB1719; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 4:lvQCFEg0jSP/IsoQcoXqRzs/iXTA3YAig9ScYpIJd8ZM7qGpyVXzP+79v/TGeKazNrC1zKy+sgStBjO3aboI3KGzSDy9PUY/e8Jaz2NnMpkfQ6qZuv6Qvr5Xk7NdtvL+WXEb1qztW2SgjUJL+UxPd+gE8DDXeLoKsurMSH0eHYhNARolgLWboyJ9bG41qCL08Mwegnzptn5P8TjI1Jq8GoynInZrmKmMjBLwHIEKj1OJBZqn4G5DBL4U+Qa5zOItDBwHCI6ga0V9OXU8UOIIFrVlix8Y1cU9vcjQRv36cbwO3+DQUHtIlMHPLuPfoC7FO+qKoRGN1PdXMnGjvUzC+XhlVV/mnchW/uHfGF+PDmiHwSjScikT0mLIvTuD351bvq40981Xbj1pbSJQ7yW8d3h8EQ7lL2yswM5/NyhV9exAskHbAWPDz9w6+WDNYuJ3hLIKLXZ0ta5xvHRuCO5Bmzh8u4TYNDjOVb0SovRTw+arty+H2IOeg8oibm1xNNbCNrvSe5tkaNFoF6ug7TMQkhdCXedYV1CoZEEBIYgtlvKQC95NOZEGc07CkAbCq50LO+K391XuS3uWpUPPgg7rU9AMLGYZYGyd7eBZkaw+tXXKRJE++Qeiy8KnCfxB5Stwusj1EiRTmog1Fa5Ugknb6fAxXL7lBhXNekxSe5kVyIEOTMk3VmZpZP/gfPJ+lc0w4QlGF0H13Fqa8u77yLkIa/GYuZxKAdQ8w5KZGMdTjII= X-Forefront-PRVS: 021975AE46 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6069001)(6009001)(7916002)(199003)(13464003)(24454002)(189002)(377454003)(189998001)(97736004)(81156014)(5660300001)(93886004)(25786008)(229853002)(6666003)(110136004)(4001350100001)(106356001)(53936002)(105586002)(1076002)(42186005)(23726003)(6506006)(389900002)(54906002)(33656002)(6116002)(3846002)(8656002)(9686003)(55016002)(6246003)(54356999)(305945005)(7736002)(68736007)(4326007)(50986999)(42882006)(81166006)(2950100002)(50466002)(8676002)(6916009)(92566002)(38730400002)(66066001)(2906002)(101416001)(76176999)(83506001)(47776003)(61506002)(18370500001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1719; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1719; 23:rSJFi5Ij7sA3Iei/6eDEt+Bv/xkiPBi5Qox3sXl?= =?us-ascii?Q?+z8baKMRA9iLukNox3L7xX4PPlIsiYM36PsRLb1cXuRMYp8P9xFtVupL88Ud?= =?us-ascii?Q?7FEAux0dOylQDgUd6Q/XqwamJ4j0+hta/U426TAyZR16JqUqsKUogLwpXNbR?= =?us-ascii?Q?AijcqgKDJS+UNIt/ZhrxpE+HciRHTJ+ISTKzTC/RvrAfJT/cQlp4yUBQVtur?= =?us-ascii?Q?rgWWSUtaJTMx/i/3MJ9XaQ4lAmkU5V7VmGinGXohMsDUxASg5Yh1Yo5xf7Xp?= =?us-ascii?Q?eEQ8J9Z9q/1odBvxWd+edd6afKVjJZH1KNiRkgCUfizu3jVAj04BvLjwZ09q?= =?us-ascii?Q?mOSi1ITCmDSVpuimV9dr9N089P+s6VnWJjj7p7wpOpV3SF1G9/yuGU0UAWgF?= =?us-ascii?Q?jGiQb4jfXDmtcmmF+WZll2JerFDAdjagQnh7bRu5IWbDSqVSJlyIimBgsH73?= =?us-ascii?Q?sYUx0QDvegSW59spjjX2wkrte+SsnbT5k/RqzArqmZHHZcT+3r+tOU1jI4l8?= =?us-ascii?Q?4/4U2nuCZSP/OST0b3doMQsP52k+KtiVeLkj9umbF5Q2SF1gRAhMuUxp/i7v?= =?us-ascii?Q?75XH6SNpncewPEOlODZbPoi0oUn8U5H/kJb7fmwKKEmIOMpx5nbSAk8TbWp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4D1llB94VxCGs0E90HZLF9hF3jIKwzIL2x25PB26RFxDBSZxF61nBGa0CY2Z7DzdwR1HGCQEIMYQyFc6R9esx1FPez0YrxseTdSO+dgga1iH77z56fyzqAM+lA+Xhu+2duLN3afVyOoilnil8r9+RbtC6UlTIJ6T4ES8cJfjVn9Wp5QFgNnKrnXThA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2017 17:25:47.4397 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: Re: [dpdk-dev] [PATCH 3/7] eal: move virtual device probing into a bus 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: Wed, 15 Feb 2017 17:25:52 -0000 On Wed, Feb 15, 2017 at 02:27:47PM +0000, Shreyansh Jain wrote: > > -----Original Message----- > > From: Wiles, Keith [mailto:keith.wiles@intel.com] > > Sent: Wednesday, February 15, 2017 7:53 PM > > To: Shreyansh Jain > > Cc: Jan Blunck ; dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH 3/7] eal: move virtual device probing into a > > bus > > > > > > > On Feb 15, 2017, at 8:15 AM, Shreyansh Jain wrote: > > > > > > On Wednesday 15 February 2017 07:41 PM, Shreyansh Jain wrote: > > >> On Wednesday 15 February 2017 03:32 PM, Jan Blunck wrote: > > >>> This is a refactoring of the virtual device probing which moves into into > > >>> a proper bus structure. > > >>> > > >>> Signed-off-by: Jan Blunck > > >>> --- > > >>> lib/librte_eal/common/eal_common_dev.c | 22 ----------------- > > >>> lib/librte_eal/common/eal_common_vdev.c | 44 > > >>> +++++++++++++++++++++++++++++++++ > > >>> 2 files changed, 44 insertions(+), 22 deletions(-) > > >>> > > >> > > >> [...] > > >> > > >>> > > >>> diff --git a/lib/librte_eal/common/eal_common_vdev.c > > >>> b/lib/librte_eal/common/eal_common_vdev.c > > >>> index 7d6e54f..523a3d6 100644 > > >>> --- a/lib/librte_eal/common/eal_common_vdev.c > > >>> +++ b/lib/librte_eal/common/eal_common_vdev.c > > >>> @@ -37,8 +37,10 @@ > > >>> #include > > >>> #include > > >>> > > >> [...] > > >> > > >>> + > > >>> +static struct rte_bus rte_vdev_bus = { > > >>> + .scan = vdev_scan, > > >>> + .probe = vdev_probe, > > >>> +}; > > >>> + > > >>> +RTE_REGISTER_BUS_LATE(virtual, rte_vdev_bus); > > >>> > > >> > > >> Does it matter if VDEV buses are registered before or after other > > >> buses? Either way, the callbacks would be called in the order specified > > >> in EAL. > > >> > > >> > > > > > > Just ignore this comment - I am misunderstood something. > > > > > > But another question: Is there specific reason VDEV should be > > registered/scanned *after* other devices? Is there some specific problem if > > we do otherwise? (I think this is should be done, but I don't have a specific > > reason). > > > > Does the bonding driver which uses physical devices need to be registered > > after physical ones? In Pktgen I noticed the vdev after the physical ports > > and I could not blacklist them as the bonding driver needed them, which > > caused the bonding ports to have a greater port number. In the case of pktgen > > the bonding ports were up around 8 or 10 and caused the display to not show > > the bonding ports. This is really just a usability problem for the developer > > using Pktgen. I would like to see the vdev devices first, but as long as the > > drivers (like bonding) are fine with them being first. > > Ah, now I remember - there was a patch from Jerin for this. > Probably he is the best person to comment here. > (I don't have much insight here). commit f4ce209a8ce5f416b61c76cee773bc54749e2048 Author: Jerin Jacob Date: Sun Nov 20 13:30:50 2016 +0530 eal: postpone vdev initialization Some platform like octeontx may use pci and vdev based combined device to represent a logical dpdk functional device.In such case, postponing the vdev initialization after pci device initialization will provide the better view of the pci device resources in the system in vdev's probe function, and it allows better functional subsystem registration in vdev probe function. As a bonus, This patch fixes a bond device initialization use case. example command to reproduce the issue: ./testpmd -c 0x2 --vdev 'eth_bond0,mode=0, slave=0000:02:00.0,slave=0000:03:00.0' -- --port-topology=chained root cause: In existing case(vdev initialization and then pci initialization), creates three Ethernet ports with following port ids 0 - Bond device 1 - PCI device 0 2 - PCI devive 1 Since testpmd, calls the configure/start on all the ports on start up,it will translate to following illegal setup sequence 1)bond device configure/start 1.1) pci device0 stop/configure/start 1.2) pci device1 stop/configure/start 2)pci device 0 configure(illegal setup case, as device in start state) The fix changes the initialization sequence and allow initialization in following valid setup order 1) pcie device 0 configure/start 2) pcie device 1 configure/start 3) bond device 2 configure/start 3.1) pcie device 0/stop/configure/start 3.2) pcie device 1/stop/configure/start