From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0095.outbound.protection.outlook.com [207.46.100.95]) by dpdk.org (Postfix) with ESMTP id 64A6B8D8C for ; Tue, 21 Jun 2016 09:37:39 +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=W9Z9eCE50L4//FUSktqANQcVGxU9waFd9YepgMEynDI=; b=PPP0CObDavkmudCp18s6F+wt6ZJvDH2uSPK/s6fm6ULSh8ji1lWK2jAki77o45865O0Hvsajb5OER+K+0+iF+zM+ngpZ2vIfh1G2d85GGr5Mx9gJ6WROtH6nfwKX7XKnnl4Rjmky55fa1t4otOB/762k818b48PtuHZINas1pV0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (111.93.218.67) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (TLS) id 15.1.517.8; Tue, 21 Jun 2016 07:37:34 +0000 Date: Tue, 21 Jun 2016 13:07:11 +0530 From: Jerin Jacob To: "Lu, Wenzhuo" CC: Stephen Hemminger , "dev@dpdk.org" , "Ananyev, Konstantin" , "Richardson, Bruce" , "Chen, Jing D" , "Liang, Cunming" , "Wu, Jingjing" , "Zhang, Helin" , "thomas.monjalon@6wind.com" Message-ID: <20160621073710.GA30638@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> <20160621035124.GC4903@localhost.localdomain> <6A0DE07E22DDAD4C9103DF62FEBC090903488DD1@shsmsx102.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC090903488DD1@shsmsx102.ccr.corp.intel.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0047.INDPRD01.PROD.OUTLOOK.COM (10.163.199.19) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-MS-Office365-Filtering-Correlation-Id: 7ee0b8f6-aead-40c5-a388-08d399a6eb13 X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 2:mP9ML+79OVPF0nqoUx6VufpblzstpdC4wXeXcTUkFogkLZnItHZjI6JZyQtgg0yk4QyKDTCWcyQF5kjfU5ZEeYIBoTLkfR0TIN5Rx1UpNbyi5sL2vrr4jJ6bVUaWnwAhCcYlXkYYeXdMOau/jOMe7QoLzZhUb8s5gXr8HFavheJ66T1miyivXZUSbtZSr/gA; 3:7WfCgsKnyjvHB2ir87bwqymPlaNHjd3eydbR2mwXP7FjWfTQNAZB1JWImgMyYS8qFFt5FwfOVA9bc9ZjHNK4yitjS9H5DmFAviFEdj6U/uvw3LADgyVRCu08BAwV9xgd; 25:0IyrJplmGmaVX5dQRtfCNe1WuWZrgDa6sLAoRo7vkIYmXv1fP506w0JL1B168S9BbqkXo4eprrD9ZFhqd9RHltp7+Nil1PvG7xIweV+sw60b4MdD6PZEhPJiweGGYU619SEDJo+m9rVwp36Z4H304c1MvMjRJARRGV3iOcmKDOOF8oj6zAPtzC/zrsSZoCofmKIYS8BrTo61RTs9Zw2C5FOxD74zB7omKzeua4Nq5Nub4xx40POZIv6BkCpmfJiwlRIUNylJm0/GhlwWbFQkotjaypboat4AH9nuJOPMVfqjrBIoVnwMNEsSmWIqIY3X3A5iffSo29wMipJCvXGB/ky9JtMWnE4GcpYqSLifY7O2Bv73kbKmj4jqXyp1y6JuJlELqkAcqOl7A0ioY1cDkZ79oKHgU2MbC6KQuH+O1Bg= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 20:St9ysAm0upDutp6/Gx6mWSCzuyMnowkWKZr5PirxVVsSqZoW2v11PGP6jdgY0p/dH5Be6eHtY4toUKik4i+5PUF9J4+YL080klgYiqexdmVmRMAiuCoVjyUQQbhul/nXpEPiGe3gaduLYhp4MMOFya0NHUsqqZEo3rn4vGALT9FiEUCotLfFfMcyTcaJF5xFasUaTolRr9pmwz4SosyHBrE+6bFgVSyG/4VAAMJ2XSxERkj0sll8VfXkwISdGz59pmhfYtkJ9rXnawY3F/grvSzuMoJEocm0fsiAd8QXzYdN/iZHWRF4IthS8Ep1ZV/8TjDKvgJKq/8beqaTsXleiT71xksho/cWQa6GYnyJwNVKWoqgKP/qOP4PEXIlXzGAS9FkzIFkqVv8tidAgQA1tXvPIv6wRAmrZciRFYr1cxzw9QaVTBHoLOjao4StIssUKGrRsYv9+SmPLErOolZ2nlyxnYXBducxYW8FIORjvJ5b2AYJrSeNxkWjwBfh41VKfDQUXHDnM7lNlY0hdbf2GpGIZY3WFIk4ExTuYDVvvz8ogTDzsdYDEZLAeSaxxyGDgdVpJ9gl8nQERHO8eVw4jhzjEZfOtAuTv4MOQA8PNc0= 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:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 4:FdhYP0OY/vOGF0k3qWbH8u6MrGxiKaP9gjwQGX0OiTS1tw4iaiboL+DWVw2a5jyDzwvp8NoGU8ECxZIM75BoD8cQgElfIMqlE02w0G+wXalcFkP01+ORlAXiSeR/hscqZXdzBEVs2EoIrZTz8t/Re/muSjZ6rYXJwI2tfFs7s5RlvqV87N1gb4atdb8XEvkc2vvT9ImFP0uRcg04dA/41/2sU+hiE/DGZctzRaWHEzL0ooBc8K0JkNGkhr2uAvzqnWT8BK6FqMqu+dsNB1Hv4Libz3cfZN+bqQAf4XV+7H7Te+hjA5KADAgp2ZTjmBtDm6KZcnDF6CqlvnFLij5AHSH4IsgJyLXISOCACvih8e5ll6wyTCpuWngbFnM9/Z8y X-Forefront-PRVS: 098076C36C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(199003)(377454003)(13464003)(189002)(24454002)(97736004)(105586002)(106356001)(19580405001)(47776003)(19580395003)(61506002)(2906002)(81166006)(101416001)(42186005)(7846002)(110136002)(33656002)(81156014)(7736002)(189998001)(5009440100003)(8676002)(97756001)(83506001)(4326007)(77096005)(586003)(9686002)(66066001)(68736007)(76176999)(3846002)(2950100001)(93886004)(92566002)(54356999)(50466002)(6116002)(1076002)(50986999)(23726003)(46406003)(4001350100001)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; CAT:NONE; LANG:en; CAT:NONE; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 23:LCMSkzLKfgaLWHccTJLgfeF/JTaHxzAIu7fdBjB?= =?us-ascii?Q?wdOK0FoklmIfFXKM85/TPBcmKqeEXfYA5CRlJC40w+EgUyyn0EL9rG3e2p3b?= =?us-ascii?Q?W1PvXEalvbabdFFDq1e6EQpRovGTWNY7Dl7rr0GrGErpsCP00GoQMl4OrGDg?= =?us-ascii?Q?c2JYsLulYc1CIndE1S8ihwU5S/sf26foYHTOuHhNNZDxNmgWVu5Tquwah6NA?= =?us-ascii?Q?XAbnB2Sqot6D0k6q0x6paD4zwiGveOPLcZTo/F3sOjUD6DgJ2BepffOM1pzs?= =?us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N4hfaaQMzn88nRbemMPRyl5Ct/1f48l3w+?= =?us-ascii?Q?eUxnV6Bag8I4WKkQxTwmm0TXl/IbvDkb/Idc7itYBdRlQERU/Cv+Siw2Nvm1?= =?us-ascii?Q?qDs3oefy1DnI1j4/jN3c=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 6:Fz+fOrl0qE1kjFAVf3jBrw8tsJ/iFEkCpiePxZ34NQcBD2dFOgv0+sC21tAV4OmzHYTF/eDE4ZmxXqmr2eBOH8rphsBZvuFn7koD75lr4dfH6jLE+qpiITjB8nOgH1l7Al01JfeEJLlzANlrjHtkk3J37fsq5vZP6OR6ma1u0HIBv1Ez0xFIIeAWzqlto3am/rSBj0aqJMFf6J0rZHOkF/oCjj9lOP89/8frT2IWp9Vo+K/15kI3g2UsNeaI7LMX0pfszvf1f7toPfQ1nkE89rUtK0YDeFvIfywTef3605Q=; 5:H/S0pbbJeOgjMJgcTPfyCxgwQ6WSBQJKWAVgaXPVIVx+8sOGvhyLL0L9TxhN96poWrmHM5dj8cZ8kxxtkYQVdVD3e180UgYt/XL4cVMOhzrQbLEnRVsnXuqQtXlHdt808nGFGpzt8jKVcsweEFswGg==; 24:Bf+rznjlKDiyFv7DplzfV6hVQ4xpHwbCupFFDJapld4hqQ5KKXOqXtkggo4jZJWHxsQY/8XdB9s4hox+ekuHwpRuGK9vFmSm17XESCx+N5I=; 7:AB19iNt7GBuQuruX5lxVXg+Hw6dHOwczZu68ntSWZt672LvpM5Q0hG9zwGc/lxY379qNWXyM/Wa3ku5EMT2ssvOzcnrg0E0Z7L1Xg6dzuGXwtiq2KP4P55R8j2UPAdyujVeslgRRK+RxbXXhXy3NqRZIFC63b5BPpOEeb2B0CEr9cenIwnpE+xT4LqiBJIoQNbQQ1c27WitT0I5UAb9tQA== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2016 07:37:34.0542 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 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 07:37:40 -0000 On Tue, Jun 21, 2016 at 06:14:29AM +0000, Lu, Wenzhuo wrote: > Hi Jerin, Stephen, > > > > -----Original Message----- > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > Sent: Tuesday, June 21, 2016 11:51 AM > > To: Stephen Hemminger > > Cc: Lu, Wenzhuo; dev@dpdk.org; Ananyev, Konstantin; Richardson, Bruce; Chen, > > Jing D; Liang, Cunming; Wu, Jingjing; Zhang, Helin; > > thomas.monjalon@6wind.com > > Subject: Re: [dpdk-dev] [PATCH v6 1/4] lib/librte_ether: support device reset > > > > 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 > Do you mean changing the device_start to include all these actions, stop device -> stop queue -> re-setup queue -> start queue -> start device ? What was the expected API call sequence when you were introduced this API? Point was to have implicit device reset in the API call sequence(Wherever make sense for specific PMD) Jerin > > > > > >