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-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 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: [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: [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-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 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: [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: [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-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: [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 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: > 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 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 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 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-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 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 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 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 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 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: [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: [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: [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,

[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: [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

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-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: [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 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 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

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 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 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 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

<    1   2