From: "Michael S. Tsirkin" <mst@redhat•com>
To: Alexander Duyck <alexander.duyck@gmail•com>
Cc: "Samudrala, Sridhar" <sridhar.samudrala@intel•com>,
Stephen Hemminger <stephen@networkplumber•org>,
David Miller <davem@davemloft•net>,
Netdev <netdev@vger•kernel.org>,
virtualization@lists•linux-foundation.org,
virtio-dev@lists•oasis-open.org, "Brandeburg,
Jesse" <jesse.brandeburg@intel•com>,
"Duyck, Alexander H" <alexander.h.duyck@intel•com>,
Jakub Kicinski <kubakici@wp•pl>, Jason Wang <jasowang@redhat•com>,
Siwei Liu <loseweigh@gmail•com>, Jiri Pirko <jiri@resnulli•us>
Subject: Re: [virtio-dev] Re: [PATCH v7 net-next 2/4] net: Introduce generic failover module
Date: Fri, 20 Apr 2018 19:03:34 +0300 [thread overview]
Message-ID: <20180420185937-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAKgT0UeQTx7zJPK3K3eM9xxHfVyHXwJ-G_b8eqGn0bWAyt9aAg@mail.gmail.com>
On Fri, Apr 20, 2018 at 08:56:57AM -0700, Alexander Duyck wrote:
> On Fri, Apr 20, 2018 at 8:34 AM, Michael S. Tsirkin <mst@redhat•com> wrote:
> > On Fri, Apr 20, 2018 at 08:21:00AM -0700, Samudrala, Sridhar wrote:
> >> > > + finfo = netdev_priv(failover_dev);
> >> > > +
> >> > > + primary_dev = rtnl_dereference(finfo->primary_dev);
> >> > > + standby_dev = rtnl_dereference(finfo->standby_dev);
> >> > > +
> >> > > + if (slave_dev != primary_dev && slave_dev != standby_dev)
> >> > > + goto done;
> >> > > +
> >> > > + if ((primary_dev && failover_xmit_ready(primary_dev)) ||
> >> > > + (standby_dev && failover_xmit_ready(standby_dev))) {
> >> > > + netif_carrier_on(failover_dev);
> >> > > + netif_tx_wake_all_queues(failover_dev);
> >> > > + } else {
> >> > > + netif_carrier_off(failover_dev);
> >> > > + netif_tx_stop_all_queues(failover_dev);
> >> > And I think it's a good idea to get stats from device here too.
> >>
> >> Not sure why we need to get stats from lower devs here?
> >
> > link down is often indication of a hardware problem.
> > lower dev might stop responding down the road.
> >
> >> > > +static const struct net_device_ops failover_dev_ops = {
> >> > > + .ndo_open = failover_open,
> >> > > + .ndo_stop = failover_close,
> >> > > + .ndo_start_xmit = failover_start_xmit,
> >> > > + .ndo_select_queue = failover_select_queue,
> >> > > + .ndo_get_stats64 = failover_get_stats,
> >> > > + .ndo_change_mtu = failover_change_mtu,
> >> > > + .ndo_set_rx_mode = failover_set_rx_mode,
> >> > > + .ndo_validate_addr = eth_validate_addr,
> >> > > + .ndo_features_check = passthru_features_check,
> >> > xdp support?
> >>
> >> I think it should be possible to add it be calling the lower dev ndo_xdp routines
> >> with proper checks. can we add this later?
> >
> > I'd be concerned that if you don't xdp userspace will keep poking
> > at lower devs. Then it will stop working if you add this later.
>
> The failover device is better off not providing in-driver XDP since
> there are already skbs allocated by the time that we see the packet
> here anyway. As such generic XDP is the preferred way to handle this
> since it will work regardless of what lower devices are present.
>
> The only advantage of having XDP down at the virtio or VF level would
> be that it performs better, but at the cost of complexity since we
> would need to rebind the eBPF program any time a device is hotplugged
> out and then back in. For now the current approach is in keeping with
> how bonding and other similar drivers are currently handling this.
>
> Thanks.
>
> - Alex
OK fair enough.
--
MST
next prev parent reply other threads:[~2018-04-20 16:03 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-20 1:42 [PATCH net-next v7 0/4] Enable virtio_net to act as a standby for a passthru device Sridhar Samudrala
2018-04-20 1:42 ` [PATCH v7 net-next 1/4] virtio_net: Introduce VIRTIO_NET_F_STANDBY feature bit Sridhar Samudrala
2018-04-20 1:42 ` [PATCH v7 net-next 2/4] net: Introduce generic failover module Sridhar Samudrala
2018-04-20 2:44 ` Michael S. Tsirkin
2018-04-20 15:21 ` Samudrala, Sridhar
2018-04-20 15:34 ` Michael S. Tsirkin
2018-04-20 15:56 ` [virtio-dev] " Alexander Duyck
2018-04-20 16:03 ` Michael S. Tsirkin [this message]
2018-04-20 3:34 ` Michael S. Tsirkin
2018-04-22 17:06 ` Michael S. Tsirkin
2018-04-23 17:21 ` Samudrala, Sridhar
2018-04-22 18:29 ` kbuild test robot
2018-04-20 1:42 ` [PATCH v7 net-next 3/4] virtio_net: Extend virtio to use VF datapath when available Sridhar Samudrala
2018-04-20 2:46 ` Michael S. Tsirkin
2018-04-22 15:41 ` kbuild test robot
2018-04-22 15:41 ` kbuild test robot
2018-04-20 1:42 ` [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework Sridhar Samudrala
2018-04-20 15:28 ` Stephen Hemminger
2018-04-20 15:43 ` Michael S. Tsirkin
2018-04-20 15:47 ` David Miller
2018-04-20 15:46 ` David Miller
2018-04-20 15:46 ` Samudrala, Sridhar
2018-04-20 16:00 ` Jiri Pirko
2018-04-23 17:04 ` Stephen Hemminger
2018-04-23 17:24 ` Michael S. Tsirkin
2018-04-23 17:44 ` Stephen Hemminger
2018-04-23 17:56 ` Michael S. Tsirkin
2018-04-23 19:44 ` Siwei Liu
2018-04-23 20:06 ` Michael S. Tsirkin
2018-04-24 1:28 ` Stephen Hemminger
2018-04-25 21:38 ` Siwei Liu
2018-04-25 22:22 ` Michael S. Tsirkin
2018-04-25 22:57 ` Siwei Liu
2018-04-26 0:18 ` Stephen Hemminger
2018-04-26 2:43 ` Michael S. Tsirkin
2018-04-26 2:28 ` Michael S. Tsirkin
2018-04-26 22:14 ` Siwei Liu
2018-04-26 23:42 ` Michael S. Tsirkin
2018-04-28 0:43 ` Siwei Liu
2018-04-24 1:25 ` Stephen Hemminger
2018-04-24 1:42 ` Michael S. Tsirkin
2018-04-24 5:07 ` Stephen Hemminger
2018-04-23 17:25 ` Jiri Pirko
2018-04-22 15:41 ` kbuild test robot
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=20180420185937-mutt-send-email-mst@kernel.org \
--to=mst@redhat$(echo .)com \
--cc=alexander.duyck@gmail$(echo .)com \
--cc=alexander.h.duyck@intel$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=jasowang@redhat$(echo .)com \
--cc=jesse.brandeburg@intel$(echo .)com \
--cc=jiri@resnulli$(echo .)us \
--cc=kubakici@wp$(echo .)pl \
--cc=loseweigh@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=sridhar.samudrala@intel$(echo .)com \
--cc=stephen@networkplumber$(echo .)org \
--cc=virtio-dev@lists$(echo .)oasis-open.org \
--cc=virtualization@lists$(echo .)linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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