Re: [RFC 1/2] vhost: IFC VF hardware operation layer

2019-10-15 Thread Stephen Hemminger
On Wed, 16 Oct 2019 09:03:17 +0800 Zhu Lingshan wrote: > + IFC_INFO(>dev, "PCI capability mapping:\n" > + "common cfg: %p\n" > + "notify base: %p\n" > + "isr cfg: %p\n" > + "device

Re: [RFC 1/2] vhost: IFC VF hardware operation layer

2019-10-15 Thread Stephen Hemminger
On Wed, 16 Oct 2019 09:03:17 +0800 Zhu Lingshan wrote: > +int ifcvf_init_hw(struct ifcvf_hw *hw, struct pci_dev *dev) > +{ > + int ret; > + u8 pos; > + struct virtio_pci_cap cap; > + u32 i; > + u16 notify_off; For network code, the preferred declaration style is reverse

Re: [PATCH net v6] failover: allow name change on IFF_UP slave interfaces

2019-04-07 Thread Stephen Hemminger
On Fri, 5 Apr 2019 18:01:43 -0400 "Michael S. Tsirkin" wrote: > > > > This notifier is not really necessary, there already is a CHANGENAME > > that gets sent. > > NETDEV_CHANGE is used in other cases to mean that the state (flags) > > have changed. > > The point is some existing scripts

Re: [PATCH net v6] failover: allow name change on IFF_UP slave interfaces

2019-04-05 Thread Stephen Hemminger
On Fri, 5 Apr 2019 17:28:55 -0400 "Michael S. Tsirkin" wrote: > On Wed, Apr 03, 2019 at 12:52:47AM -0400, Si-Wei Liu wrote: > > When a netdev appears through hot plug then gets enslaved by a failover > > master that is already up and running, the slave will be opened > > right away after getting

Re: [PATCH net v6] failover: allow name change on IFF_UP slave interfaces

2019-04-05 Thread Stephen Hemminger
On Wed, 3 Apr 2019 00:52:47 -0400 Si-Wei Liu wrote: > > + if (unlikely(dev->flags & IFF_UP)) { > + struct netdev_notifier_change_info change_info = { > + .info.dev = dev, > + }; > + > + call_netdevice_notifiers_info(NETDEV_CHANGE, >

Re: [PATCH net v5] failover: allow name change on IFF_UP slave interfaces

2019-04-03 Thread Stephen Hemminger
On Tue, 2 Apr 2019 22:22:18 -0700 "Samudrala, Sridhar" wrote: > On 4/2/2019 8:14 PM, Stephen Hemminger wrote: > > On Tue, 2 Apr 2019 15:23:29 -0700 > > si-wei liu wrote: > > > >> On 4/2/2019 2:53 PM, Stephen Hemminger wrote: > >>> On Mon

Re: [PATCH net v5] failover: allow name change on IFF_UP slave interfaces

2019-04-02 Thread Stephen Hemminger
On Tue, 2 Apr 2019 15:23:29 -0700 si-wei liu wrote: > On 4/2/2019 2:53 PM, Stephen Hemminger wrote: > > On Mon, 1 Apr 2019 19:04:53 -0400 > > Si-Wei Liu wrote: > > > >> + if (dev->flags & IFF_UP && > >> + likely(!(dev->priv_fl

Re: [PATCH net v5] failover: allow name change on IFF_UP slave interfaces

2019-04-02 Thread Stephen Hemminger
On Mon, 1 Apr 2019 19:04:53 -0400 Si-Wei Liu wrote: > + if (dev->flags & IFF_UP && > + likely(!(dev->priv_flags & IFF_FAILOVER_SLAVE))) Why is property limited to failover slave, it would make sense for netvsc as well. Why not make it a flag like live address change?

Re: [PATCH net v4] failover: allow name change on IFF_UP slave interfaces

2019-03-29 Thread Stephen Hemminger
On Thu, 28 Mar 2019 19:47:27 -0400 Si-Wei Liu wrote: > + if (unlikely(dev->flags & IFF_UP)) { > + struct netdev_notifier_change_info change_info; > + > + change_info.flags_changed = 0; Simpler to use structure initialization, which also avoid any chance of

Re: [PATCH net v3] failover: allow name change on IFF_UP slave interfaces

2019-03-28 Thread Stephen Hemminger
On Wed, 27 Mar 2019 16:44:19 -0700 si-wei liu wrote: > On 3/27/2019 4:11 AM, Jiri Pirko wrote: > > Wed, Mar 27, 2019 at 12:48:13AM CET, si-wei@oracle.com wrote: > >> When a netdev appears through hot plug then gets enslaved by a failover > >> master that is already up and running, the

Re: [PATCH net v3] failover: allow name change on IFF_UP slave interfaces

2019-03-26 Thread Stephen Hemminger
On Tue, 26 Mar 2019 19:48:13 -0400 Si-Wei Liu wrote: > When a netdev appears through hot plug then gets enslaved by a failover > master that is already up and running, the slave will be opened > right away after getting enslaved. Today there's a race that userspace > (udev) may fail to rename

Re: [summary] virtio network device failover writeup

2019-03-21 Thread Stephen Hemminger
On Thu, 21 Mar 2019 15:04:37 +0200 Liran Alon wrote: > > > > OK. Now what happens if master is moved to another namespace? Do we need > > to move the slaves too? > > No. Why would we move the slaves? The whole point is to make most customer > ignore the net-failover slaves and remain them

Re: [summary] virtio network device failover writeup

2019-03-21 Thread Stephen Hemminger
On Thu, 21 Mar 2019 08:57:03 -0400 "Michael S. Tsirkin" wrote: > On Thu, Mar 21, 2019 at 02:47:50PM +0200, Liran Alon wrote: > > > > > > > On 21 Mar 2019, at 14:37, Michael S. Tsirkin wrote: > > > > > > On Thu, Mar 21, 2019 at 12:07:57PM +0200, Liran Alon wrote: > > >> 2) It brings

Re: [summary] virtio network device failover writeup

2019-03-19 Thread Stephen Hemminger
On Tue, 19 Mar 2019 14:38:06 +0200 Liran Alon wrote: > b.3) cloud-init: If configured to perform network-configuration, it attempts > to configure all available netdevs. It should avoid however doing so on > net-failover slaves. > (Microsoft has handled this by adding a mechanism in cloud-init

[RFC] vhost: select TAP if VHOST is configured

2019-03-13 Thread Stephen Hemminger
If VHOST_NET is configured but TUN and TAP are not, then the kernel will build but vhost will not work correctly since it can't setup the necessary tap device. A solution is to select it. Fixes: 9a393b5d5988 ("tap: tap as an independent module") Signed-off-by: Stephen Hemminger --

Re: [RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces

2019-03-05 Thread Stephen Hemminger
On Tue, 5 Mar 2019 11:19:32 -0800 si-wei liu wrote: > > I have a vague idea: would it work to *not* set > > IFF_UP on slave devices at all? > Hmm, I ever thought about this option, and it appears this solution is > more invasive than required to convert existing scripts, despite the >

Re: [virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework)

2019-02-27 Thread Stephen Hemminger
On Wed, 27 Feb 2019 18:50:44 -0500 "Michael S. Tsirkin" wrote: > On Wed, Feb 27, 2019 at 03:34:56PM -0800, si-wei liu wrote: > > > > > > On 2/27/2019 2:38 PM, Michael S. Tsirkin wrote: > > > On Tue, Feb 26, 2019 at 04:17:21PM -0800, si-wei liu wrote: > > > > > > > > On 2/25/2019 6:08 PM,

Re: [virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework)

2019-02-27 Thread Stephen Hemminger
On Tue, 26 Feb 2019 16:17:21 -0800 si-wei liu wrote: > On 2/25/2019 6:08 PM, Michael S. Tsirkin wrote: > > On Mon, Feb 25, 2019 at 04:58:07PM -0800, si-wei liu wrote: > >> > >> On 2/22/2019 7:14 AM, Michael S. Tsirkin wrote: > >>> On Thu, Feb 21, 2019 at 11:55:11PM -0800, si-wei liu wrote:

Re: [virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework)

2019-02-25 Thread Stephen Hemminger
On Mon, 25 Feb 2019 16:58:07 -0800 si-wei liu wrote: > On 2/22/2019 7:14 AM, Michael S. Tsirkin wrote: > > On Thu, Feb 21, 2019 at 11:55:11PM -0800, si-wei liu wrote: > >> > >> On 2/21/2019 11:00 PM, Samudrala, Sridhar wrote: > >>> > >>> On 2/21/2019 7:33 PM, si-wei liu wrote: > >

Re: [PATCH net] vhost: correctly check the return value of translate_desc() in log_used()

2019-02-15 Thread Stephen Hemminger
On Fri, 15 Feb 2019 15:53:24 +0800 Jason Wang wrote: > When fail, translate_desc() returns negative value, otherwise the > number of iovs. So we should fail when the return value is negative > instead of a blindly check against zero. > > Reported-by: Stephen Hemminger > F

Re: [RFC] virtio_net: add local_bh_disable() around u64_stats_update_begin

2018-10-16 Thread Stephen Hemminger
On Tue, 16 Oct 2018 20:42:07 +0200 Sebastian Andrzej Siewior wrote: > On 2018-10-16 11:01:14 [-0700], Stephen Hemminger wrote: > > On Tue, 16 Oct 2018 18:55:45 +0200 > > Sebastian Andrzej Siewior wrote: > > > > > Also, ptr->var++ is not an atomic op

Re: [RFC] virtio_net: add local_bh_disable() around u64_stats_update_begin

2018-10-16 Thread Stephen Hemminger
On Tue, 16 Oct 2018 18:55:45 +0200 Sebastian Andrzej Siewior wrote: > Also, ptr->var++ is not an atomic operation even on 64bit CPUs. Which > means if try_fill_recv() runs on CPU0 (via virtnet_receive()) then the > worker might run on CPU1. On modern CPU's increment of native types is atomic

Re: [RFC] virtio_net: add local_bh_disable() around u64_stats_update_begin

2018-10-16 Thread Stephen Hemminger
On Tue, 16 Oct 2018 18:55:45 +0200 Sebastian Andrzej Siewior wrote: > on 32bit, lockdep notices: > | > | WARNING: inconsistent lock state > | 4.19.0-rc8+ #9 Tainted: GW > | > | inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W}

Re: [PATCH net-next v12 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-31 Thread Stephen Hemminger
On Wed, 30 May 2018 20:03:11 -0700 "Samudrala, Sridhar" wrote: > On 5/30/2018 7:06 PM, Stephen Hemminger wrote: > > On Thu, 24 May 2018 09:55:14 -0700 > > Sridhar Samudrala wrote: > > > >> Use the registration/notification framework supported by

Re: [PATCH net-next v12 1/5] net: Introduce generic failover module

2018-05-30 Thread Stephen Hemminger
On Fri, 25 May 2018 16:06:58 -0700 "Samudrala, Sridhar" wrote: > On 5/25/2018 3:38 PM, Stephen Hemminger wrote: > > On Thu, 24 May 2018 09:55:13 -0700 > > Sridhar Samudrala wrote: > > > >> diff --git a/include/linux/netdevice.h b/include/linux/netdevice

Re: [PATCH net-next v12 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-30 Thread Stephen Hemminger
On Thu, 24 May 2018 09:55:14 -0700 Sridhar Samudrala wrote: > Use the registration/notification framework supported by the generic > failover infrastructure. > > Signed-off-by: Sridhar Samudrala Why was this merged? It was never signed off by any of the netvsc maintainers, and there were

Re: [PATCH net-next v12 1/5] net: Introduce generic failover module

2018-05-28 Thread Stephen Hemminger
On Fri, 25 May 2018 16:06:58 -0700 "Samudrala, Sridhar" wrote: > On 5/25/2018 3:38 PM, Stephen Hemminger wrote: > > On Thu, 24 May 2018 09:55:13 -0700 > > Sridhar Samudrala wrote: > > > >> diff --git a/include/linux/netdevice.h b/include/linux/netdevice

Re: [PATCH net-next v12 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-25 Thread Stephen Hemminger
On Fri, 25 May 2018 16:11:47 -0700 "Samudrala, Sridhar" <sridhar.samudr...@intel.com> wrote: > On 5/25/2018 3:34 PM, Stephen Hemminger wrote: > > On Thu, 24 May 2018 09:55:14 -0700 > > Sridhar Samudrala <sridhar.samudr...@intel.com> wrote: > > >

Re: [PATCH net-next v12 1/5] net: Introduce generic failover module

2018-05-25 Thread Stephen Hemminger
On Thu, 24 May 2018 09:55:13 -0700 Sridhar Samudrala wrote: > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index 03ed492c4e14..0f4ba52b641d 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -1421,6 +1421,8 @@

Re: [PATCH net-next v12 1/5] net: Introduce generic failover module

2018-05-25 Thread Stephen Hemminger
On Thu, 24 May 2018 09:55:13 -0700 Sridhar Samudrala wrote: > + spin_lock(_lock); Since register is not in fast path, this should be a mutex? > +int failover_slave_unregister(struct net_device *slave_dev) > +{ > + struct net_device *failover_dev; > +

Re: [PATCH net-next v12 2/5] netvsc: refactor notifier/event handling code to use the failover framework

2018-05-25 Thread Stephen Hemminger
On Thu, 24 May 2018 09:55:14 -0700 Sridhar Samudrala wrote: > --- a/drivers/net/hyperv/Kconfig > +++ b/drivers/net/hyperv/Kconfig > @@ -2,5 +2,6 @@ config HYPERV_NET > tristate "Microsoft Hyper-V virtual network driver" > depends on HYPERV > select

Re: [PATCH net-next v10 2/4] net: Introduce generic failover module

2018-05-07 Thread Stephen Hemminger
On Mon, 7 May 2018 15:10:44 -0700 Sridhar Samudrala wrote: > + if (netif_running(failover_dev)) { > + err = dev_open(slave_dev); > + if (err && (err != -EBUSY)) { > + netdev_err(failover_dev, "Opening slave %s failed

Re: [PATCH net-next v10 2/4] net: Introduce generic failover module

2018-05-07 Thread Stephen Hemminger
On Mon, 7 May 2018 15:10:44 -0700 Sridhar Samudrala wrote: > +static struct net_device *net_failover_get_bymac(u8 *mac, > + struct net_failover_ops **ops) > +{ > + struct net_device *failover_dev; > + struct

Re: [PATCH net-next v10 2/4] net: Introduce generic failover module

2018-05-07 Thread Stephen Hemminger
On Mon, 7 May 2018 15:10:44 -0700 Sridhar Samudrala wrote: > This provides a generic interface for paravirtual drivers to listen > for netdev register/unregister/link change events from pci ethernet > devices with the same MAC and takeover their datapath. The

Re: [PATCH net-next v8 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-26 Thread Stephen Hemminger
On Thu, 26 Apr 2018 05:30:05 +0300 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Wed, Apr 25, 2018 at 05:08:37PM -0700, Stephen Hemminger wrote: > > On Wed, 25 Apr 2018 16:59:28 -0700 > > Sridhar Samudrala <sridhar.samudr...@intel.com> wrote: > >

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-25 Thread Stephen Hemminger
On Wed, 25 Apr 2018 15:57:57 -0700 Siwei Liu wrote: > > > > I think ideally the infrastructure should suppport flexible matching of > > NICs - netvsc is already reported to be moving to some kind of serial > > address. > > > As Stephen said, Hyper-V supports the serial

Re: [PATCH net-next v8 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-25 Thread Stephen Hemminger
On Wed, 25 Apr 2018 16:59:28 -0700 Sridhar Samudrala wrote: > Use the registration/notification framework supported by the generic > failover infrastructure. > > Signed-off-by: Sridhar Samudrala NAK unless you prove this works on

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-23 Thread Stephen Hemminger
On Tue, 24 Apr 2018 04:42:22 +0300 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Mon, Apr 23, 2018 at 06:25:03PM -0700, Stephen Hemminger wrote: > > On Mon, 23 Apr 2018 12:44:39 -0700 > > Siwei Liu <losewe...@gmail.com> wrote: > > > > >

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-23 Thread Stephen Hemminger
On Mon, 23 Apr 2018 23:06:55 +0300 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Mon, Apr 23, 2018 at 12:44:39PM -0700, Siwei Liu wrote: > > On Mon, Apr 23, 2018 at 10:56 AM, Michael S. Tsirkin <m...@redhat.com> > > wrote: > > > On Mon, Apr 2

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-23 Thread Stephen Hemminger
On Mon, 23 Apr 2018 12:44:39 -0700 Siwei Liu <losewe...@gmail.com> wrote: > On Mon, Apr 23, 2018 at 10:56 AM, Michael S. Tsirkin <m...@redhat.com> wrote: > > On Mon, Apr 23, 2018 at 10:44:40AM -0700, Stephen Hemminger wrote: > >> On Mon, 23 Apr 2018 20:24:56 +030

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-23 Thread Stephen Hemminger
On Mon, 23 Apr 2018 20:24:56 +0300 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Mon, Apr 23, 2018 at 10:04:06AM -0700, Stephen Hemminger wrote: > > > > > > > >I will NAK patches to change to common code for netvsc especially the > > > >

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-23 Thread Stephen Hemminger
On Fri, 20 Apr 2018 18:00:58 +0200 Jiri Pirko wrote: > Fri, Apr 20, 2018 at 05:28:02PM CEST, step...@networkplumber.org wrote: > >On Thu, 19 Apr 2018 18:42:04 -0700 > >Sridhar Samudrala wrote: > > > >> Use the registration/notification framework

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-20 Thread Stephen Hemminger
On Thu, 19 Apr 2018 18:42:04 -0700 Sridhar Samudrala wrote: > Use the registration/notification framework supported by the generic > failover infrastructure. > > Signed-off-by: Sridhar Samudrala Do what you want to other devices but

Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework

2018-04-10 Thread Stephen Hemminger
On Tue, 10 Apr 2018 16:44:47 -0700 Siwei Liu <losewe...@gmail.com> wrote: > On Tue, Apr 10, 2018 at 4:28 PM, Michael S. Tsirkin <m...@redhat.com> wrote: > > On Tue, Apr 10, 2018 at 02:26:08PM -0700, Stephen Hemminger wrote: > >> On Tue, 10 Apr 2018 11:59:5

Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework

2018-04-10 Thread Stephen Hemminger
On Tue, 10 Apr 2018 11:59:50 -0700 Sridhar Samudrala wrote: > Use the registration/notification framework supported by the generic > bypass infrastructure. > > Signed-off-by: Sridhar Samudrala > --- Thanks for doing this. Your current

Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-09 Thread Stephen Hemminger
On Mon, 9 Apr 2018 15:30:42 -0700 Siwei Liu wrote: > On Mon, Apr 9, 2018 at 3:15 PM, Andrew Lunn wrote: > >> No, implementation wise I'd avoid changing the class on the fly. What > >> I'm looking to is a means to add a secondary class or class aliasing > >>

Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-04 Thread Stephen Hemminger
On Wed, 4 Apr 2018 11:37:52 -0600 David Ahern wrote: > Networking vendors have out of tree kernel modules. Those modules use a > netdev (call it a master netdev, a control netdev, cpu port, whatever) > to pull packets from the ASIC and deliver to virtual netdevices >

Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-03 Thread Stephen Hemminger
On Sun, 1 Apr 2018 05:13:09 -0400 Si-Wei Liu wrote: > Hidden netdevice is not visible to userspace such that > typical network utilites e.g. ip, ifconfig and et al, > cannot sense its existence or configure it. Internally > hidden netdev may associate with an upper level

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-26 Thread Stephen Hemminger
On Mon, 26 Feb 2018 08:19:24 +0100 Jiri Pirko wrote: > Sat, Feb 24, 2018 at 12:59:04AM CET, step...@networkplumber.org wrote: > >On Thu, 22 Feb 2018 13:30:12 -0800 > >Alexander Duyck wrote: > > > >> > Again, I undertand your motivation. Yet I don't

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-23 Thread Stephen Hemminger
(pruned to reduce thread) On Wed, 21 Feb 2018 16:17:19 -0800 Alexander Duyck wrote: > >>> FWIW two solutions that immediately come to mind is to export "backup" > >>> as phys_port_name of the backup virtio link and/or assign a name to the > >>> master like you are

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-23 Thread Stephen Hemminger
On Thu, 22 Feb 2018 13:30:12 -0800 Alexander Duyck wrote: > > Again, I undertand your motivation. Yet I don't like your solution. > > But if the decision is made to do this in-driver bonding. I would like > > to see it baing done some generic way: > > 1) share the same

Re: [virtio-dev] Re: [RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-28 Thread Stephen Hemminger
On Fri, 26 Jan 2018 18:30:03 -0800 Jakub Kicinski wrote: > On Fri, 26 Jan 2018 15:30:35 -0800, Samudrala, Sridhar wrote: > > On 1/26/2018 2:47 PM, Jakub Kicinski wrote: > > > On Sat, 27 Jan 2018 00:14:20 +0200, Michael S. Tsirkin wrote: > > >> On Fri, Jan 26, 2018 at

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Stephen Hemminger
On Mon, 22 Jan 2018 15:27:40 -0800 "Samudrala, Sridhar" wrote: > On 1/22/2018 1:31 PM, Michael S. Tsirkin wrote: > > On Wed, Jan 17, 2018 at 01:49:58PM -0800, Alexander Duyck wrote: > >> On Wed, Jan 17, 2018 at 11:57 AM, Michael S. Tsirkin > >>

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-19 Thread Stephen Hemminger
On Tue, 19 Dec 2017 14:37:50 -0800 "Samudrala, Sridhar" <sridhar.samudr...@intel.com> wrote: > On 12/19/2017 11:46 AM, Stephen Hemminger wrote: > > On Tue, 19 Dec 2017 11:42:33 -0800 > > "Samudrala, Sridhar" <sridhar.samudr...@intel.com> wrote: >

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-19 Thread Stephen Hemminger
On Tue, 19 Dec 2017 11:42:33 -0800 "Samudrala, Sridhar" <sridhar.samudr...@intel.com> wrote: > On 12/19/2017 10:41 AM, Stephen Hemminger wrote: > > On Tue, 19 Dec 2017 13:21:17 -0500 (EST) > > David Miller <da...@davemloft.net> wrote: > > > >>

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-19 Thread Stephen Hemminger
On Tue, 19 Dec 2017 13:21:17 -0500 (EST) David Miller <da...@davemloft.net> wrote: > From: Stephen Hemminger <step...@networkplumber.org> > Date: Tue, 19 Dec 2017 09:55:48 -0800 > > > could be 10ms, just enough to let udev do its renaming > > Please, move to s

Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available

2017-12-19 Thread Stephen Hemminger
On Tue, 19 Dec 2017 20:07:01 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Tue, Dec 19, 2017 at 09:55:48AM -0800, Stephen Hemminger wrote: > > On Tue, 19 Dec 2017 09:41:39 -0800 > > "Samudrala, Sridhar" <sridhar.samudr...@intel.com> wrote

Re: [RFC] virtio-net: help live migrate SR-IOV devices

2017-12-05 Thread Stephen Hemminger
On Tue, 5 Dec 2017 14:29:28 -0800 Jakub Kicinski wrote: > On Tue, 5 Dec 2017 11:59:17 +0200, achiad shochat wrote: > > I second Jacob - having a netdev of one device driver enslave a netdev > > of another device driver is an awkward a-symmetric model. > >

Re: [RFC] virtio-net: help live migrate SR-IOV devices

2017-12-03 Thread Stephen Hemminger
On Sun, 3 Dec 2017 11:14:37 +0200 achiad shochat wrote: > On 3 December 2017 at 07:05, Michael S. Tsirkin wrote: > > On Fri, Dec 01, 2017 at 12:08:59PM -0800, Shannon Nelson wrote: > >> On 11/30/2017 6:11 AM, Michael S. Tsirkin wrote: > >> > On

Re: [RFC] virtio-net: help live migrate SR-IOV devices

2017-11-29 Thread Stephen Hemminger
gt; > > - virtio-net acts as the interface to the VM > > > - live migration initiates > > > - link goes down on SR-IOV, or SR-IOV device is removed > > > - failover to virtio-net as primary path > > > - migration continues to new host > > > - new host

[PATCH] uapi: add SPDX identifier to vm_sockets_diag.h

2017-11-24 Thread Stephen Hemminger
New file seems to have missed the SPDX license scan and update. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- include/uapi/linux/vm_sockets_diag.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/vm_sockets_diag.h b/include/uapi/linux/vm_sockets_

RE: [PATCH net-next 4/4] mlx4: sizeof style usage

2017-08-20 Thread Stephen Hemminger via Virtualization
Yes, good catch. -Original Message- From: Tariq Toukan [mailto:tar...@mellanox.com] Sent: Sunday, August 20, 2017 3:27 AM To: Stephen Hemminger <step...@networkplumber.org>; mlind...@marvell.com; m...@redhat.com; jasow...@redhat.com Cc: net...@vger.kernel.org; linux-r...@vger.kern

[PATCH net-next 4/4] mlx4: sizeof style usage

2017-08-15 Thread Stephen Hemminger
The kernel coding style is to treat sizeof as a function (ie. with parenthesis) not as an operator. Also use kcalloc and kmalloc_array Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- drivers/net/ethernet/mellanox/mlx4/alloc.c | 2 +- drivers/net/ethernet/mellano

[PATCH net-next 3/4] skge: add paren around sizeof arg

2017-08-15 Thread Stephen Hemminger
Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- drivers/net/ethernet/marvell/skge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c index 5d7d94de4e00..8a835e82256a

[PATCH net-next 1/4] tun/tap: use paren's with sizeof

2017-08-15 Thread Stephen Hemminger
Although sizeof is an operator in C. The kernel coding style convention is to always use it like a function and add parenthesis. Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- drivers/net/tap.c | 2 +- drivers/net/tun.c | 2 +- 2 files changed, 2 insertions(+), 2 del

Re: [PATCH v3 2/3] x86/hyperv: move TSC reading method to asm/mshyperv.h

2017-03-03 Thread Stephen Hemminger
Minor coding comments > diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h > index d324dce..4ff25436 100644 > --- a/arch/x86/include/asm/mshyperv.h > +++ b/arch/x86/include/asm/mshyperv.h > @@ -178,6 +178,56 @@ void hyperv_cleanup(void); > #endif > #ifdef

RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-10 Thread Stephen Hemminger via Virtualization
microsoft.com>; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; virtualization@lists.linux-foundation.org Subject: Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method On Fri, 10 Feb 2017, Vitaly Kuznetsov wrote: > Stephen Hemminger <sthem...@micros

Re: [PATCH 1/2] hyperv: implement hv_get_tsc_page()

2017-02-09 Thread Stephen Hemminger
On Thu, 9 Feb 2017 21:14:25 +0100 (CET) Thomas Gleixner <t...@linutronix.de> wrote: > On Thu, 9 Feb 2017, Stephen Hemminger wrote: > > > The actual code looks fine, but the style police will not like you. > > { should be at start of line on functions. > > And #e

Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-09 Thread Stephen Hemminger
e] > >> Sent: Thursday, February 9, 2017 9:08 AM > >> To: Vitaly Kuznetsov <vkuzn...@redhat.com> > >> Cc: x...@kernel.org; Andy Lutomirski <l...@amacapital.net>; Ingo Molnar > >> <mi...@redhat.com>; H. Peter Anvin <h...@zytor.com>; KY Sr

RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

2017-02-09 Thread Stephen Hemminger via Virtualization
.com>; H. Peter Anvin <h...@zytor.com>; KY Srinivasan <k...@microsoft.com>; Haiyang Zhang <haiya...@microsoft.com>; Stephen Hemminger <sthem...@microsoft.com>; Dexuan Cui <de...@microsoft.com>; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; virtu

RE: [PATCH 1/2] hyperv: implement hv_get_tsc_page()

2017-02-09 Thread Stephen Hemminger via Virtualization
: Thursday, February 9, 2017 6:11 AM To: x...@kernel.org; Andy Lutomirski <l...@amacapital.net> Cc: Thomas Gleixner <t...@linutronix.de>; Ingo Molnar <mi...@redhat.com>; H. Peter Anvin <h...@zytor.com>; KY Srinivasan <k...@microsoft.com>; Haiyang Zhang <haiya...@

RE: [PATCH 05/14] netvsc: remove no longer needed receive staging buffers

2017-02-06 Thread Stephen Hemminger via Virtualization
The netvsc part is already in net-next. This patch is not needed. The part that removes the per-channel state can be in another patch. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

[PATCH 12/14] vmbus: expose hv_begin/end_read

2017-02-01 Thread Stephen Hemminger
In order to implement NAPI in netvsc, the driver needs access to control host interrupt mask. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- drivers/hv/hyperv_vmbus.h | 4 drivers/hv/ring_buffer.c | 20 include/linux/hyperv.h

[PATCH 13/14] vmbus: constify parameters where possible

2017-02-01 Thread Stephen Hemminger
Functions that just query state of ring buffer can have parameters marked const. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- drivers/hv/hyperv_vmbus.h | 6 +++--- drivers/hv/ring_buffer.c | 22 ++ include/linux/hyperv.h| 12 ++-- 3

[PATCH 14/14] vmbus: replace modulus operation with subtraction

2017-02-01 Thread Stephen Hemminger
Takes less clock cycles to check for ring wrap and subtract than to do a modulus instruction. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- drivers/hv/ring_buffer.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/hv/ring_buffer.c b/driv

[PATCH 11/14] vmbus: remove conditional locking of vmbus_write

2017-02-01 Thread Stephen Hemminger
All current usage of vmbus write uses the acquire_lock flag, therefore having it be optional is unnecessary. This also fixes a sparse warning since sparse doesn't like when a function has conditional locking. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- drivers/hv/cha

[PATCH 10/14] vmbus: add direct isr callback mode

2017-02-01 Thread Stephen Hemminger
), and the tasklet is rescheduled if more data is detected. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- drivers/hv/channel_mgmt.c| 7 --- drivers/hv/connection.c | 27 --- drivers/hv/hv_util.c | 3 +-- drivers/hv/vmbus_drv.c

[PATCH 09/14] vmbus: change to per channel tasklet

2017-02-01 Thread Stephen Hemminger
Make the event handling tasklet per channel rather than per-cpu. This allows for better fairness when getting lots of data on the same cpu. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- drivers/hv/channel.c | 2 +- drivers/hv/channel_mgmt.c | 16 +- driv

[PATCH 08/14] vmbus: put related per-cpu variable together

2017-02-01 Thread Stephen Hemminger
The hv_context structure had several arrays which were per-cpu and was allocating small structures (tasklet_struct). Instead use a single per-cpu array. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- drivers/hv/channel_mgmt.c | 35 - drivers/hv/connection.c

[PATCH 07/14] vmbus: callback is in softirq not workqueue

2017-02-01 Thread Stephen Hemminger
The callback is done via tasklet not workqueue. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- include/linux/hyperv.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 39d493ce550d..b30808f740f9

[PATCH 06/14] vmbus: remove per channel state

2017-02-01 Thread Stephen Hemminger
The netvsc no longer needs per channel state hook to track receive buffer. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- include/linux/hyperv.h | 14 -- 1 file changed, 14 deletions(-) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 8c6a15

[PATCH 05/14] netvsc: remove no longer needed receive staging buffers

2017-02-01 Thread Stephen Hemminger
Since commit aed8c164ca5199 ("Drivers: hv: ring_buffer: count on wrap around mappings") it is no longer necessary to handle ring wrapping by having a special receive buffer. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- drivers/net/hyperv/hyperv_net.h | 5

[PATCH 03/14] vmbus: remove no longer used signal_policy

2017-02-01 Thread Stephen Hemminger
The explicit signal policy is no longer used. A different mechanism will be added later when xmit_more is supported. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- include/linux/hyperv.h | 18 -- 1 file changed, 18 deletions(-) diff --git a/include/linux/hy

[PATCH 01/14] vmbus: use kernel bitops for traversing interrupt mask

2017-02-01 Thread Stephen Hemminger
Use standard kernel operations for find first set bit to traverse the channel bit array. This has added benefit of speeding up lookup on 64 bit and because it uses find first set instruction. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- drivers/hv/channel.c

[PATCH 02/14] vmbus: drop no longer used kick_q argument

2017-02-01 Thread Stephen Hemminger
The flag to cause notification of host is unused after commit a01a291a282f7c2e ("Drivers: hv: vmbus: Base host signaling strictly on the ring state"). Therefore remove it from the ring buffer internal API. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- driv

[PATCH 00/14] hyperv: vmbus related patches

2017-02-01 Thread Stephen Hemminger
support. Stephen Hemminger (14): vmbus: use kernel bitops for traversing interrupt mask vmbus: drop no longer used kick_q argument vmbus: remove no longer used signal_policy vmbus: remove unused kickq argument to sendpacket netvsc: remove no longer needed receive staging buffers vmbus

[PATCH net-next] net: make ndo_get_stats64 a void function

2017-01-05 Thread Stephen Hemminger
to have a void function. Signed-off-by: Stephen Hemminger <sthem...@microsoft.com> --- drivers/net/bonding/bond_main.c | 10 -- drivers/net/dummy.c | 5 ++--- drivers/net/ethernet/alacritech/slicoss.c| 6 ++ drive

Re: [PATCH net-next V3 3/3] tun: rx batching

2016-12-31 Thread Stephen Hemminger
On Fri, 30 Dec 2016 13:20:51 +0800 Jason Wang wrote: > diff --git a/drivers/net/tun.c b/drivers/net/tun.c > index cd8e02c..a268ed9 100644 > --- a/drivers/net/tun.c > +++ b/drivers/net/tun.c > @@ -75,6 +75,10 @@ > > #include > > +static int rx_batched; >

Re: [RFC v2 -next 1/2] virtio: Start feature MTU support

2016-03-19 Thread Stephen Hemminger
On Thu, 17 Mar 2016 17:10:55 -0400 Aaron Conole <acon...@redhat.com> wrote: > Stephen Hemminger <step...@networkplumber.org> writes: > > > On Tue, 15 Mar 2016 17:04:12 -0400 > > Aaron Conole <acon...@redhat.com> wrote: > > > >> --- a/include/ua

Re: [RFC v2 -next 1/2] virtio: Start feature MTU support

2016-03-18 Thread Stephen Hemminger
On Tue, 15 Mar 2016 17:04:12 -0400 Aaron Conole wrote: > --- a/include/uapi/linux/virtio_net.h > +++ b/include/uapi/linux/virtio_net.h > @@ -55,6 +55,7 @@ > #define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow >*

Re: [PATCH net-next] virtio_net: add ethtool support for set and get of settings

2016-02-03 Thread Stephen Hemminger
On Tue, 2 Feb 2016 13:51:20 +0100 Nikolay Aleksandrov wrote: > +static bool virtnet_validate_speed(u32 speed) > +{ > + switch (speed) { > + case SPEED_10: > + case SPEED_100: > + case SPEED_1000: > + case SPEED_2500: > + case SPEED_5000: > + case

Re: [RFC V7 PATCH 7/7] vhost_net: add interrupt coalescing support

2015-05-26 Thread Stephen Hemminger
On Mon, 25 May 2015 01:24:04 -0400 Jason Wang jasow...@redhat.com wrote: Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 7d137a4..5ee28b7 100644 ---

[PATCH net-next] virtio: change comment in transmit

2015-03-24 Thread Stephen Hemminger
The original comment was not really informative or funny as well as sexist. Replace it with a better explanation of why the driver does stop and what the impacts are. Signed-off-by: Stephen Hemminger step...@networkplumber.org --- a/drivers/net/virtio_net.c 2015-03-24 15:20:25.174671000 -0700

[PATCH net-next 3/3] virtio_net: spelling fixes

2013-12-09 Thread Stephen Hemminger
Signed-off-by: Stephen Hemminger step...@networkplumber.org --- a/drivers/net/virtio_net.c 2013-12-09 16:12:41.409051865 -0800 +++ b/drivers/net/virtio_net.c 2013-12-09 16:12:43.872996856 -0800 @@ -873,7 +873,7 @@ static netdev_tx_t start_xmit(struct sk_ /* * Send command via the control

[PATCH net-next 1/3] virtio_net: set multicast filter list to host

2013-12-09 Thread Stephen Hemminger
: Alex Williamson alex.william...@hp.com Date: Wed Feb 4 09:02:45 2009 + virtio_net: Add a MAC filter table Signed-off-by: Stephen Hemminger step...@networkplumber.org --- a/drivers/net/virtio_net.c 2013-12-09 16:12:03.897891975 -0800 +++ b/drivers/net/virtio_net.c 2013-12-09 16:12

[PATCH net-next 2/3] virtio_net: remove unused parameter to send_command

2013-12-09 Thread Stephen Hemminger
All the code passes NULL for the last sg list (in). Simplify by just removing it. Signed-off-by: Stephen Hemminger step...@networkplumber.org --- a/drivers/net/virtio_net.c 2013-12-09 16:12:36.353164803 -0800 +++ b/drivers/net/virtio_net.c 2013-12-09 16:12:41.409051865 -0800 @@ -876,13

Re: [PATCH 3/3] x86: Support compiling out userspace I/O (iopl and ioperm)

2013-10-25 Thread Stephen Hemminger
I/O from userspace is used to implement usermode virtio driver(s). This has been done independently by Intel, Brocade/Vyatta, and 6Wind. Sorry, it has to stay. On Mon, Oct 21, 2013 at 7:35 PM, Josh Triplett j...@joshtriplett.org wrote: On the vast majority of modern systems, no processes will

[PATCH] virtio: make config_ops const

2013-02-05 Thread Stephen Hemminger
It is just a table of function pointers, make it const for cleanliness and security reasons. Signed-off-by: Stephen Hemminger step...@networkplumber.org --- a/drivers/lguest/lguest_device.c2013-02-02 20:03:23.285506053 +1100 +++ b/drivers/lguest/lguest_device.c2013-02-02 20:06

Re: [PATCH net-next v3 1/3] virtio-net: separate fields of sending/receiving queue from virtnet_info

2012-12-07 Thread Stephen Hemminger
Minor style issue reported by checkpatch which can be fixed after merge. Although sizeof is actually an operator in C, it is considered correct style to treat it as a function. WARNING: sizeof hdr-hdr should be sizeof(hdr-hdr) #293: FILE: drivers/net/virtio_net.c:395: + sg_set_buf(rq-sg,

Re: [PATCH net-next v3 0/3] Multiqueue support in virtio-net

2012-12-07 Thread Stephen Hemminger
, of the feedback given for this series has been addressed by Jason. Can I get some ACKs? Other than the minor style nit in the first patch, I see no issues. This is really needed by Virtual Routers. Acked-by: Stephen Hemminger shemmin...@vyatta.com

  1   2   >