From: "Wiles, Keith" Subject: Re: [PATCH 1/6] net/tap: use correct tap name Date: Tue, 31 Jan 2017 23:29:22 +0000 Message-ID: References: <1485855778-15496-1-git-send-email-pascal.mazon@6wind.com> <39a46c11-66c4-d8ed-a2bc-d9421cb4afd0@6wind.com> <9fa2c783-349c-e20c-0e57-0c24e67a4683@intel.com> <9C574760-33CF-4163-94D4-A0C919F4592C@intel.com> <74B7FC24-638D-4A48-A02D-C80B5B4E7E2B@intel.com> <78727e66-3588-79ab-6448-9858c19e2361@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "Yigit, Ferruh" , "dev@dpdk.org" To: Pascal Mazon Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 9EB1CB6D for ; Wed, 1 Feb 2017 00:29:27 +0100 (CET) In-Reply-To: <78727e66-3588-79ab-6448-9858c19e2361@6wind.com> Content-Language: en-US Content-ID: <1B653EB509DDDE4EB8F202789C751CEE@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > On Jan 31, 2017, at 10:39 AM, Pascal Mazon wrote= : >=20 > On 01/31/2017 05:06 PM, Wiles, Keith wrote:> >> Looking at the changes to set the link up/down and the adding the two fu= nctions. I noticed in the stop/start routines I was set the link in DPDK an= d not adjusting the interface link. Should the stop/start routine also do t= he same thing? >>=20 >=20 > Well, my patch is probably wrong. > The best option would probably be to set dev->data->dev_link.link_status > appropriately inside tap_link_set() only. >=20 > I'm not sure it's compulsory to actually set the link UP in tap_dev_start= () > (respectively DOWN in tap_dev_stop()). > If it is, however, it would be best done using tap_link_set() in those > functions. I was setting the link up/down in both places in the old code. The gotta is= link up/down came later (I guess) and applications only call start/stop. I= n the other drivers like ring the like they tend to set link in start/stop = and in link up/down, which is what I patterned my driver on. I looked around and the only applications calling link up/down was testpmd = and ip_pipeline, but all of the apps call start/stop. Even the docs to not = suggest that link up/down be used it appears start/stop must set the Link s= tate and the developer can call link up/down APIs if needed for others reas= ons. I assume the link up/down only effects the link state and the start/stop is= creating/destroying resources. My only solution I guess is to add the link up/down code to the start/stop = API. >=20 > -- > Pascal Mazon > www.6wind.com Regards, Keith