Re: [RFC net-next 08/18] tun: run offloaded XDP program in Tx path

2019-12-01 Thread Jason Wang
On 2019/12/2 上午5:54, David Miller wrote: From: "Michael S. Tsirkin" Date: Sun, 1 Dec 2019 16:40:22 -0500 Right. But it is helpful to expose the supported functionality to guest in some way, if nothing else then so that guests can be moved between different hosts. Also, we need a way to repo

Re: [RFC net-next 08/18] tun: run offloaded XDP program in Tx path

2019-12-01 Thread Jason Wang
On 2019/12/2 上午12:39, David Ahern wrote: On 11/26/19 4:07 AM, Prashant Bhole wrote: run offloaded XDP program as soon as packet is removed from the ptr ring. Since this is XDP in Tx path, the traditional handling of XDP actions XDP_TX/REDIRECT isn't valid. For this reason we call do_xdp_generi

Re: [RFC net-next 08/18] tun: run offloaded XDP program in Tx path

2019-12-01 Thread David Miller
From: "Michael S. Tsirkin" Date: Sun, 1 Dec 2019 16:40:22 -0500 > Right. But it is helpful to expose the supported functionality > to guest in some way, if nothing else then so that > guests can be moved between different hosts. > > Also, we need a way to report this kind of event to guest > so

Re: [RFC net-next 08/18] tun: run offloaded XDP program in Tx path

2019-12-01 Thread Michael S. Tsirkin
On Sun, Dec 01, 2019 at 12:56:21PM -0800, David Miller wrote: > From: David Ahern > Date: Sun, 1 Dec 2019 09:39:54 -0700 > > > Below you just drop the packet which is going to be a bad user > > experience. A better user experience is to detect XDP return codes a > > program uses, catch those that

Re: [RFC net-next 08/18] tun: run offloaded XDP program in Tx path

2019-12-01 Thread David Miller
From: David Ahern Date: Sun, 1 Dec 2019 09:39:54 -0700 > Below you just drop the packet which is going to be a bad user > experience. A better user experience is to detect XDP return codes a > program uses, catch those that are not supported for this use case and > fail the install of the program

Re: [RFC net-next 08/18] tun: run offloaded XDP program in Tx path

2019-12-01 Thread David Ahern
On 11/26/19 4:07 AM, Prashant Bhole wrote: > run offloaded XDP program as soon as packet is removed from the ptr > ring. Since this is XDP in Tx path, the traditional handling of > XDP actions XDP_TX/REDIRECT isn't valid. For this reason we call > do_xdp_generic_core instead of do_xdp_generic. do_x

[RFC net-next 08/18] tun: run offloaded XDP program in Tx path

2019-11-26 Thread Prashant Bhole
run offloaded XDP program as soon as packet is removed from the ptr ring. Since this is XDP in Tx path, the traditional handling of XDP actions XDP_TX/REDIRECT isn't valid. For this reason we call do_xdp_generic_core instead of do_xdp_generic. do_xdp_generic_core just runs the program and leaves th