On Tue, Jan 17, 2017 at 02:22:59PM -0800, John Fastabend wrote: > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 62dbf4b..3b129b4 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -41,6 +41,9 @@ > #define GOOD_PACKET_LEN (ETH_HLEN + VLAN_HLEN + ETH_DATA_LEN) > #define GOOD_COPY_LEN 128 > > +/* Amount of XDP headroom to prepend to packets for use by xdp_adjust_head */ > +#define VIRTIO_XDP_HEADROOM 256 > + > /* RX packet size EWMA. The average packet size is used to determine the > packet > * buffer size when refilling RX rings. As the entire RX ring may be refilled > * at once, the weight is chosen so that the EWMA will be insensitive to > short-
I wonder where does this number come from? This is quite a lot and means that using XDP_PASS will slow down any sockets on top of it. Which in turn means people will try to remove XDP when not in use, causing resets. E.g. build_skb (which I have a patch to switch to) uses a much more reasonable NET_SKB_PAD. -- MST