From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0072.outbound.protection.outlook.com [157.56.110.72]) by dpdk.org (Postfix) with ESMTP id 052189ADB for ; Tue, 21 Jun 2016 05:51:45 +0200 (CEST) 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=uLv50Pf+lATYbX9bFWR9Eh2xYeZA46MeWUMtNDky4uM=; b=J9l9yZm8jFCx71mZ3L7qfd/4lgWnLYB5uba4qN/byAGvDlUaU7kGo9Y4CbG/dkKR8fhAUVY6zHAgmr8F4DnH28OlPKjP5Y9daRF//BUm45ZfoWFi5NdL5v4BGJAIkeGiSrw1n0o/wil6VzTvMPYFb8/IjFkl7M9yeinXdPy1foQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (111.93.218.67) by BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) with Microsoft SMTP Server (TLS) id 15.1.523.12; Tue, 21 Jun 2016 03:51:40 +0000 Date: Tue, 21 Jun 2016 09:21:25 +0530 From: Jerin Jacob To: Stephen Hemminger CC: Wenzhuo Lu , , , , , , , , Message-ID: <20160621035124.GC4903@localhost.localdomain> References: <1465191653-28408-1-git-send-email-wenzhuo.lu@intel.com> <1466403870-6840-1-git-send-email-wenzhuo.lu@intel.com> <1466403870-6840-2-git-send-email-wenzhuo.lu@intel.com> <20160620091410.GA9323@localhost.localdomain> <20160620091714.276c186c@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20160620091714.276c186c@xeon-e3> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0023.INDPRD01.PROD.OUTLOOK.COM (10.164.117.30) To BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) X-MS-Office365-Filtering-Correlation-Id: 45ded91f-518d-48a1-fa3e-08d399875c1d X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 2:ZShaDyIkvRdIZjXNdemWZKKpPKCnXFqsQcZRIpnBHMpnZOaREN1HkAyDDtqFi8yTatRmTzcvuREvUXInKZoTbaiD7zXOfntv87FEp0Qizo8VihaDeAqUhVfIRFHiPYX70PKxW3LvMhbhqase8dLY46jcO2iiyUtWkKDjmFf43KH9+EIFXoWeFSwiVzfuicFs; 3:eMXF002EeUqx2g3KfUHHs7MzS/QRo4SY9Bydp+xiNJw395Om9T7o0hTgIFr2ChfGAEjfFxpJBJuqWtaQDM1qbIGug6bHAAxXwj/HJrkENlBeQYHgYzIOlhoMRYa+ypVq; 25:kI+9uvTd2pSwMifGxXkp18UpYX/TJ2cd3m7kKoY6awHbp7nzlAiuheZbWxiUCXtCiapNdJigxZ+iZ63lFxCqBXFAWEVSGWuMA2reIGcWob2xaRsTP9fjxIaogSbiyyr7XVgjAOZlUZrdiZnLpzTyeiwzsx+5aPxgvIoFQ0ozWBAslor3sqznEAISkEancjL41LVD58wtiToO/QLqJRyn3FCi0z1pOIj9FARI9eKdBQN7ANfz8vwhU7K/akQQPiNvHKrDKJH4aXGd8rq4GhsnK6oH1zd4n73ZFkJyTe2Ln8AjnxbmOgxXY8TMFZQwsRYcc7+JWRqZWWTDKX1qUlGoJmOBk6ZSXI63yN6lSIolWnOyZ7OnexA+VsFYMayk7Z4YFeaVHDOSrZuFwWyS7Bo4b5Dl1ab7WYM2NB57OQDvgXI= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1718; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 20:MggwhF9X1Hy2zZFzgGf9ruUiCpTTGQqx6lYW7uBEc9aLNlLAM83wVto5XYJEjUV+ACoLHUgFrnbpqTFKBWgtjmfozYtIPp+Z34bTPQ70PQyDKm7YCQAndH9ppdCRhyWf5asWnybptwP0MbOls8+X85T8CUurdMBDnbUnR5YPauLCZi9/TxA7ozr16T3eG/NxmH85/kbO6kNee0ZK00+PvHOSPC5XOvvlpatrFsib1EPYtpuR41aROU3mPw4ywUcG9cKbbrvqllMc2i2RgneCSDsoDHaYWEC//hwwgKwHJaPs/nUCCtTzs1E4myapWoqAHiLogN5KrdMrN0MXxCkY2QPL+4OY3T5uDSbBvUYzH15TamiEnPOT3+XG/twtw9qxTKuuxc1OPHMe5T7IGoq/EU0d+e/rsPrVmDSq8419ymZve+2Onv/dX+k7HYJ0c3BZu/ju9Mk9k6R07YJTxxQjXQVUIYRHBDdY4UT8EawgOqGp15Z4r99lOvZr5kJdd7wWF+PVnrkdXrkJkB/oKtv/EkazxEmjnQyhG6/U2rIwCr6pMI9w42QP5W7s+qe5GELi5S9IoOxYh4wj6EUX/oIjdg3oHM9Y/4obg3YlsromXSI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:BN3PR0701MB1718; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1718; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 4:gkME4brHO1W6S1PmBv1j8PecT6nRIqYvy7m+YTlEI+dM20z2jzh7fjUXw/f8uilaI7IU4M+nrYm3UHdz6av384sL13utlqu9zV7HjbqkqAyOGv7EA7K1NbbH4K1ybYDTwm6aRCMP431qfZBdDfI2MgYcv3iQVNAOpoC7dGRlkQuVmol8Z6daMwGQjtUU6+fHblgARMjTMh+i9NKk6y9O8mIs3jtxsvsmlDcmVQBzUc3uTwEnvEwRgXPpRN/UemHSk/nJvwnFtTTnaYs7TooYQnl56n2kWpXBxRxpd5A1g3wKLqPBMc5hicHkPQ06szN6vQBXe66m+lS+SnFzNV9Rr6GWBBKrPD8F0Cyp4x5F06/vyuBhpUnmJg2EgLcdrMti X-Forefront-PRVS: 098076C36C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(24454002)(189002)(199003)(76176999)(54356999)(2906002)(47776003)(77096005)(66066001)(50986999)(97736004)(4001350100001)(9686002)(4326007)(101416001)(586003)(93886004)(3846002)(42186005)(7736002)(1076002)(19580395003)(23726003)(6116002)(189998001)(110136002)(19580405001)(46406003)(50466002)(92566002)(61506002)(7846002)(33656002)(83506001)(105586002)(81156014)(81166006)(8676002)(106356001)(2950100001)(97756001)(68736007)(5009440100003)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1718; H:localhost.localdomain; 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; BN3PR0701MB1718; 23:1jZCpBdZoVRtfj7oHDvmlODiY046aOSeuv92b3n?= =?us-ascii?Q?kVgSDZMwtQ+YEVMEfXsrpYi84urMck6lXgCdIebr4ToKCO4H/H/9M0p4ypnK?= =?us-ascii?Q?HxzaF8HkhmSMdypO0f+eWB/DcQCM8p7r/1s5iAKrj5A2qFd4gBDead3FvXaj?= =?us-ascii?Q?JvcS3kglSOuj9vPBiqGyYcaiVaIfG5Vq5jWoIg2kokSPFsgEV5gs3rM6ALW4?= =?us-ascii?Q?Xux4jfAZ+HqaILDO9i4Ll7Yf+u0yg2vjIkb/NYMAOuj2c2Sp0TKD7Ztv654l?= =?us-ascii?Q?hnVGjXDUu5cm+hngogsSeIWXvrQwrNkNLJHVPLx49sRLxJTAsotdm15PpJv+?= =?us-ascii?Q?vXhmAtcjLo6wl/wfuHAzkgBsJ0aUKAANzFCNfU9gShl+HwSRGeLYTJndA1Ex?= =?us-ascii?Q?ZVI3afok5A93J8w15QZTFv+ne8FqEbOLJ4kbwH/6XfkmIPZL/LviAkJD849e?= =?us-ascii?Q?zm81t3gGPdV05gfnr7s5w/lgMY/aMEZdD7p4t22oBn0XqKwPmxMSb4+GxYRJ?= =?us-ascii?Q?+VZ9CDVtUvQ/2CFhWRWv/Ew5a412Pwkg0O/o+vXcTgK+XQEOSWaa5JiC79Pc?= =?us-ascii?Q?8NepGiSVrxd6se//ZLk+HNcX83xnqiBuiMWjGPkx6poAOCga1CwX5C1RlKCH?= =?us-ascii?Q?aLFyul90YDPuhJsxmEaCftOrXsvfXhrYpFiEamF2CB7sHc1cy0TCt2zGCJl2?= =?us-ascii?Q?23ytNO6UWtyd1xX+uJKFnxC60PzMXl1W6jlmEJT518cTDeluyBEUlANKf+lT?= =?us-ascii?Q?rduZby1O9pQrGNElmBCbRbQLGCNm5bn87vkDpuiX97hCuVqctNQlFs7fuoKV?= =?us-ascii?Q?KQ/zFS3Ksww+QJ9WWLvd0HEDk3pSngNysY47csVUSynpw9CfjTZB1P5/5acY?= =?us-ascii?Q?FGNoYKBNKzBG/aRcQvCDpjDTg2rlcyicds4RFbh/GtaV//JwSq8VTqKDNOyJ?= =?us-ascii?Q?B3gmPTi932UC5hIOyudejrAidKmZohjKk4XhoIJfzvETEOzCJEPaMPgTKEDG?= =?us-ascii?Q?FtmMSL2BPHCTWna0ppcLIeyofCGlV8vb2g27BSlIZP2qUzYngLssocemhACo?= =?us-ascii?Q?1H9tH3svItx0jnK7gvhCyVQumK4hsjeBnoWo3KMvRrAq2sJOGbnXXR0X4N53?= =?us-ascii?Q?8m+cMA9plFLCuqU05DBArN2yXvgS1pW2gVpky0s9dpmN2Y6umJuNdC690b6P?= =?us-ascii?Q?U2OYrhOyE2O5gK9PLSJ8rsoH9wQY8lF4o8/J5?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 6:5fjEx0b+PfAfrqlKmUFruP+C4fEfUvD6fTQ6PIxHNWowDsFuQzQujG36Wc+pcPCwjthxTPzhSoU42B5dkR5tsvsRc2miNSUOHySYx8EafVOMsCvQccRuxqecSQnTpUWC1s6NwTu8uyb5JgSsTPdHvyQGVVs2dIJSLCoPNoDvJR3wk87j607Hfm5GojaEC6E1q5xaAYWGJws3XSIuq9/wWmOhV5mdGB0r7P5TU0OSJQ+a8Axqo/FM4GV9KsNxHUzoKigKlUXBVcfWeitl5Hyjio+UeHvU1jREJoPmJYDVll4=; 5:dYpIzm/DT1AE80F/6yjMzi4QvX8eaNs1NSiJ/UCsraFsEf+pu2baexmJMJpyI2Fz8Hl6ohlMQm25CUs6YChpes+lewo1kywh3Lt89WVnXvj79Qh9VXntUe6w+V7HAjgq1F0+xejWJXxB0nu245Y/wQ==; 24:DrBappm7DIMmn+oRne85zAzPph6IVdiM3yKtjEd7n4OMv51hjWHNMZxt9HL0iUnQTHbiugPMufErwIXlTIBP/XXngzn1y1xwFD2JzXuIgNI=; 7:2I90RMPVCEg/SXOZiueGa9nMPkSs3aaq3BsEdCic/inXG+o51hRyvG9fn/QbLj3LvPGVuV7TpOxHtUnyGmJuk+pGPiOcse9XtvzaZ51xuCaXOr88MabxEogIHi/8Q2usVPhlrI8kyZP/VqnmeDqsF0HY3JheI4Kt7tN5q4f0ppIaS54oTpukbTJvEzNKdVgKqfPPQ68Pl+fVFkrKdRJllx00pbDIRKshieVclWewZ3WaSIxKteHij8HSaQqijF0d SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2016 03:51:40.3279 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1718 Subject: Re: [dpdk-dev] [PATCH v6 1/4] lib/librte_ether: support device reset 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: Tue, 21 Jun 2016 03:51:45 -0000 On Mon, Jun 20, 2016 at 09:17:14AM -0700, Stephen Hemminger wrote: > On Mon, 20 Jun 2016 14:44:11 +0530 > Jerin Jacob wrote: > > > On Mon, Jun 20, 2016 at 02:24:27PM +0800, Wenzhuo Lu wrote: > > > Add an API to reset the device. > > > It's for VF device in this scenario, kernel PF + DPDK VF. > > > When the PF port down->up, APP should call this API to > > > reset VF port. Most likely, APP should call it in its > > > management thread and guarantee the thread safe. It means > > > APP should stop the rx/tx and the device, then reset the > > > device, then recover the device and rx/tx. > > > > Following is _a_ use-case for Device reset. But may be not be _the_ use > > case. IMO, We need to first say expected behavior of this API and add a use-case > > later. > > > > Other use-case would be, PCIe VF with functional level reset for SRIOV > > migration. > > Are we on same page? > > > In my experience with Linux devices, this is normally handled by the > device driver in the start routine. Since any use case which needs > this is going to do a stop/reset/start sequence, why not just have > the VF device driver do this in the start routine?. > > Adding yet another API and state transistion if not necessary increases > the complexity and required test cases for all devices. I agree with Stephen here.I think if application needs to call start after the device reset then we could add this logic in start itself rather exposing a yet another API >