All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Sameeh Jubran <sameeh@daynix.com>
Cc: si-wei.liu@oracle.com, sridhar.samudrala@intel.com,
	carolyn.wyborny@intel.com, Siwei Liu <loseweigh@gmail.com>,
	venu.busireddy@oracle.com, cohuck@redhat.com,
	virtio-dev <virtio-dev@lists.oasis-open.org>,
	liran.alon@oracle.com, Yan Vugenfirer <yan@daynix.com>,
	jesse.brandeburg@intel.com, boris.ostrovsky@oracle.com
Subject: Re: [virtio-dev] [PATCH v4] content: Introduce VIRTIO_NET_F_STANDBY feature
Date: Mon, 10 Dec 2018 12:46:10 -0500	[thread overview]
Message-ID: <20181210124505-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAKPgXcFB1qFibgZDSQNNiKFfrGtwnYKbb38vCpVujyxX8mMiYA@mail.gmail.com>

On Mon, Dec 10, 2018 at 05:34:53PM +0200, Sameeh Jubran wrote:
> On Mon, Dec 10, 2018 at 5:13 PM Sameeh Jubran <sameeh@daynix.com> wrote:
> >
> > On Sat, Dec 8, 2018 at 3:54 AM si-wei liu <si-wei.liu@oracle.com> wrote:
> > >
> > >
> > >
> > > On 12/05/2018 08:18 AM, Sameeh Jubran wrote:
> > > > Hi all,
> > > >
> > > > This is a followup on the discussion in the DPDK and Virtio monthly meeting.
> > > >
> > > > Michael suggested that layer 2 tests should be created in order to
> > > > test the PF/VF behavior in different scenarios without using VMs at
> > > > all which should speed up the testing process.
> > > >
> > > > The following "mausezahn" tool - which is part of netsniff-ng package
> > > > - can be used in order to generate layer 2 packets as follows:
> > > >
> > > > mausezahn enp59s0 -c 0 -a rand -b 20:71:c6:2a:68:38 "08 00 aa bb cc dd"
> > > >
> > > > The packets can be sniffed using tcpdump or netsniff-ng.
> > > Does tcpdump or netsniff-ng enable NIC's promiscuous mode by default?
> > > Try disable it when you monitor/capture the L2 packets.
> > netsniff-ng enables promiscuous mode by default, however the -M flag
> > can disable this.
> >
> > >
> > > >
> > > > I am not completely sure how the setup should look like on the host,
> > > > but here is a script which assigns macvlan to the PF and sets it's mac
> > > > address to be the same as the VF mac address. The scripts assumes that
> > > > the sriov is already configured and the vf are present.
> > > >
> > > > [root@wsfd-advnetlab10 ~]# cat go_macvlan.sh
> > > > MACVLAN_NAME=macvlan0
> > > > PF_NAME=enp59s0
> > > > VF_NUMBER=1
> > > > MAC_ADDR=20:71:c6:2a:68:38
> > > >
> > > > echo "$PF_NAME vf status before setting mac"
> > > > ip link show dev $PF_NAME
> > > > ip link set $PF_NAME vf $VF_NUMBER mac $MAC_ADDR
> > > > ip li add link $PF_NAME $MACVLAN_NAME address $MAC_ADDR type macvlan
> > > > ip link set $PF_NAME up
> > > > echo "$PF_NAME vf status after setting mac"
> > > > ip link show dev $PF_NAME
> > > >
> > > > Please share your thoughts on how the different test scenarios should
> > > > go, I can customize the scripts further more and host them somewhere.
> > > You can do something like below:
> > >
> > > FAKE_VLAN=123
> > > ip link set $MACVLAN_NAME up
> > > ip link set $PF_NAME vf $VF_NUMBER vlan $FAKE_VLAN
> > >
> > > Datapath now switched to macvlan0, which should get the L2 packets from
> > > over the wire.
> > >
> > > ip link set $PF_NAME vf $VF_NUMBER vlan 0
> > > ip link set $MACVLAN_NAME down
> > >
> > > Datapath now switched back to VF. VF#1 should get packets.
> > >
> > > For a more accurate downtime test, replace 'ip link set vf .. vlan ...'
> > > to unbind VF from the original driver and bind it to vfio-pci.
> > Yup.
> 
> The only issue that I'm not sure on how to deal with, is how to listen
> to the packets on the vf. How can I make sure that they are arriving
> there?

Using --dev flag to bind to the vf device?


> > >
> > >
> > > Regards,
> > > -Siwei
> > >
> > > >
> > > > On Tue, Dec 4, 2018 at 5:59 AM Michael S. Tsirkin <mst@redhat.com> wrote:
> > > >> On Mon, Dec 03, 2018 at 06:09:19PM -0800, si-wei liu wrote:
> > > >>>> I agree. But a single flag is not much of an extension. We don't even
> > > >>>> need it in netlink, can be anywhere in e.g. sysfs.
> > > >>> I think sysfs attribute is for exposing the capability, while you still need
> > > >>> to set up macvtap with some special mode via netlink. That way it doesn't
> > > >>> break current behavior, and when VF's MAC filter is added macvtap would need
> > > >>> to react to remove the filter from NIC. And add the one back when VF's MAC
> > > >>> is removed.
> > > >> All this will be up to the developers actually working on it. My
> > > >> understanding is that intel is going to just change the behaviour
> > > >> unconditionally, and it's already the case for Mellanox.
> > > >> That creates a critical mass large enough that maybe others
> > > >> just need to confirm.
> > > >>
> > > >> ...
> > > >>
> > > >>
> > > >>>> Meanwhile what's missing and was missing all along for the change you
> > > >>>> seem to be advocating for to get off the ground is people who
> > > >>>> are ready to actually send e.g. spec, guest driver, test patches.
> > > >>> Partly because it hadn't been converged to the best way to do it (even the
> > > >>> group ID mechanism with PCI bridge can address our need you don't seem to
> > > >>> think it is valuable). The in-kernel approach is fine at its appearance, but
> > > >>> I personally don't believe changing every legacy driver is the way to go.
> > > >>> It's the choice of implementation and what has been implemented in those
> > > >>> drivers today IMHO is nothing wrong.
> > > >> It's not a question of being wrong as such.
> > > >> A standard behaviour is clearly better than each driver doing its
> > > >> own thing which is the case now. As long as we ar standardizing,
> > > >> let's standardize on something that matches our needs?
> > > >> But I really see no problem with also supporting other options,
> > > >> as long as someone is prepared to actually put in the work.
> > > >>
> > > >>
> > > >>>>>>     Still this assumes just creating a VF
> > > >>>>>> doesn't yet program the on-card filter to cause packet drops.
> > > >>>>> Suppose this behavior is fixable in legacy Intel NIC, you would still need
> > > >>>>> to evacuate the filter programmed by macvtap previously when VF's filter
> > > >>>>> gets activated (typically when VF's netdev is netif_running() in a Linux
> > > >>>>> guest). That's what we and NetVSC call as "datapath switching", and where
> > > >>>>> this could be handled (driver, net core, or userspace) is the core for the
> > > >>>>> architectural design that I spent much time on.
> > > >>>>>
> > > >>>>> Having said it, I don't expect or would desperately wait on one vendor to
> > > >>>>> fix a legacy driver which wasn't quite motivated, then no work would be done
> > > >>>>> on that.
> > > >>>> Then that device can't be used with the mechanism in question.
> > > >>>> Or if there are lots of drivers like this maybe someone will be
> > > >>>> motivated enough to post a better implementation with a new
> > > >>>> feature bit. It's not that I'm arguing against that.
> > > >>>>
> > > >>>> But given the options of teaching management to play with
> > > >>>> netlink API in response to guest actions, and with VCPU stopped,
> > > >>>> and doing it all in host kernel drivers, I know I'll prefer host kernel
> > > >>>> changes.
> > > >>> We have some internal patches that leverage management to respond to various
> > > >>> guest actions. If you're interested we can post them. The thing is no one
> > > >>> would like to work on the libvirt changes, while internally we have our own
> > > >>> orchestration software which is not libvirt. But if you think it's fine we
> > > >>> can definitely share our QEMU patches while leaving out libvirt.
> > > >>>
> > > >>> Thanks,
> > > >>> -Siwei
> > > >> Sure, why not.
> > > >>
> > > >> The following is generally necessary for any virtio project to happen:
> > > >> - guest patches
> > > >> - qemu patches
> > > >> - spec documentation
> > > >>
> > > >> Some extras are sometimes a dependency, e.g. host kernel patches.
> > > >>
> > > >>
> > > >> Typically at least two of these are enough for people to
> > > >> be able to figure out how things work.
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>>>> If you'd go the way, please make sure Intel could change their
> > > >>>>> driver first.
> > > >>>> We'll see what happens with that. It's Sridhar from intel that implemented
> > > >>>> the guest changes after all, so I expect he's motivated to make them
> > > >>>> work well.
> > > >>>>
> > > >>>>
> > > >>>>>>     Let's
> > > >>>>>> assume drivers are fixed to do that. How does userspace know
> > > >>>>>> that's the case? We might need some kind of attribute so
> > > >>>>>> userspace can detect it.
> > > >>>>> Where do you envision the new attribute could be at? Supposedly it'd be
> > > >>>>> exposed by the kernel, which constitutes a new API or API changes.
> > > >>>>>
> > > >>>>>
> > > >>>>> Thanks,
> > > >>>>> -Siwei
> > > >>>> People add e.g. new attributes in sysfs left and right.  It's unlikely
> > > >>>> to be a matter of serious contention.
> > > >>>>
> > > >>>>>>>> Question is how does userspace know driver isn't broken in this respect?
> > > >>>>>>>> Let's add a "vf failover" flag somewhere so this can be probed?
> > > >>>>>>>>
> > > >>>> ---------------------------------------------------------------------
> > > >>>> To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
> > > >>>> For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
> > > >>>>
> > > >
> > > >
> > >
> >
> >
> > --
> > Respectfully,
> > Sameeh Jubran
> > Linkedin
> > Software Engineer @ Daynix.
> 
> 
> 
> -- 
> Respectfully,
> Sameeh Jubran
> Linkedin
> Software Engineer @ Daynix.

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


  reply	other threads:[~2018-12-10 17:46 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-15 18:49 [virtio-dev] [PATCH v4] content: Introduce VIRTIO_NET_F_STANDBY feature Sridhar Samudrala
2018-08-27  8:40 ` [virtio-dev] " Cornelia Huck
2018-08-27 12:34   ` Michael S. Tsirkin
2018-08-27 16:50     ` Samudrala, Sridhar
2018-08-28 12:13       ` Michael S. Tsirkin
2018-09-07 21:34 ` [virtio-dev] " Michael S. Tsirkin
2018-09-12 15:17   ` Samudrala, Sridhar
2018-09-12 15:22     ` Michael S. Tsirkin
2018-09-18 10:20       ` Cornelia Huck
2018-09-18 10:37         ` Sameeh Jubran
2018-09-18 13:25           ` Michael S. Tsirkin
2018-09-18 18:30             ` Siwei Liu
2018-09-18 18:39               ` Michael S. Tsirkin
2018-09-18 19:10                 ` Siwei Liu
2018-09-20  3:04                   ` Michael S. Tsirkin
2018-09-19  5:03             ` Samudrala, Sridhar
2018-09-20  5:51             ` Sameeh Jubran
2018-09-18 13:35         ` Michael S. Tsirkin
2018-09-18 15:13           ` Venu Busireddy
2018-09-18 15:31             ` Michael S. Tsirkin
2018-09-18 18:48               ` Siwei Liu
2018-09-20  3:11                 ` Michael S. Tsirkin
2018-09-20 23:57                   ` Siwei Liu
2018-09-21  2:23                     ` Michael S. Tsirkin
2018-09-21  2:34                       ` Michael S. Tsirkin
2018-09-27  0:18                       ` Siwei Liu
2018-09-27  7:17                         ` Sameeh Jubran
2018-09-27 16:17                           ` Michael S. Tsirkin
2018-09-27 17:23                             ` Samudrala, Sridhar
2018-09-27 23:45                               ` Michael S. Tsirkin
2018-09-30  9:17                               ` Sameeh Jubran
2018-09-30 13:50                                 ` Sameeh Jubran
2018-09-27 16:32                         ` Michael S. Tsirkin
2018-10-02  8:42                           ` Siwei Liu
2018-10-02 12:43                             ` Michael S. Tsirkin
2018-10-05  0:03                               ` Siwei Liu
2018-10-05  5:17                                 ` Samudrala, Sridhar
2018-10-10 14:40                                   ` Michael S. Tsirkin
2018-10-11  0:16                                     ` Samudrala, Sridhar
2018-10-05 19:18                                 ` Michael S. Tsirkin
2018-10-08 22:06                                   ` Sameeh Jubran
2018-10-10 14:43                                     ` Michael S. Tsirkin
2018-10-11  1:26                                   ` Siwei Liu
2018-10-18 23:20                                     ` Siwei Liu
2018-10-18 23:40                                       ` Michael S. Tsirkin
2018-10-19  3:45                                     ` Michael S. Tsirkin
2018-11-21 15:39                                       ` Sameeh Jubran
2018-11-21 18:41                                         ` Michael S. Tsirkin
2018-11-21 20:04                                           ` Sameeh Jubran
2018-11-21 23:51                                             ` Samudrala, Sridhar
2018-11-22 13:55                                               ` Sameeh Jubran
2018-11-22 18:27                                             ` Michael S. Tsirkin
2018-11-26 15:13                                               ` Sameeh Jubran
2018-11-26 15:43                                                 ` Sameeh Jubran
2018-11-26 20:22                                                   ` Samudrala, Sridhar
2018-11-27 11:24                                                     ` Sameeh Jubran
2018-11-28 17:08                                                     ` Michael S. Tsirkin
2018-11-28 17:31                                                       ` Samudrala, Sridhar
2018-11-28 17:35                                                         ` Michael S. Tsirkin
2018-11-28 18:39                                                           ` Samudrala, Sridhar
2018-11-28 18:51                                                             ` Michael S. Tsirkin
2018-11-29  6:29                                                               ` Samudrala, Sridhar
2018-11-28 20:06                                                             ` Michael S. Tsirkin
2018-11-28 20:28                                                               ` si-wei liu
2018-11-28 20:43                                                                 ` Michael S. Tsirkin
2018-11-28 20:47                                                                   ` si-wei liu
2018-11-29  1:15                                                                 ` Michael S. Tsirkin
2018-11-29  6:37                                                                   ` Samudrala, Sridhar
2018-11-29 20:14                                                                   ` si-wei liu
2018-11-29 21:17                                                                     ` Michael S. Tsirkin
2018-11-29 22:53                                                                       ` si-wei liu
2018-11-29 23:53                                                                         ` Samudrala, Sridhar
2018-11-30  0:24                                                                           ` si-wei liu
2018-11-30  3:08                                                                             ` Samudrala, Sridhar
2018-11-30  4:46                                                                               ` si-wei liu
2018-11-30  6:21                                                                         ` Michael S. Tsirkin
2018-12-04  2:09                                                                           ` si-wei liu
2018-12-04  3:59                                                                             ` Michael S. Tsirkin
2018-12-05 16:18                                                                               ` Sameeh Jubran
2018-12-05 17:18                                                                                 ` Michael S. Tsirkin
2018-12-08  1:54                                                                                 ` si-wei liu
2018-12-10 15:13                                                                                   ` Sameeh Jubran
2018-12-10 15:34                                                                                     ` Sameeh Jubran
2018-12-10 17:46                                                                                       ` Michael S. Tsirkin [this message]
2018-12-11 15:50                                                                                         ` Sameeh Jubran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181210124505-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=carolyn.wyborny@intel.com \
    --cc=cohuck@redhat.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=liran.alon@oracle.com \
    --cc=loseweigh@gmail.com \
    --cc=sameeh@daynix.com \
    --cc=si-wei.liu@oracle.com \
    --cc=sridhar.samudrala@intel.com \
    --cc=venu.busireddy@oracle.com \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=yan@daynix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.