Re: XDP offload to hypervisor

2017-01-24 Thread Michael S. Tsirkin
On Wed, Jan 25, 2017 at 10:45:18AM +0800, Jason Wang wrote: > > > On 2017年01月24日 05:56, John Fastabend wrote: > > On 17-01-23 01:40 PM, Michael S. Tsirkin wrote: > > > I've been thinking about passing XDP programs from guest to the > > > hypervisor. Basically, after getting an incoming packet, w

Re: XDP offload to hypervisor

2017-01-24 Thread Michael S. Tsirkin
On Wed, Jan 25, 2017 at 10:41:24AM +0800, Jason Wang wrote: > > > On 2017年01月24日 05:40, Michael S. Tsirkin wrote: > > I've been thinking about passing XDP programs from guest to the > > hypervisor. Basically, after getting an incoming packet, we could run > > an XDP program in host kernel. > >

Re: XDP offload to hypervisor

2017-01-24 Thread Jason Wang
On 2017年01月24日 09:02, Alexei Starovoitov wrote: Frankly I don't understand the whole virtio nit picking that was happening. imo virtio+xdp by itself is only useful for debugging, development and testing of xdp programs in a VM. The discussion about performance of virtio+xdp will only be meaning

Re: XDP offload to hypervisor

2017-01-24 Thread Jason Wang
On 2017年01月24日 09:02, Alexei Starovoitov wrote: On Mon, Jan 23, 2017 at 11:40:29PM +0200, Michael S. Tsirkin wrote: I've been thinking about passing XDP programs from guest to the hypervisor. Basically, after getting an incoming packet, we could run an XDP program in host kernel. If the resu

Re: XDP offload to hypervisor

2017-01-24 Thread Jason Wang
On 2017年01月24日 05:56, John Fastabend wrote: On 17-01-23 01:40 PM, Michael S. Tsirkin wrote: I've been thinking about passing XDP programs from guest to the hypervisor. Basically, after getting an incoming packet, we could run an XDP program in host kernel. Interesting. I am planning on addi

Re: XDP offload to hypervisor

2017-01-24 Thread Jason Wang
On 2017年01月24日 05:40, Michael S. Tsirkin wrote: I've been thinking about passing XDP programs from guest to the hypervisor. Basically, after getting an incoming packet, we could run an XDP program in host kernel. If the result is XDP_DROP or XDP_TX we don't need to wake up the guest at all!

Re: XDP offload to hypervisor

2017-01-23 Thread Michael S. Tsirkin
On Mon, Jan 23, 2017 at 07:50:31PM -0800, Alexei Starovoitov wrote: > On Tue, Jan 24, 2017 at 05:33:37AM +0200, Michael S. Tsirkin wrote: > > On Mon, Jan 23, 2017 at 05:02:02PM -0800, Alexei Starovoitov wrote: > > > Frankly I don't understand the whole virtio nit picking that was > > > happening.

Re: XDP offload to hypervisor

2017-01-23 Thread Alexei Starovoitov
On Tue, Jan 24, 2017 at 05:33:37AM +0200, Michael S. Tsirkin wrote: > On Mon, Jan 23, 2017 at 05:02:02PM -0800, Alexei Starovoitov wrote: > > Frankly I don't understand the whole virtio nit picking that was happening. > > imo virtio+xdp by itself is only useful for debugging, development and > > t

Re: XDP offload to hypervisor

2017-01-23 Thread Michael S. Tsirkin
On Mon, Jan 23, 2017 at 05:02:02PM -0800, Alexei Starovoitov wrote: > Frankly I don't understand the whole virtio nit picking that was happening. > imo virtio+xdp by itself is only useful for debugging, development and testing > of xdp programs in a VM. The discussion about performance of virtio+xd

Re: XDP offload to hypervisor

2017-01-23 Thread Michael S. Tsirkin
On Mon, Jan 23, 2017 at 05:02:02PM -0800, Alexei Starovoitov wrote: > > Another issue is around host/guest ABI. Guest BPF could add new features > > at any point. What if hypervisor can not support it all? I guess we > > could try loading program into hypervisor and run it within guest on > > fail

Re: XDP offload to hypervisor

2017-01-23 Thread Alexei Starovoitov
On Mon, Jan 23, 2017 at 11:40:29PM +0200, Michael S. Tsirkin wrote: > I've been thinking about passing XDP programs from guest to the > hypervisor. Basically, after getting an incoming packet, we could run > an XDP program in host kernel. > > If the result is XDP_DROP or XDP_TX we don't need to w

Re: XDP offload to hypervisor

2017-01-23 Thread Michael S. Tsirkin
On Mon, Jan 23, 2017 at 01:56:16PM -0800, John Fastabend wrote: > On 17-01-23 01:40 PM, Michael S. Tsirkin wrote: > > I've been thinking about passing XDP programs from guest to the > > hypervisor. Basically, after getting an incoming packet, we could run > > an XDP program in host kernel. > > >

Re: XDP offload to hypervisor

2017-01-23 Thread John Fastabend
On 17-01-23 01:40 PM, Michael S. Tsirkin wrote: > I've been thinking about passing XDP programs from guest to the > hypervisor. Basically, after getting an incoming packet, we could run > an XDP program in host kernel. > Interesting. I am planning on adding XDP to tun driver. My use case is we w

XDP offload to hypervisor

2017-01-23 Thread Michael S. Tsirkin
I've been thinking about passing XDP programs from guest to the hypervisor. Basically, after getting an incoming packet, we could run an XDP program in host kernel. If the result is XDP_DROP or XDP_TX we don't need to wake up the guest at all! When using tun for networking - especially with adju