From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0095.outbound.protection.outlook.com [65.55.169.95]) by dpdk.org (Postfix) with ESMTP id 7255BC31C for ; Wed, 22 Jun 2016 13:07:10 +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=cVv9kZeK6D5vok6KP8xDFgEv7aFxRCwvIqT+UxNJbxA=; b=ZGZNe9gxYFW+GYO7QJFgUHHNm/rtq9nA227eHkrQ2rpIuM4slEBdsr/pMaUdGeXVLfXUzmRQNLNvWatzJLDShDAH4fuiEJvwguwFFJ3hbnqGE4My537dqxWP6up9zCnfMmWOfNac2ieA0LiWfJlBAREOVM/yGrlRMVlQs1wzW8M= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (122.171.34.83) by BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) with Microsoft SMTP Server (TLS) id 15.1.523.12; Wed, 22 Jun 2016 11:07:04 +0000 Date: Wed, 22 Jun 2016 16:36:43 +0530 From: Jerin Jacob To: Thomas Monjalon CC: "Lu, Wenzhuo" , , "Ananyev, Konstantin" , Stephen Hemminger , "Richardson, Bruce" , "Chen, Jing D" , "Liang, Cunming" , "Wu, Jingjing" , "Zhang, Helin" Message-ID: <20160622110642.GA12751@localhost.localdomain> References: <20160621133041.GA7509@localhost.localdomain> <6749084.arHGZf8DkE@xps13> <6A0DE07E22DDAD4C9103DF62FEBC09090348995A@shsmsx102.ccr.corp.intel.com> <6984459.KfxJSr4bsX@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <6984459.KfxJSr4bsX@xps13> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [122.171.34.83] X-ClientProxiedBy: MA1PR01CA0059.INDPRD01.PROD.OUTLOOK.COM (10.164.116.159) To BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) X-MS-Office365-Filtering-Correlation-Id: 91d773db-c1db-4b71-3836-08d39a8d5a1d X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 2:JsRIbhcKvzRh6nPOwy95zp02k/djaMaKaiw4MvNuJutqUcGefSveb76KerfQr3QQWrjmb8mQfgnCkMF64XUlXmk/2kcNaIcasc9+myN9DXNYG7m6A86CpHo7J56SHMhxYb2HOsHl36f6ktmOsKkOmc6LfGxzbnLAMRzp0kdF3V6YPbD5UqOUiBD8HGszRWFg; 3:SnMvcG7Mh2QaLj2dl3Mrlvc3/wToX9AykOJ+Ua1eTUfCLGxLnK60eWckmiIVc/VlI9XI4rcK3aa3R45zC5tH/PHQb+9i6+NF/hPKraDn0RPoP+nZYcR+fbLNd/gR+dsZ X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1718; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 25:BA37klitpu1NDT0WkFnVmhSNFTxpM2ukWdQ2XFd2thddRuj+sColMo1RPEgV1JrBGW8dNux2lvSV0sS6q+Rn/vTszluPAFMiz/HkiBvEEXS8y4kQtdVMYBjB4vJERoireu+xCn1zOApccMpNjwSVz2Exun8jKTCeXpyRkFm3YbhRhNV9Sgnxs+GX3FKF1zZTyd+du3zVwFKWQFkZMnDrY2ai+hsmxNHVE1sV9KD3Fv5UFYWsX2ajdePfPjrtU8DAopfPIj4f4TaHze9i75r3/MuSVwhqTZ30KwXoMhamWpMsYDxCRM/VBgozx15VW+37KfE/3WK2AdXXPMdaLErDNEqobf0305NVpSQ25l0Udy2KxsMvYIiWkdCBWp1kGelf6mYUQg+5TKr3k0B0HkXnzfg5UDPSHNQCLs4Y/uOcuVPF9WsHoQcLAdr8vj6PV1h0QpkusMX1ABIcGSBoW5sBdA1uvrbifGV75m30+j1d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an:; 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:X04abqcLS2sXXxb37lRYxAdkMNnjgO0EUGZPN9AKfrT4fan3uVQ7KMj8gbxK0MqSA/PrnQvdPFT43C2x+IXxLvHoOx4gNfHrobC8CvInH3AMqXO5nA6l2YuMDimTvY8xDFCHuhMfEqxTw2gGyT7NzwybUcoC36gIISZSD4nsZw68a0j+MbUu4swkISQlbiToBa0liIVWOfMrnVJM9bEjHvPhMzLiIS9gIdxpfgLwasUjNFos9vyopevp1lvPWinAp04fJPha77mt6s5Z6d6iUOmvw9HfXnSBUajoUoKNTPAgGrYKUtJYz8AuG+xFVFCwvKlvqnIFtnQ9tTzjkALGs5J3u1VCkQp6jvRcseATBE2loswkmELwBFPlChnJtNX8 X-Forefront-PRVS: 0981815F2F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(199003)(377424004)(24454002)(189002)(81166006)(105586002)(7846002)(8676002)(345774005)(61506002)(81156014)(83506001)(106356001)(33656002)(15975445007)(68736007)(97756001)(1076002)(23726003)(15395725005)(2950100001)(54356999)(2906002)(77096005)(47776003)(76176999)(97736004)(50986999)(66066001)(3846002)(42186005)(19580405001)(4001350100001)(50466002)(110136002)(189998001)(92566002)(46406003)(586003)(9686002)(101416001)(4326007)(6116002)(93886004)(19580395003)(7736002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1718; 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; BN3PR0701MB1718; 23:dYThoVeH1s7I8lzjLN+HBKmHHqV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:bySfzAG2vFbJKUBHikOSEXOsUwpw7JduNb3Fe309heV0A/cuEUAptitiOj9RDTrT97d086fe5Jdl0+nkZkOZFiPat064PH3QKnbDRnLFzqOBF7nWYxKi99lgD9aC+f4sQzrR+PkSlPb2OOsBgQaTI4JXnH2KOGjHXJvTXmiZyDoEpom+ihrjBwLTMdys95XzVDmfEpbIryqLR1a4un/BVngWb/GRq+MYDCXMLOfw9r4BHLMWXoOmJydm+g4bzyVnsYLEBtJzv8zSAkOqjnrq/Q== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2016 11:07:04.7444 (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: Wed, 22 Jun 2016 11:07:10 -0000 On Wed, Jun 22, 2016 at 11:18:21AM +0200, Thomas Monjalon wrote: > 2016-06-22 08:25, Lu, Wenzhuo: > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > 2016-06-22 13:29, Jerin Jacob: > > > > Thomas, > > > > As a librte_ether maintainer any comments on this? > > > > > > +1 for adding details and make sure naming is good. > > > I don't really need to comment here because I have already done this comment > > > earlier: > > > http://dpdk.org/ml/archives/dev/2016-June/041845.html > > > Thank you for insisting. > > I've add some details in this patch set. If it's not enough, please let me know. > > And I think this discussion is about what the API name should be like. Actually I think all the existing name is describing what is done by the API not when and where it should be used, like dev_start/stop. > > You're right, I overlooked it: > > + * The API will stop the port, clear the rx/tx queues, re-setup the rx/tx > + * queues, restart the port. > > Jerin, which detail do you think is needed? When to use what ? In what scenarios application need to use generic stop/start vs this new API? How about calling it as rte_eth_dev_restart() ? If existing stop and then start is same the new API in functional perspective, How about having generic implementation of rte_eth_dev_restart() if PMD specific restart handlers are NOT found. That why application need to call only rte_eth_dev_restart() for port restart. It can internally decide optimized stop/start or generic restart Jerin > > Wenzhuo, why this function is needed? > All these actions are already possible independently. > When looking at ixgbe implementation, I see: > ixgbevf_dev_stats_reset() which is not documented in the API > rte_delay_ms(1000); > do {} while > It looks to be some hacks. > If you really need some workarounds to handle some tricky situations, > maybe that the API is not detailed enough. > > > But anyway I'm open for changing the name. Is the name process_reset_intr you prefer? Thanks. > > Not sure. > If you really intend to add a generic reset, maybe rte_eth_dev_reset() > is a good name. We just need more justification. > After reading the doc, the user can understand it is just a wrapper of > existing functions. But it appears in the code that it does more and can > help in some situations.