Re: Best userspace programming API for XDP features query to kernel?
On Thu, 5 Apr 2018 14:47:16 -0700
Jakub Kicinski <jakub.kicinski@...> wrote: On Thu, 5 Apr 2018 22:51:33 +0200, Jesper Dangaard Brouer wrote:Let's keep thing separate.I think Daniel meant for nfp offload. The offload restrictions areWhat about nfp in terms of XDPNo, flags per BPF helper basis. As I've described above, helper belong I'm requesting something really simple. I want the driver to tell me what XDP actions it supports. We/I can implement an XDP_QUERY_ACTIONS via ndo_bpf, problem solved. It is small, specific and simple. For my other use-case of enabling XDP-xmit on a device, I can implement another ndo_bpf extension. Current approach today is loading a dummy XDP prog via ndo_bpf anyway (which is awkward). Again a specific change that let us move one-step further. For your nfp offload use-case, you/we have to find a completely different solution. You have hit a design choice made by BPF. Which is that BPF is part of the core kernel, and helpers cannot be loaded as kernel modules. As we cannot remove or add helpers after the verifier certified the program. And basically your nfp offload driver comes as a kernel module. (Details: and you basically already solved your issue by modifying the core verifier to do a call back to bpf_prog_offload_verify_insn()). Point being this is very different from what I'm requesting. Thus, for offloading you already have a solution, to my setup time detect problem, as your program gets rejected setup/load time by the verifier. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer
|
|