Re: [PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2020/5/6 下午5:54, Michael S. Tsirkin wrote:
On Wed, May 06, 2020 at 04:19:40PM +0800, Jason Wang wrote:
On 2020/5/6 下午3:53, Michael S. Tsirkin wrote:
On Wed, May 06, 2020 at 02:16:32PM +0800, Jason Wang wrote:
We tried to reserve space for vnet header before
xdp.data_hard_start. But this is useless since the packet could be
modified by XDP which may invalidate the information stored in the
header and there's no way for XDP to know the existence of the vnet
header currently.
What do you mean? Doesn't XDP_PASS use the header in the buffer?
We don't, see 436c9453a1ac0 ("virtio-net: keep vnet header zeroed after
processing XDP")

If there's other place, it should be a bug.


So let's just not reserve space for vnet header in this case.
In any case, we can find out XDP does head adjustments
if we need to.
But XDP program can modify the packets without adjusting headers.

Thanks
Then what's the problem?


Then we can't do anything more than just invalidating vnet header since we don't know whether or not the packet has been modified or not.

Technically, XDP can give the driver some hint about whether or not the packet has been modified, but AFAIK we haven't implemented this yet.

Thanks







[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux