From: "Jason A. Donenfeld" <Jason@xxxxxxxxx> Date: Sat, 15 Aug 2020 09:41:02 +0200 > A user reported that packets from wireguard were possibly ignored by XDP > [1]. Another user reported that modifying packets from layer 3 > interfaces results in impossible to diagnose drops. Jason this really is a minefield. If you make everything look like ethernet, even when it isn't, that is a huge pile of worms. If the XDP program changes the fake ethernet header's protocol field, what will update the next protocol field in the wireguard encapsulation headers so that it matches? How do you support pushing VLAN headers as some XDP programs do? What will undo the fake ethernet header and push the VLAN header into the right place, and set it's next protocol field correctly? And so on, and so forth... With so many unanswered questions and unclear semantics the only reasonable approach right now is to reject L3 devices from having XDP programs attached at this time. Arguably the best answer is the hardest answer, which is that we expose device protocols and headers exactly how they are and don't try to pretend they are something else. But it really means that XDP programs have to be written targetted to the attach point device type. And it also means we need a way to update skb->protocol properly, handle the pushing of new headers, etc. In short, you can't just push a fake ethernet header and expect everything to just work.