[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC net-next 00/18] virtio_net XDP offload
From: |
Jakub Kicinski |
Subject: |
Re: [RFC net-next 00/18] virtio_net XDP offload |
Date: |
Tue, 26 Nov 2019 12:35:14 -0800 |
On Tue, 26 Nov 2019 19:07:26 +0900, Prashant Bhole wrote:
> Note: This RFC has been sent to netdev as well as qemu-devel lists
>
> This series introduces XDP offloading from virtio_net. It is based on
> the following work by Jason Wang:
> https://netdevconf.info/0x13/session.html?xdp-offload-with-virtio-net
>
> Current XDP performance in virtio-net is far from what we can achieve
> on host. Several major factors cause the difference:
> - Cost of virtualization
> - Cost of virtio (populating virtqueue and context switching)
> - Cost of vhost, it needs more optimization
> - Cost of data copy
> Because of above reasons there is a need of offloading XDP program to
> host. This set is an attempt to implement XDP offload from the guest.
This turns the guest kernel into a uAPI proxy.
BPF uAPI calls related to the "offloaded" BPF objects are forwarded
to the hypervisor, they pop up in QEMU which makes the requested call
to the hypervisor kernel. Today it's the Linux kernel tomorrow it may
be someone's proprietary "SmartNIC" implementation.
Why can't those calls be forwarded at the higher layer? Why do they
have to go through the guest kernel?
If kernel performs no significant work (or "adds value", pardon the
expression), and problem can easily be solved otherwise we shouldn't
do the work of maintaining the mechanism.
The approach of kernel generating actual machine code which is then
loaded into a sandbox on the hypervisor/SmartNIC is another story.
I'd appreciate if others could chime in.
- [RFC net-next 09/18] tun: add a way to inject Tx path packet into Rx path, (continued)
- [RFC net-next 09/18] tun: add a way to inject Tx path packet into Rx path, Prashant Bhole, 2019/11/26
- [RFC net-next 07/18] tun: set offloaded xdp program, Prashant Bhole, 2019/11/26
- [RFC net-next 02/18] net: core: rename netif_receive_generic_xdp() to do_generic_xdp_core(), Prashant Bhole, 2019/11/26
- [RFC net-next 01/18] bpf: introduce bpf_prog_offload_verifier_setup(), Prashant Bhole, 2019/11/26
- [RFC net-next 13/18] virtio_net: use XDP attachment helpers, Prashant Bhole, 2019/11/26
- [RFC net-next 11/18] tun: run xdp prog when tun is read from file interface, Prashant Bhole, 2019/11/26
- [RFC net-next 08/18] tun: run offloaded XDP program in Tx path, Prashant Bhole, 2019/11/26
- [RFC net-next 06/18] tuntap: remove usage of ptr ring in vhost_net, Prashant Bhole, 2019/11/26
- [RFC net-next 03/18] net: core: export do_xdp_generic_core(), Prashant Bhole, 2019/11/26
- [RFC net-next 05/18] vhost_net: user tap recvmsg api to access ptr ring, Prashant Bhole, 2019/11/26
- Re: [RFC net-next 00/18] virtio_net XDP offload,
Jakub Kicinski <=
- Re: [RFC net-next 00/18] virtio_net XDP offload, Michael S. Tsirkin, 2019/11/27
- Re: [RFC net-next 00/18] virtio_net XDP offload, Alexei Starovoitov, 2019/11/27