On Thu, Feb 2, 2017 at 9:05 AM, Pascal Mazon <pascal.ma...@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.ma...@6wind.com> wrote: >>>> >>>> On 02/01/2017 04:25 PM, Wiles, Keith wrote: >>>> >>>>> >>>>> On Feb 1, 2017, at 2:11 AM, Pascal Mazon <pascal.ma...@6wind.com> >>>>>> wrote: >>>>>> >>>>>> On 02/01/2017 12:29 AM, Wiles, Keith wrote: >>>>>> >>>>>>> >>>>>>> On Jan 31, 2017, at 10:39 AM, Pascal Mazon <pascal.ma...@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 call >>>>>>> start/stop. In 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 state and the developer can call link up/down APIs if needed for >>>>>>> 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 >>>>>> independently, >>>>>> 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’s 6 patches and I will based my changes 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 >>> >>>