From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pascal.mazon@6wind.com>
Received: from mail-io0-f180.google.com (mail-io0-f180.google.com
 [209.85.223.180]) by dpdk.org (Postfix) with ESMTP id CA2831150
 for <dev@dpdk.org>; Thu,  2 Feb 2017 09:25:07 +0100 (CET)
Received: by mail-io0-f180.google.com with SMTP id j18so176290719ioe.2
 for <dev@dpdk.org>; Thu, 02 Feb 2017 00:25:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=6wind-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc; bh=Ic3pme0SdV1f8PkMqamhsOl/jSRmZy9RAq8R9mPmXvM=;
 b=hxXra+Et+P4OEatgFBhjLkuUphhf34orI2c3cKf4mQ62otE3Brkq+WpPUwGpECgniI
 jnpPF560aor0Gr+VycfauSFNdwzDhg4EEMKbyaNBoXNrbe4eO6SLZkiuKxQAXjUTPh5C
 PLIYVdRe8KGeIK8liDkb/wcwvE+uKJHfj/lULvL3K5xSzgWuTvZKOXo5UdBv4kt/601k
 xSTO7VY9CfBacXYTOjQKhoRuLgplf7D6Ks4ltc3N6BNjO3UsPWJHDX98AZd+1as8JPQt
 fgeM5QW+D4NvqASRrVjb/qXtnO70Wuu+O8+Tcq10LJ1kGU/Q2oK45Dj7tWcdbfCxwpdx
 5/ug==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to:cc;
 bh=Ic3pme0SdV1f8PkMqamhsOl/jSRmZy9RAq8R9mPmXvM=;
 b=TPtlvoe2Au/XF75Hy7jqnLD65BrUC7QWUGLznNurXmUK8Op8gt/kdKZmeClYjqGA+v
 YfPURk4JNCXS1yzEQrK4tRa6Q3lxh+tfuD2NomywQMpkNeET2pTCf9f1MhPuIG8PGR/E
 PI6gji96kpdAmJNmRgJ6GHK/DLaENcRg3NZZfDe/wrt6VJPr+QQ1fQOM/mcOjTK7z6kN
 3AXnjkxr7adU7jUDC3GqKO/owcSkDVb+zlTgryMlA3videfxN7lD1Xq5piQmYJ+UeG1G
 QSUNRo3Jcum5jfBsAqNhEXfSW1DYEFyOgmBgYDpbU+V0WXBNfJZtylKgeoC4NFxMHmIj
 bCFA==
X-Gm-Message-State: AIkVDXJuTyAujPUm3JsdyfvDfZpxnxX+CzHOFhLcvN4NQn01BvFTSIZCfIi3gW9HiNlOD4zd608xLXM3mwTU2PBM
X-Received: by 10.107.173.95 with SMTP id w92mr6396963ioe.136.1486023906931;
 Thu, 02 Feb 2017 00:25:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.107.9.81 with HTTP; Thu, 2 Feb 2017 00:25:06 -0800 (PST)
In-Reply-To: <af61cccb-f7af-2175-6565-6c3dc6fc6582@6wind.com>
References: <1485855778-15496-1-git-send-email-pascal.mazon@6wind.com>
 <abf0d961-4b2a-e1bf-0732-cc9d933f9278@intel.com>
 <39a46c11-66c4-d8ed-a2bc-d9421cb4afd0@6wind.com>
 <ec2ade7b-282c-e882-8f2d-68c4f058ce1d@intel.com>
 <fcde07c9-44a5-deba-fede-de929e1fff62@6wind.com>
 <9fa2c783-349c-e20c-0e57-0c24e67a4683@intel.com>
 <9C574760-33CF-4163-94D4-A0C919F4592C@intel.com>
 <e1b5c4ec-7609-5a40-311a-61087ad2cad9@6wind.com>
 <74B7FC24-638D-4A48-A02D-C80B5B4E7E2B@intel.com>
 <78727e66-3588-79ab-6448-9858c19e2361@6wind.com>
 <A3752D28-D41D-47F0-9560-2DC190138478@intel.com>
 <8a13261b-215c-e294-1f61-b57e5ea998eb@6wind.com>
 <C74A55BC-4176-4CE7-9CF5-1343E371B567@intel.com>
 <e6ab132f-7c01-a723-eb41-670c9c20aacc@6wind.com>
 <8D715219-BBBE-4484-8CB1-499C9DBE781A@intel.com>
 <5ee7a20c-9bd9-79f3-1ac9-b8d59ca837da@intel.com>
 <af61cccb-f7af-2175-6565-6c3dc6fc6582@6wind.com>
From: Pascal Mazon <pascal.mazon@6wind.com>
Date: Thu, 2 Feb 2017 09:25:06 +0100
Message-ID: <CAMehtWTkP1oeBfkUA1CRebm3NHKyu5e37PwBUdkctXufdwSj7A@mail.gmail.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>, "Wiles,
 Keith" <keith.wiles@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.15
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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Feb 2017 08:25:08 -0000

On Thu, Feb 2, 2017 at 9:05 AM, Pascal Mazon <pascal.mazon@6wind.com> wrote=
:

> On 02/01/2017 06:50 PM, Ferruh Yigit wrote:
>
>> On 2/1/2017 3:55 PM, Wiles, Keith wrote:
>>
>>>
>>> On Feb 1, 2017, at 9:40 AM, Pascal Mazon <pascal.mazon@6wind.com> wrote=
:
>>>>
>>>> On 02/01/2017 04:25 PM, Wiles, Keith wrote:
>>>>
>>>>>
>>>>> On Feb 1, 2017, at 2:11 AM, Pascal Mazon <pascal.mazon@6wind.com>
>>>>>> wrote:
>>>>>>
>>>>>> On 02/01/2017 12:29 AM, Wiles, Keith wrote:
>>>>>>
>>>>>>>
>>>>>>> On Jan 31, 2017, at 10:39 AM, Pascal Mazon <pascal.mazon@6wind.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> 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?
>>>>>>>>>
>>>>>>>>>
>>>>>>>> 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.
>>>>>>>>
>>>>>>>> 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 ca=
ll
>>>>>>> start/stop. In the other drivers like ring the like they tend to se=
t link
>>>>>>> in start/stop and in link up/down, which is what I patterned my dri=
ver 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 state and the developer can call link up/down APIs if needed f=
or
>>>>>>> others reasons.
>>>>>>>
>>>>>>> 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.
>>>>>>>
>>>>>>
>>>>>> 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_start() (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 independ=
ently,
>>>>>> for testpmd and ip_pipeline for example.
>>>>>>
>>>>>> Does that sound fine?
>>>>>>
>>>>>
>>>>> Yes, this was what I was trying to say and calling tap_link_set() in
>>>>> tap_dev_start() is the solution.
>>>>>
>>>>
>>>> Great, that looks good to me!
>>>>
>>>
>>> Ferruh, Please apply Pascal=E2=80=99s 6 patches and I will based my cha=
nges on
>>> top of those changes. Does that sound reasonable?
>>>
>>
>> That is good, I will.
>>
>> Pascal,
>>
>> Only patch 1/6 commit log needs reworking, rest looks good, (although I
>> still will do one more round of basic tests). For commit log update, do
>> you want to send a v2 or prefer me do the update?
>>
>
> I'd prefer if you did the update. Thank you!
>
> Pascal


Actually, I'm working on a patch to implement promiscuous_enable/disable
and allmulticast_enable/disable.
I'll have to change the tap_link_set() to be more generic and support the
appropriate flags.
So I'll send a v2 of my patches with patch 1/6 commit-log updated, and the
promisc allmulti support, later today.

Forget my previous email, please.

Regards,
Pascal


>
>
>
>> Thanks,
>> ferruh
>>
>>
>>>
>>>> Regards,
>>>> Pascal
>>>>
>>>
>>> Regards,
>>> Keith
>>>
>>>