From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0067.outbound.protection.outlook.com [104.47.36.67]) by dpdk.org (Postfix) with ESMTP id 1EE002C2F for ; Mon, 21 Nov 2016 18:02:11 +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=rfDozflROFNfVpIMQ62CNkjvu8ohws7mz7JNyyEAS2E=; b=aEB/h0vcoI7e1hDwZ+FzMTssW77W+YpDWR33CnbDjFvipk+B0LbKjCrIAwLu2Qbq66R5Hvcs6IwX3L705Zc6JOJSMcZSfIfXZlRxeKYjs4ZHl/gPyTw+IFnc8ASc+bChRnYcb12eKg/+CNlh9jfXASSHE7/rNrs3QmBr6f9PNz8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from svelivela-lt.caveonetworks.com (50.233.148.156) by BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Mon, 21 Nov 2016 17:02:07 +0000 Date: Mon, 21 Nov 2016 22:32:02 +0530 From: Jerin Jacob To: Ferruh Yigit CC: , , , Message-ID: <20161121170202.GB5717@svelivela-lt.caveonetworks.com> References: <1479628850-27202-1-git-send-email-jerin.jacob@caviumnetworks.com> <2bc2559f-5e83-5deb-65f9-750b78a0254a@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <2bc2559f-5e83-5deb-65f9-750b78a0254a@intel.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: BY2PR21CA0041.namprd21.prod.outlook.com (10.162.74.179) To BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 2:F1dziCdZwgkp8ZXXd4oslfbbkYbqmTmlcYgBzHfSjaDOgB+Ej5zG3BIorIUOPORsaUpBEq5seZq8nEYMIYFiuKZtj2JtIdGWyFSooyXGvYSsrhlfYiLGjvGz0gvDA15klM2fwiDgaNsP99ae+pegAvZ202dtpMmF5hdxcne1zOU=; 3:TKlVxJ+UT7tNqvEjwkl+hvfFTCv1dq6ob1PL3h4S2LTgm9P2Bvg7roxMyuTbZqRK6lFX8xPUwYIxK+aEtMjGpNSJOJPzuKnJQxyuWnO/bdF2C056xlApWfXZZItI69B42uAGd5ipNRd3Zi5YXyAGQzRMN/M4iOtT9oc61HIwN4w=; 25:CxdBUCNtfslHswy9PQ/qkG8KZlRsMcgm2nJua2dJ3KbCjr8s8Q4Jix3mxmcuxSdrt8JTfVNPS/mdwRaWO+qJNrz8kmAUETCkrtUgyv1RFH4gr65GL/ZIOW4cVy4qiZ5ZLNoaisHcxjFZyV7Zv2gn23XJgsu8Iq5lCx9qK0gVEXXvX9Yu2dVW6hptsFDvQQ+pKJ4LvKaRrICmlRY6bbvO8Nw162Sh0vXFC3Rsuq5jWj+sQpNJYpGvb8KWs2EUMuOHHxgYz8DZMd182BXa98OpDkOQpkEezlt4kW2SxcjIz0EiCLDNMQa30r/ST+o8l6X6QrdzfZeX/qfHKH5Lau0iUfKZCV3FkvWXR2Tiz6EXgkfJ8yYs9Jvhcs4f3EVEbnptTWkJTEuVwLcTq0fJOqKGn6IMXnEbiLyVJy44tmvPsNkni774bP7z7cFoTu//3c0cBJrZdPiHUapddUJrf5FKtg== X-MS-Office365-Filtering-Correlation-Id: 2552fa31-fff5-4c6c-3418-08d41230209c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 31:XqPAcv1uQs+W+JRO/ZIL5hs8pBAYfN1MOoJwKBd5NEEy9mo76YcegHRo4rQ0Cn+b5EDIBunyMW3e0COajxSODnVrsawz70z1moaUdfzhC8NUR5WMPAp/02qgqqMn/fKZawabZXqIZbh/7k3QgTvCgfMwlx8eC4cli7zbfxHBD6LE6TC9fbg6O0hrZUpt1stqOBx1NlB4Rb42wpCkKjtZOA69vB4Y7vOMRzgKe5HGkG46+vGxkwWDeW3pIj2M2tiwW3C9P0iexgpfzvJj88l65C0Q9X9RKSAwb+xrseNdhfM=; 20:zRLgwvAWa33MHRgzrYkzDBTQvfBwI69fQb2L64j8wB506ZEtUFy9e9Hpw49O5/dJEsYDCF2hCGlO+nirKY5SppEUpeeXmbkA9m8mNZQB/Ssg7Y1vhwa/Nwq7Q5VJRe5oy6P6aLypo6mpKUrjjYYdzC1tS6dZS5wg9sTL8kwC+dQ3tt1nB9h3PCc+0IbevPLBYjKmgJDvV5K4hBVquwVi3mQcPhisFi9vtqoZaKYqoabo7u3Y3jpITDRiYB90PL8murOubirY3UBbbSSmE+4moAwZUAEkU7Pc85yFBPJ93tDudOpAwXCqTFpkPBb0fgHPMztgKNDf36vF8llEJgE15T0Owl8+fc9WCpZFFbzrirzrWDEVCe7lETPA1jEEJ8oULaaM/yrNMzqBQteOyX/u+mh/p8wCC5YQv8xGyVZ04yvXruI4egsl736hTYFQr4/YoWxVEBkyd9Qklvlka565a+ayKJxrz3K9yMytphhaxB+/ZseeSmu7KlIFHVhrzMcH5IS659jw97f10AKyBiJl7ZhACh/0Hko6aNmF3+CUI100Rk+ghlvYSAyQhCZrZkMDphmdYlijl611nObrrRyyb4K5dJgMlUmbkZknmmfGEaU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040307)(6060326)(6045199)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(6061324)(6042181); SRVR:BLUPR0701MB1716; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 4:qhm2VrI307XprGrIno6+Nbmv/8UTbkCZqB95YCtEgnVxS7JKh/cYtQwctBSaW3QlGFjq/Nzrz1jps0iUlMfxMeBG3jbZRoAPIJNxyZ7jxsTXme7OWRCZnJzMFAjQ/qh5EISo8dbMBrP20qy65Ub7nwynGEF0FMpDQ1oZnYgi0VFWGDE8KGyXnqCR9MPBY8vewv3IjtXb6ETaEWLMsh3EUF/6B6YYRO/h3MuDzxgQs5g7TzqPhd2bP2Z85mcaUApW3BeyXXUzWFTGTG4xAQWaWsevBSlWB7pAbD2ys77OXFq6/rkUCcLOpgoPV9mJYOD6HZ55VzE5DmMwgtuZcK10Y8yJPJccnnEr5+1wACxhxcG7Vlo0X58x9Fhx9pSdwY5Pq5IpPEXDU4kRdaghaQBPck/h6fklDC1JH9/1/cAHMKUJvy9b+pXqU/QQeIpQi3za9xRMmBhrCpAY3v80fnIggdpQOG0+idOUpLcpmaZ/RDWsk9/ykATvq4DB4LW/LR6cozx/2NLdOVYRK5iD/Ex/DokOt0A35QrC25PMRHi/Ifg= X-Forefront-PRVS: 01334458E5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(189002)(24454002)(377454003)(199003)(5660300001)(77096005)(69596002)(81156014)(33656002)(47776003)(23726003)(81166006)(97736004)(54356999)(50466002)(50986999)(92566002)(42882006)(2950100002)(66066001)(6666003)(97756001)(76176999)(46406003)(105586002)(4326007)(101416001)(6916009)(4001350100001)(189998001)(8676002)(106356001)(42186005)(6116002)(3846002)(7846002)(110136003)(53416004)(2906002)(68736007)(229853002)(305945005)(83506001)(9686002)(38730400001)(7736002)(1076002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1716; H:svelivela-lt.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; BLUPR0701MB1716; 23:AKcuDZ6rFy1F96Hzuq5sEh0u7pClRYDabOKmgQs?= =?us-ascii?Q?E3Kt/wdMdu1PDeXzMUMPtv0rntAAnp62drZXWsWRQbw6ddVVsk/XQNkaGjb1?= =?us-ascii?Q?eFmfK86Zei9VCkccZjeNQT3bU+hCFM8o0xGgYo+3/NQLYKubzsHDIlyuRH1d?= =?us-ascii?Q?A6jmcebH2EidBJEQzJ/gMFwJ1MFpwRFK0Wwi3Pnx214nOGYY2RLmaKKy+hPK?= =?us-ascii?Q?7BXmdWaeGVZWkUfwtBuy0ozq0+trNXkbzpzPEDGkGESYq8kGzmI3St7xveTV?= =?us-ascii?Q?MIgwwavNIGPoCOlbqN1RLHTF2+GKTen2u6IdxezNFj9b3j17Lonv/dFnH2wt?= =?us-ascii?Q?EFPbe2bp96PFSASxFOMgix1tTOxkCfCkP7MO9FaFriBLN1HA/oL0BHdAC8ax?= =?us-ascii?Q?esGZBsJ6C/AMMKhfSP6Gt82c6j8XZHc3YG3sBHZLpB+Uc7P7pkF9Lii7FtFD?= =?us-ascii?Q?BL58ijKy2JfcXWI/uJSZT83SCQbjhhuaUHx8EIoaBiFhuYrLv05X7RhrSK3w?= =?us-ascii?Q?9G3TZLFstmaWFfUCNNn25k9iFqT1mQGMYp8TtdpxJzUvLNf3xhpX0TjhEzWF?= =?us-ascii?Q?ZPu3W9ZIDgDE4szFzREOz9NsgrJcVVgMh7rCmvJq8CggWRlpBW4VbN5tb1CF?= =?us-ascii?Q?/ykyPK47NycwopphQZcl/fORWksD9Yghq9CP8u1j5Xqh3Fi5Yelsfr9NHfjc?= =?us-ascii?Q?ul+VEO1poNxjZ2xdsWlxKSODsN34DJ7aYUWoAZG+qkexf+UpjyDyyeIJE84h?= =?us-ascii?Q?VtAIjJqY9fzOLDNdBeohPv49vT95WrN1KGQReAQiwdMvwXF99XIU4tpSaj31?= =?us-ascii?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KdQF+YLWYJCfdzH8eWmMscJE63v1VfOtZAB0wpKG9odAA==; 24:Vwuh90GKI2tZgDxmjb2zfsyaOT6DmUjV2HNhShDSR/FEi3y8IkXpWoeMmXxP5J2dsGk5CmO+imiBkwqDIqd/+ktIEcEeJenJvAgURZySrao= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 7:aQ7PNglJhW6zlD1kcCUQR3H4grN6ffu92O4I2VQtun8AOGdfU/adRq74gKxuOOJukJBs2gUbibsRPMOuhGmZcwxv4Hxt57+yM6Qi1/Z5FWY2NbeAusj1z3yQjo+VriDEadKEZl0NOXkvw765ZtpzCaoG2DQL4kg9XfawFov2wVzCx6M/gjd2KLFkM5Xyb4MXolYwfP0pfm68lTgziUjOHLtMfgRPtOYYhaG4qgoCUzitXIAZUK2jv1ED5R7FJxxxUDSQ00GE2iGPPMQ75RttFz1jYYsXGAg2JRmPfihAsG5MLqkDmcaFql4tyqdlFIuUyuZJcv8N68zhfXFrdLe7TlFTFhn3pjaA9pc/epuo/bg= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2016 17:02:07.5920 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1716 Subject: Re: [dpdk-dev] [PATCH] eal: postpone vdev initialization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 17:02:11 -0000 On Mon, Nov 21, 2016 at 09:54:57AM +0000, Ferruh Yigit wrote: > On 11/20/2016 8:00 AM, Jerin Jacob wrote: > > 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 > > > > Signed-off-by: Jerin Jacob > > --- > > This changes the port id assignments to the devices, right? > > Previously virtual devices get first available port ids (0..N1), later > physical devices (N1..N2). Now this becomes reverse. > > Can this change break some existing user applications? I guess it may be effected only to ethdev bond pmd based application, which is broken anyway. Let me know what it takes to make forward progress on this patch. I can fix the same in v2. Jerin