On 10/8/20 10:07 AM, Jesper Dangaard Brouer wrote:
[...]
However, due to both gso and vlan offload, even this is not trivial to do...
The mtu is L3, but drivers/hardware/the wire usually care about L2...
If net_device->mtu is L3 (1500) and XDP (and TC, right?) operate at L2,
that likely means that the "strict" bpf_mtu_check (in my BPF-helper) is
wrong, as XDP (and TC) length at this point include the 14 bytes
Ethernet header. I will check and fix.
Yes, both at L2 layer.
Is this accounted for via net_device->hard_header_len ?
It is, see also ether_setup().