From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0081.outbound.protection.outlook.com [104.47.33.81]) by dpdk.org (Postfix) with ESMTP id 5145C2934 for ; Wed, 23 Nov 2016 01:07:49 +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=xwcfZrLHuskYhYLyKaZwHDxJrZ2bqAmPuPkyjNPm4aU=; b=LW780T8mETK3NsL0Ope980HfBGMqXOiZcemDLyuRU8rFPB6ABfmlA0Z9nUdjfWbAvPtdYn74Uuxav7MzLDkupoazcf1uR9V0GS5ub7oIZdcnXSylpqDngaXajDxrJCNRp0qhGeqyBr4Q1oDQumN+uxsYauvvsONisy9SGesRXk4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from svelivela-lt.caveonetworks.com (50.233.148.156) by CY1PR0701MB1725.namprd07.prod.outlook.com (10.163.21.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.693.12; Wed, 23 Nov 2016 00:07:45 +0000 Date: Wed, 23 Nov 2016 05:37:41 +0530 From: Jerin Jacob To: Ferruh Yigit CC: , , , Message-ID: <20161123000740.GA22068@svelivela-lt.caveonetworks.com> References: <1479628850-27202-1-git-send-email-jerin.jacob@caviumnetworks.com> <2bc2559f-5e83-5deb-65f9-750b78a0254a@intel.com> <20161121170202.GB5717@svelivela-lt.caveonetworks.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: [50.233.148.156] X-ClientProxiedBy: SN1PR17CA0081.namprd17.prod.outlook.com (10.163.3.177) To CY1PR0701MB1725.namprd07.prod.outlook.com (10.163.21.14) X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 2:oeHWJ5S2wWL10/lHjTlnAYYswy9Xy9qqR+ybiTUKkTDfMUGRMenlttzFXFQzeRA2ACKqKFZ6MIkB0htGL2O/TVLlfFl6QYbPo0KX7qS9v6WHZFoftoPygTd2tY/KKPBN7h7N3aPBt8Zz1WfDQgeQ6ER+ATeJXBI9TJbKo8TKdso=; 3:eiRluT3ZH6hf4OINV8SBAuRVjHcH/oK/OtyJpXpa50OelqCU3THAqZELUGQbg1LJAU/LYjqhfPYM7Z9GEfNRuqm26s1W8wjKxU3Umu5kBWO2Ip9GPqiVt5Xhn3TmdsiCA9N6sZcnloS3t6R1zmC2zTwmFiSJNex1LLqCMDRmE1w= X-MS-Office365-Filtering-Correlation-Id: fe4949ca-7123-402a-d5f3-08d41334c0d0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 25:agwGYd0GCpQJYvpeVPwSNq6w2qXFdh7BW/z+PCOQ30hU+vtYvSN7856RxCZV27Jh6SLlkT251a0v/Yz99FxO1jWAtzIQXlvFXt96wHEejOGaz0b2Gmq6K/0YiQmvONj0ysef+PIuoLC/EBUYA3B8s+qKJaGEU3CRlZI7cIFSZsNNsxfStNFC1lj2abr1dvmI5NMAWdkqf0Aa9Kh6Lj87nrqy+XzPYvRD5Wa36tTJqf3k68zd7L9sRO+ATmVyOUFB8vxWyEFmBmlcxz9vT9u3ZbOdqx7c/QurqiG5vN73UTXdf3c5GF8h4tTAlSuEsDLodk/3xoEUPssowUxSneXm+3zD+qguUiFJg408l2LUEMJmz24ul4NGrzbsg+lcMq3QV5XG+Tc8S8dPfYiDO9puioAAi9WuHoFO20R/UTjEiBXB6VN3ddg1ocz4Ao0NaE15/vtL0CT0tlQiLxuSVzMVZtJmPFVs8uUw7SachjooNa1R9oTXCku/ou7SmFdEk0w9BRHHvAg282/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JKhk2WmV6R9VD4bM1VHGV1+5xjUJbJ+ZrUvILjy8KAgJ4Pon5EyHu1TqoY8yabpuJFkDIr1BpxE33YuaIjhXutJalYT4cj3dFZDVG1rI/VLnXc4XiwXTyAC9+TwJBxh/O9q38BlAGp7AbdhrsAMwnq9rWzYpSdMpt5JxSPLm+Ww6MpaIlBtV0cCY50wwfmqLsVzsTKmpyBRxBM= 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)(10201501046)(3002001)(6041248)(6061324); SRVR:CY1PR0701MB1725; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 4:n94Bl3X64XIGA0e8G55Iqb0t941oy+eoADPQiNJRKnt1Uc+LgQQOGLSg/Hl+Z4Vgm3o4NcgLa0G+XRCVq+mlsL+X59AYBQHFUiKKtqdYQUaWRDa9SHxYfKWP4FxmQ+nq1JbwMzPzLIrnMuDj7ALBKytyMdYRVy/oJkgv+IXgJd+R6ygG2KQ921l9JVZTYvNpAnT8U7bq3QMOZ4y9TCSQRp8X2aj8MhLSIcxMO4sT/6h5Qbadjy3lC3m1qdeJTd/x3ysAMTQOER8EjuB0igRz9fxiCiuxgWrsCoJcV5MHMf4/kDlBU1LrKtBmOtw/4jIspGh2r80ulvHFBrSnnoa3yT5zhwKSc9/AVPYydjvPoPo3oMeaiP9FR2eixfJ8JMp1hKBaecfgDUZaPRomjGIpVlwBvS6sLFbs2iQV54g19OAKFyjIUqUuVCn/b37imiEIKZY62b4afEanoGaz3F/3suKKOMOEuIl8LuHXrn7hBBtd0KhSogvhNSSXopj5Ij5HSy7TCS6WLNlFHASV9BW9Gg== X-Forefront-PRVS: 013568035E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(24454002)(199003)(189002)(377454003)(83506001)(23726003)(6116002)(4326007)(3846002)(1076002)(47776003)(189998001)(8676002)(69596002)(97736004)(50466002)(42186005)(81166006)(229853002)(38730400001)(2906002)(4001350100001)(66066001)(77096005)(6916009)(53416004)(7846002)(81156014)(105586002)(46406003)(7736002)(101416001)(2950100002)(76176999)(93886004)(42882006)(92566002)(97756001)(68736007)(9686002)(33656002)(50986999)(106356001)(305945005)(5660300001)(110136003)(54356999)(6666003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1725; H:svelivela-lt.caveonetworks.com; 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; CY1PR0701MB1725; 23:HdvnwD0/QStv/mUKR5MiB2GM6bETJ0V7ZA6+RGL?= =?us-ascii?Q?Z9sr39mgj/KQTDXHFFMajTItvoKZ8Hw57sKAbJKIuYhhBnIn8V2yRKGWHzCm?= =?us-ascii?Q?ZqYxU/vXtP3hLCd4mou83zPwyRXz3RtlW4SL5FtQMJF1dvYoYkpvRJ/r4Ota?= =?us-ascii?Q?ed9ixx4s1a1NktR1QduPnXKLMqcsnvDpuV9uZVOgro0a+NWFXdvdY+gk2CKO?= =?us-ascii?Q?zTju6s4J/3bNva2SjJzuiUNJ9cnmXLQYjoDdSbw55+noyVfcXvikNBI5a/cF?= =?us-ascii?Q?GIz/NJ5r3JWQCslEB8BS78gBQ03BAlxkLSEjTgnIKTc+3t0A7gtArukzI5u+?= =?us-ascii?Q?qeW2FZ+IvII8SvxnWWk97YQSuFYvm1hI9lDqFKC+LJjEhFnvauN+P9SS+eKl?= =?us-ascii?Q?yNr43lQE8t8eFomJtvgWth7xSdbnF4kHk5tucr9HbuaAXbVFIM7U7JnY4m1Y?= =?us-ascii?Q?0FxauVWnMgqrotvkCjk2ys5u+zihMwsd23YzQaUiBrusEHamMBwfbxGR/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.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2016 00:07:45.5065 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1725 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: Wed, 23 Nov 2016 00:07:49 -0000 On Mon, Nov 21, 2016 at 05:35:58PM +0000, Ferruh Yigit wrote: > On 11/21/2016 5:02 PM, Jerin Jacob wrote: > > 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. > > My concern is, this may effect the applications that use "--vdev" eal > parameter and has an assumption about port assignment. Not sure. Application expectation on specific port assignment is bad anyway. But in any event, what we do with exiting ethdev bond pmd failure. > > And if this breaks any userspace application, does it require a > deprecation notice? I am not sure. Thomas, Any input on this ? > > > Let me know what it takes to make forward progress on this patch. I can > > fix the same in v2. > > > > Jerin > > >