Re: [PATCH RFC v7 net-next] netdev: pass the stuck queue to the timeout handler

2019-12-03 Thread Jakub Kicinski
On Tue, 3 Dec 2019 02:12:48 -0500, Michael S. Tsirkin wrote: > This allows incrementing the correct timeout statistic without any mess. > Down the road, devices can learn to reset just the specific queue. > > The patch was generated with the following script: Still: Acked-by: Ja

Re: [PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler

2019-11-24 Thread Jakub Kicinski
On Sun, 24 Nov 2019 18:29:49 -0500, Michael S. Tsirkin wrote: > netdev: pass the stuck queue to the timeout handler > > This allows incrementing the correct timeout statistic without any mess. > Down the road, devices can learn to reset just the specific queue. FWIW Acked-by: Ja

Re: [PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler

2019-11-24 Thread Jakub Kicinski
On Sun, 24 Nov 2019 16:48:35 -0500, Michael S. Tsirkin wrote: > diff --git a/arch/m68k/emu/nfeth.c b/arch/m68k/emu/nfeth.c > index a4ebd2445eda..8e06e7407854 100644 > --- a/arch/m68k/emu/nfeth.c > +++ b/arch/m68k/emu/nfeth.c > @@ -167,7 +167,7 @@ static int nfeth_xmit(struct sk_buff *skb, struct

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-28 Thread Jakub Kicinski
On Thu, 28 Feb 2019 16:20:28 -0800, Siwei Liu wrote: > On Thu, Feb 28, 2019 at 11:56 AM Jakub Kicinski wrote: > > On Thu, 28 Feb 2019 14:36:56 -0500, Michael S. Tsirkin wrote: > > > > It is a bit of a the chicken or the egg situation ;) But users can > > > >

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-28 Thread Jakub Kicinski
On Thu, 28 Feb 2019 15:14:55 -0500, Michael S. Tsirkin wrote: > On Thu, Feb 28, 2019 at 11:56:41AM -0800, Jakub Kicinski wrote: > > On Thu, 28 Feb 2019 14:36:56 -0500, Michael S. Tsirkin wrote: > > > > It is a bit of a the chicken or the egg situation ;) But users can &

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-28 Thread Jakub Kicinski
On Thu, 28 Feb 2019 14:36:56 -0500, Michael S. Tsirkin wrote: > > It is a bit of a the chicken or the egg situation ;) But users can > > just blacklist, too. Anyway, I think this is far better than module > > parameters > > Sorry I'm a bit confused. What is better than what? I mean that

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-28 Thread Jakub Kicinski
On Wed, 27 Feb 2019 23:47:33 -0500, Michael S. Tsirkin wrote: > On Wed, Feb 27, 2019 at 05:52:18PM -0800, Jakub Kicinski wrote: > > > > Can the users who care about the naming put net_failover into > > > > "user space will do the bond enslavement" mode, and do

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 Jakub Kicinski
On Wed, 27 Feb 2019 20:26:02 -0500, Michael S. Tsirkin wrote: > On Wed, Feb 27, 2019 at 04:52:05PM -0800, Jakub Kicinski wrote: > > On Wed, 27 Feb 2019 19:41:32 -0500, Michael S. Tsirkin wrote: > > > > As this scheme adds much complexity to the kernel naming convention &g

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 Jakub Kicinski
On Wed, 27 Feb 2019 19:41:32 -0500, Michael S. Tsirkin wrote: > > As this scheme adds much complexity to the kernel naming convention > > (currently it's just ethX names) that no userspace can understand. > > Anything that pokes at slaves needs to be specially designed anyway. > Naming seems

Re: Resource management for ndo_xdp_xmit (Was: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames)

2019-02-09 Thread Jakub Kicinski
On Sat, 9 Feb 2019 00:18:31 +, Saeed Mahameed wrote: > On Fri, 2019-02-08 at 15:17 -0800, Saeed Mahameed wrote: > > On Thu, 2019-02-07 at 19:08 +, Saeed Mahameed wrote: > > > > > > So > > > 1) on dev_map_update_elem() we will call > > > dev->dev->ndo_bpf() to notify the device on the

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-02-06 Thread Jakub Kicinski
On Wed, 6 Feb 2019 14:48:14 +0100, Jesper Dangaard Brouer wrote: > On Wed, 6 Feb 2019 00:06:33 + > Saeed Mahameed wrote: > > > 3) Unrelated, In non XDP case, if skb allocation fails or driver fails > > to pass the skb up to the stack for somereason, should the driver > > increase rx packets

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

2018-02-27 Thread Jakub Kicinski
On Tue, 27 Feb 2018 13:16:21 -0800, Alexander Duyck wrote: > Basically we need some sort of PCI or PCIe topology mapping for the > devices that can be translated into something we can communicate over > the communication channel. Hm. This is probably a completely stupid idea, but if we need to

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

2018-02-21 Thread Jakub Kicinski
On Wed, 21 Feb 2018 12:57:09 -0800, Alexander Duyck wrote: > > I don't see why the team cannot be there always. > > It is more the logistical nightmare. Part of the goal here was to work > with the cloud base images that are out there such as > https://alt.fedoraproject.org/cloud/. With just

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

2018-02-20 Thread Jakub Kicinski
On Tue, 20 Feb 2018 21:14:10 +0100, Jiri Pirko wrote: > Yeah, I can see it now :( I guess that the ship has sailed and we are > stuck with this ugly thing forever... > > Could you at least make some common code that is shared in between > netvsc and virtio_net so this is handled in exacly the

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

2018-02-18 Thread Jakub Kicinski
On Sat, 17 Feb 2018 09:12:01 -0800, Alexander Duyck wrote: > >> We noticed a couple of issues with this approach during testing. > >> - As both 'bypass' and 'backup' netdevs are associated with the same > >> virtio pci device, udev tries to rename both of them with the same name > >> and the

Re: [RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available

2018-02-16 Thread Jakub Kicinski
On Fri, 16 Feb 2018 10:11:21 -0800, Sridhar Samudrala wrote: > This patch enables virtio_net to switch over to a VF datapath when a VF > netdev is present with the same MAC address. It allows live migration > of a VM with a direct attached VF without the need to setup a bond/team > between a VF

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

2018-02-16 Thread Jakub Kicinski
On Fri, 16 Feb 2018 10:11:19 -0800, Sridhar Samudrala wrote: > Ppatch 2 is in response to the community request for a 3 netdev > solution. However, it creates some issues we'll get into in a moment. > It extends virtio_net to use alternate datapath when available and > registered. When BACKUP

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

2018-01-26 Thread Jakub Kicinski
On Fri, 26 Jan 2018 21:33:01 -0800, Samudrala, Sridhar wrote: > >> 3 netdev model breaks this configuration starting with the creation > >> and naming of the 2 devices to udev needing to be aware of master and > >> slave virtio-net devices. > > I don't understand this comment. There is one

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

2018-01-26 Thread Jakub Kicinski
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 01:46:42PM -0800, Siwei Liu wrote: > >>>> and the VM

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

2018-01-26 Thread Jakub Kicinski
On Sat, 27 Jan 2018 00:14:20 +0200, Michael S. Tsirkin wrote: > On Fri, Jan 26, 2018 at 01:46:42PM -0800, Siwei Liu wrote: > > > and the VM is not expected to do any tuning/optimizations on the VF driver > > > directly, > > > i think the current patch that follows the netvsc model of 2 > > >

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

2018-01-23 Thread Jakub Kicinski
On Tue, 23 Jan 2018 03:23:57 +0200, Michael S. Tsirkin wrote: > > > > b. next-gen silicon may be able to disguise as virtio device, and the > > > >loop check in virtio driver will prevent the legitimate bond it such > > > >case. AFAIU that's one of the goals of next-gen virtio spec as >

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

2018-01-22 Thread Jakub Kicinski
On Tue, 23 Jan 2018 02:47:57 +0200, Michael S. Tsirkin wrote: > On Mon, Jan 22, 2018 at 04:16:23PM -0800, Jakub Kicinski wrote: > > On Tue, 23 Jan 2018 02:05:48 +0200, Michael S. Tsirkin wrote: > > > > As we are using virtio_net to control and ma

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

2018-01-22 Thread Jakub Kicinski
On Tue, 23 Jan 2018 02:05:48 +0200, Michael S. Tsirkin wrote: > > As we are using virtio_net to control and manage the VF data path, it is not > > clear to me > > what is the advantage of creating a new device rather than extending > > virtio_net to manage > > the VF datapath via transparent bond

Re: [PATCH net-next 0/2] Enable virtio to act as a master for a passthru device

2018-01-02 Thread Jakub Kicinski
On Tue, 2 Jan 2018 16:35:36 -0800, Sridhar Samudrala wrote: > This patch series enables virtio to switch over to a VF datapath when a VF > netdev is present with the same MAC address. It allows live migration of a VM > with a direct attached VF without the need to setup a bond/team between a > VF

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

2017-12-20 Thread Jakub Kicinski
On Wed, 20 Dec 2017 18:16:30 -0800, Siwei Liu wrote: > > The plan is to remove the delay and do the naming in the kernel. > > This was suggested by Lennart since udev is only doing naming policy > > because kernel names were not repeatable. > > > > This makes the VF show up as "ethN_vf" on Hyper-V

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

2017-12-20 Thread Jakub Kicinski
On Thu, 21 Dec 2017 02:15:31 +0200, Michael S. Tsirkin wrote: > 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(str

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

2017-12-13 Thread Jakub Kicinski
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. > Regardless of whether they share the same backend device. > Only I am not sure the

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

2017-12-01 Thread Jakub Kicinski
On Thu, 30 Nov 2017 15:54:40 +0200, Michael S. Tsirkin wrote: > On Wed, Nov 29, 2017 at 07:51:38PM -0800, Jakub Kicinski wrote: > > On Thu, 30 Nov 2017 11:29:56 +0800, Jason Wang wrote: > > > On 2017年11月29日 03:27, Jesse Brandeburg wrote: > > > > Hi, I'd like to g

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

2017-12-01 Thread Jakub Kicinski
On Wed, 29 Nov 2017 20:10:09 -0800, Stephen Hemminger wrote: > On Wed, 29 Nov 2017 19:51:38 -0800 Jakub Kicinski wrote: > > On Thu, 30 Nov 2017 11:29:56 +0800, Jason Wang wrote: > > > On 2017年11月29日 03:27, Jesse Brandeburg wrote: > > > commit 0c195567a8f6e

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

2017-12-01 Thread Jakub Kicinski
On Thu, 30 Nov 2017 11:29:56 +0800, Jason Wang wrote: > On 2017年11月29日 03:27, Jesse Brandeburg wrote: > > Hi, I'd like to get some feedback on a proposal to enhance virtio-net > > to ease configuration of a VM and that would enable live migration of > > passthrough network SR-IOV devices. > > > >