From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 1BB732C57 for ; Wed, 1 Feb 2017 16:26:02 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP; 01 Feb 2017 07:26:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,320,1477983600"; d="scan'208";a="1089700276" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 01 Feb 2017 07:26:01 -0800 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 1 Feb 2017 07:26:01 -0800 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.230]) by fmsmsx123.amr.corp.intel.com ([169.254.7.244]) with mapi id 14.03.0248.002; Wed, 1 Feb 2017 07:26:00 -0800 From: "Wiles, Keith" To: Pascal Mazon CC: "Yigit, Ferruh" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/6] net/tap: use correct tap name Thread-Index: AQHSe6ayvsixiw0FGEaIJx56SFpb9qFTFF8AgAAVogCAABIhgIAAAJMAgAACS4CAAAGGAIAAABoAgAAGMACAAAkeAIAAco6AgACSBoCAAHlCgA== Date: Wed, 1 Feb 2017 15:25:59 +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> <8a13261b-215c-e294-1f61-b57e5ea998eb@6wind.com> In-Reply-To: <8a13261b-215c-e294-1f61-b57e5ea998eb@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.252.141.150] Content-Type: text/plain; charset="us-ascii" Content-ID: <9350257C76DD03478C914DC9DF4E98BA@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/6] net/tap: use correct tap name 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: Wed, 01 Feb 2017 15:26:04 -0000 > On Feb 1, 2017, at 2:11 AM, Pascal Mazon wrote: >=20 > On 02/01/2017 12:29 AM, Wiles, Keith wrote: >>=20 >>> On Jan 31, 2017, at 10:39 AM, Pascal Mazon wro= te: >>>=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 = functions. I noticed in the stop/start routines I was set the link in DPDK = and not adjusting the interface link. Should the stop/start routine also do= the same thing? >>>>=20 >>>=20 >>> Well, my patch is probably wrong. >>> The best option would probably be to set dev->data->dev_link.link_statu= s >>> appropriately inside tap_link_set() only. >>>=20 >>> I'm not sure it's compulsory to actually set the link UP in tap_dev_sta= rt() >>> (respectively DOWN in tap_dev_stop()). >>> If it is, however, it would be best done using tap_link_set() in those >>> functions. >>=20 >> 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= . In the other drivers like ring the like they tend to set link in start/st= op and in link up/down, which is what I patterned my driver on. >>=20 >> I looked around and the only applications calling link up/down was testp= md and ip_pipeline, but all of the apps call start/stop. Even the docs to n= ot suggest that link up/down be used it appears start/stop must set the Lin= k state and the developer can call link up/down APIs if needed for others r= easons. >>=20 >> I assume the link up/down only effects the link state and the start/stop= is creating/destroying resources. >>=20 >> My only solution I guess is to add the link up/down code to the start/st= op API. >=20 > I'm not sure I understand your conclusion. > If the apps usually call start/stop only, then definitely those functions= should set the link state appropriately. > To that effect, I think it best to just call tap_link_set() in tap_dev_st= art() (and similar for stopping). > Apps with just start/stop functions would get the expected behavior, and = the tap PMD would also support setting the link up/down independently, for = testpmd and ip_pipeline for example. >=20 > Does that sound fine? Yes, this was what I was trying to say and calling tap_link_set() in tap_de= v_start() is the solution. >=20 >=20 >>=20 >>>=20 >>> -- >>> Pascal Mazon >>> www.6wind.com >>=20 >> Regards, >> Keith >>=20 >=20 >=20 > --=20 > Pascal Mazon > www.6wind.com Regards, Keith