On 11/11, Tianyi Gao wrote: > Hi Stanislav, > > On 11/10, Stanislav Fomichev wrote: > > Awhile ago we discussed the alternative of adding setters for xdp > > metadata. Then the veth (or whoever turns xdp frame into an skb) can > > apply whatever metadata it needs (and there is some magic behind the > > scenes that takes it into account when creating an skb). That keeps > > the layout and most of the code outside of kernel. Have we considered > > that here? > > Thanks for the reminder. Yes, we considered [1] and [2], and took > parts of them. > > The alternative setter model in [1] requires a program on veth or > cpumap to call the setters for the RX metadata. We want to avoid that: > > - On veth, an XDP program removes software GSO from the peer, limits > its MTU, and can copy skbs from the peer. > - On cpumap, each entry would need a program only for this. > > This series achieves the same with only the XDP program on the NIC, > which stores the values with kfuncs in the skb core extension area > after the xdp_frame. cpumap and veth take this area into account when > they create the skb, which is the "magic behind the scenes". > > [1] https://lore.kernel.org/all/[email protected]/ > [2] https://lore.kernel.org/all/aGvcb53APFXR8eJb@mini-arch/
My main concern is that we are adding a lot of code and one more special way to plumb the metadata (and another metadata area), another set of kfuncs and slowly creeping more features into xdp making it more and more like skb. For containers in general, and for fast af_/xdp, we seem to have been moving into netkit with queue leasing. Maybe that's something that can help with your veth performance?
