From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 2CFB42B84 for ; Fri, 14 Apr 2017 08:31:28 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id w64so125489998wma.0 for ; Thu, 13 Apr 2017 23:31:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=AB5gIA4yvSMcJyO4ZwKDiOfy6YAvYBgipivhw6QFtuI=; b=WXz7LOVyytNPSp+8Rdl/3UcHxTrlfGVns8hpL7EjHtXZlr09vKSOiA9gqrQK76RluF yGqJorqfkJnhnIlXDggLkiao00mjfcsvFMneeQJntddyGQuUGQaNCp3Ki/SwEnIQANgA ifLvvjFEJE/sV1Pby9NNfb5BqGlZa0LCY3YHMRb1ECN5BdkH5pXCd0W5bAooVo+y7Lvd 5NsA4CWgpvUcZ2WLk/4zyX2aEE5HhgZJtN8Gpv1by02SBJtQfm6tENA3EoJResxRHaS7 LE8ruvQhKrdWUQSgpyrnIpyD29J5Gy4DBdFRQsdjJw/B/d7b2xr5mpoK5Zow6169hzt1 yDeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=AB5gIA4yvSMcJyO4ZwKDiOfy6YAvYBgipivhw6QFtuI=; b=l0kkvYgyAAzyEee/iVD5xButaTpAIKCmgxAFNR4BRjNAuXsfxlz6z2WhYKcfZdZDK5 U6pGF8pb1VA9w3fp36iV1HacQyxikaO3SdBAi1isG8dF5OriqppzKGD+JdYNT6K19mSV xkucup5+UkFpMaZYIFviiraarZqQRPMzeoSHMx09P9LnUZL+8oAE8WUGCIGwFt1yDLCr xuJ6DF+Cnmd/qtOMf7s8UzvIWhsB6Mhi3k5H/1AUkQJxKfnwmEUFjEKrhwYPmnGoUXnr I6YvsFrnS40ZturwdWgScCiC69OO0GKVpldptaJNHnBzguQWamcrmpj5uq3bHQckQ0Eo 5OJg== X-Gm-Message-State: AN3rC/4ITzN599eee08qf7ve/1PugVuZnTKe3/76VHPDYHFINCOwALuX O2bSo58vzGyWmEZF X-Received: by 10.28.178.10 with SMTP id b10mr10349889wmf.19.1492151487911; Thu, 13 Apr 2017 23:31:27 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id 32sm1187172wrq.25.2017.04.13.23.31.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Apr 2017 23:31:26 -0700 (PDT) From: Thomas Monjalon To: "Zhao1, Wei" Cc: "Ananyev, Konstantin" , "Mcnamara, John" , dev@dpdk.org, "Lu, Wenzhuo" Date: Fri, 14 Apr 2017 08:31:26 +0200 Message-ID: <3836931.6Eq3YNmgkB@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1490866456-52241-1-git-send-email-wei.zhao1@intel.com> <4157272.TqMeIE0yWW@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 1/3] lib/librte_ether: add support for port reset X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 06:31:28 -0000 2017-04-14 01:29, Zhao1, Wei: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > 2017-04-13 08:55, Zhao1, Wei: > > > From: Ananyev, Konstantin > > > > From: Zhao1, Wei > > > > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > > > > 2017-04-06 02:57, Zhao1, Wei: > > > > > > > > /** > > > > > > > > > + * Reset an ethernet device when it's not working. One > > > > > > > > > + scenario is, after PF > > > > > > > > > + * port is down and up, the related VF port should be reset. > > > > > > > > > + * The API will stop the port, clear the rx/tx queues, > > > > > > > > > + re-setup the rx/tx > > > > > > > > > + * queues, restart the port. > > > > > > > > > > > > > > > > s/The API/This function/ > > > > > > > > > > > > > > > > Please explain exactly the responsibility of this function, > > > > > > > > and how it is different from calling stop/configure/start. > > > > > > > > > > > > > > In this reset feature, reset function can do the calling > > > > > > > stop/configure/start process, but also It can also do some > > > > > > > restore work for the port, for example, it can restore the > > > > > > > added parameters of > > > > > > vlan, mac_addrs, promisc_unicast_enabled falg and > > > > > > promisc_multicast_enabled flag. > > > > > > > > Ok, but why start/stop can't do these things? > > > > Konstantin > > > > > > This is because in i40e PMD code, start and stop process do not have > > > the process of store and restore the added key parameters. Not only > > > i40e but also other PMD code. So, in the function pointed to by dev_reset, > > we add specific function do store and restore of some of the important > > parameters listed above. > > > > Why store and restore cannot be implemented in start/stop functions? > > Because reset and start/stop are used for two purposes, for example: > Some user maybe just start/stop the port and he do not care what key parameters > has been configuration last time, and even worse when he want to clear all the configuration last time , > if we add specific function do store and restore in that two function, it is useless for them, > and may cause a result that user do not expect. Is it said somewhere in the doc that the configuration is lost when stopping a device? Can we say which configuration parameter is kept and which one is lost? rte_eth_dev_config_restore() is called in rte_eth_dev_start().