Well, I thought about this for some time. The main problem is, as I already experimented with, the bpf verifier. It does effectively prevent sure bugs and kernel panics, but it's also full of false positives (e.g. parsing optional headers with tlv format is a huge pain). My use-case is a dataplane for tunnel encap/decap, keeping track of the right sessions and their accounting, packet classification, routing, and some other smaller things. In my view, clearly it's almost impossible doing all of this in XDP, therefore the choice of AF_XDP. I hope this makes sense. Thank you Il giorno gio 7 feb 2019 alle ore 08:16 Björn Töpel <bjorn.topel@xxxxxxxxx> ha scritto: > > Den mån 4 feb. 2019 kl 12:13 skrev Pavel Popa <pashinho1990@xxxxxxxxx>: > > > > Hi all, > > > > Is there any way to perform routing in user-space with AF_XDP without > > too much hassle? The only way I see at the moment is to replicate in > > user-space the kernel's FIB state via RTNL events, and performing > > afterwards the IP routing lookup using some LPM algorithm > > implementation. Is there an "easier" way for doing this? > > > > Are you sure that AF_XDP is the right approach? If you'd like to use > internal kernel structures, like the FIB, XDP is probably the right > tool. > > What is your use-case? Could it be that XDP is a better fit? > > Thanks, > Björn > > > > Thank you