From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) by dpdk.org (Postfix) with ESMTP id 8857B2C6E for ; Thu, 13 Apr 2017 12:06:34 +0200 (CEST) Received: by mail-wr0-f180.google.com with SMTP id z109so32560648wrb.1 for ; Thu, 13 Apr 2017 03:06:34 -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=YoQqtF+2ojM8Ve4PoiGrskgpwm02LdBNqWU+PX+SBmQ=; b=gC4smfZ6HmPejqOjuXO0nXvrrI71eozqUArxUOEfHwlbnsnZvguQBRR4+iVQIzsDJv cBUj6+02UvcYzCKU61dXzftECgEFa0q6NAqwPr8mzq8gODCCgQYM9c6dh/2qPv0zjc2w UjdBeHFQtJAU1y7fciwN87O6Cn/vimjQPEk0+1gNHdub5i+pth3c74gBIajMvcYyNHPv u7eqBDbvNL29k4loTJpjOX4Nw/qhKyjgWsiDHlbrS/UFf8LKE3390WC9ep1hgq581obs K+srMht5QTGvS5cGqiJbTuDR983qlVS/L0LU97hNQB3FmGsfQVjjCnVnxzbZW5f4EIA2 q1zg== 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=YoQqtF+2ojM8Ve4PoiGrskgpwm02LdBNqWU+PX+SBmQ=; b=m7cOFJqvPOyvIpw2+bxYEjObijrgIE8doZuSHPEy4gF6ZUm2UDySYSFU4ymYCUmA1u akdGY/SZwRgyHZMfcHikx1WbeUdh+29KKVPuPXcvQ17bNlhZtmZm9Zedgu3EyHDgKe56 eNO80m7W/OMggCAM3rLAiVprGQxwTpJs4s/sUj6wqgETfccVNy+vvmjyz3CYo7DdfYY4 ah0hLC2N5lFLLQQsINNVNAiCUge7hslBWAAxmBmueNOlklE53r3Hqr9zOD+lN+Kp1nX4 mB5DBwUi8MepotReFNYZgsxBKCF5XsT0xdQzyVQpucQxPmHe4LsiAzHU3uQaOfZQVfSV /Hfg== X-Gm-Message-State: AN3rC/6ZnMRQxHzO3fIYGf9/VketnV4/vwRUk6iuRf9TrCPCskzUsX6l vLzFpVV/y/C8tCD1 X-Received: by 10.223.181.135 with SMTP id c7mr2320975wre.19.1492077994038; Thu, 13 Apr 2017 03:06:34 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id q131sm9949828wmd.0.2017.04.13.03.06.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Apr 2017 03:06:33 -0700 (PDT) From: Thomas Monjalon To: "Zhao1, Wei" Cc: "Ananyev, Konstantin" , "Mcnamara, John" , dev@dpdk.org, "Lu, Wenzhuo" Date: Thu, 13 Apr 2017 12:06:32 +0200 Message-ID: <4157272.TqMeIE0yWW@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> <2601191342CEEE43887BDE71AB9772583FAE5871@IRSMSX109.ger.corp.intel.com> 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: Thu, 13 Apr 2017 10:06:34 -0000 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?