netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Sridhar Samudrala <sridhar.samudrala@intel.com>,
	stephen@networkplumber.org, netdev@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	alexander.duyck@gmail.com
Subject: Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
Date: Thu, 21 Dec 2017 02:15:31 +0200	[thread overview]
Message-ID: <20171221021450-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20171220143140.0a3dc7f1@cakuba.netronome.com>

On Wed, Dec 20, 2017 at 02:33:34PM -0800, Jakub Kicinski wrote:
> On Mon, 18 Dec 2017 16:40:36 -0800, Sridhar Samudrala wrote:
> > +static int virtio_netdev_event(struct notifier_block *this,
> > +			       unsigned long event, void *ptr)
> > +{
> > +	struct net_device *event_dev = netdev_notifier_info_to_dev(ptr);
> > +
> > +	/* Skip our own events */
> > +	if (event_dev->netdev_ops == &virtnet_netdev)
> > +		return NOTIFY_DONE;
> 
> I wonder how does this work WRT loop prevention.  What if I have two
> virtio devices with the same MAC, what is preventing them from claiming
> each other?  Is it only the check above (not sure what is "own" in
> comment referring to)?

I expect we will add a feature bit (VIRTIO_NET_F_MASTER) and it will
be host's responsibility not to add more than 1 such device.

> I'm worried the check above will not stop virtio from enslaving hyperv
> interfaces and vice versa, potentially leading to a loop, no?  There is
> also the fact that it would be preferable to share the code between
> paravirt drivers, to avoid duplicated bugs.
> 
> My suggestion during the previous discussion was to create a paravirt
> bond device, which will explicitly tell the OS which interfaces to
> bond, regardless of which driver they're using.  Could be some form of
> ACPI/FW driver too, I don't know enough about x86 FW to suggest
> something fully fleshed :(

  reply	other threads:[~2017-12-21  0:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-19  0:40 [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available Sridhar Samudrala
2017-12-19 15:47 ` Michael S. Tsirkin
2017-12-19 17:41   ` Samudrala, Sridhar
2017-12-19 17:55     ` Stephen Hemminger
2017-12-19 18:07       ` Michael S. Tsirkin
2017-12-19 18:13         ` Stephen Hemminger
2017-12-19 18:21       ` David Miller
2017-12-19 18:41         ` Stephen Hemminger
2017-12-19 19:42           ` Samudrala, Sridhar
2017-12-19 19:46             ` Stephen Hemminger
2017-12-19 22:37               ` Samudrala, Sridhar
2017-12-19 22:53                 ` Stephen Hemminger
2017-12-20  0:26                   ` Samudrala, Sridhar
2017-12-21  1:31           ` Siwei Liu
2017-12-21  2:16           ` Siwei Liu
2017-12-21  4:52             ` Jakub Kicinski
2017-12-22  8:42               ` Siwei Liu
2017-12-19 18:20     ` David Miller
2017-12-20 10:51       ` Vitaly Kuznetsov
2017-12-20 22:33 ` Jakub Kicinski
2017-12-21  0:15   ` Michael S. Tsirkin [this message]
2017-12-21  0:29     ` Jakub Kicinski
2017-12-21  0:14 ` Michael S. Tsirkin

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=20171221021450-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alexander.duyck@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=netdev@vger.kernel.org \
    --cc=sridhar.samudrala@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).