Re: [PATCH bpf-next 03/12] net: Add IFLA_XDP_EGRESS for XDP programs in the egress path
From: Jakub Kicinski <kuba@kernel.org>
Date: 2020-01-27 14:16:26
From: Jakub Kicinski <kuba@kernel.org>
Date: 2020-01-27 14:16:26
On Sun, 26 Jan 2020 21:03:15 -0700, David Ahern wrote:
On 1/26/20 3:11 PM, Jakub Kicinski wrote:quoted
I looked through the commit message and the cover letter again, and you never explain why you need the egress hook. Could you please clarify your needs?XDP is about efficient network processing - ie., bypassing the Linux stack when it does not make sense for the person deploying some solution. XDP right now is Rx centric.
Network hardware is also "Rx centric" and somehow it works..
I want to run an ebpf program in the Tx path of the NIC regardless of how the packet arrived at the device -- as an skb or an xdp_frame. There are options for running programs on skb-based packets (e.g., tc). There are *zero* options for manipulating/controlling/denying xdp_frames - e.g., one REDIRECTED from an ingress device.
Okay - so no precise use case. You can run the same program at the end of whatever is doing the redirect (especially with Alexei's work on linking) and from cls_bpf 🤷♂️ I'm sure all driver authors can't wait to plough through their TX paths :/