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-02-01 17:08:04
On Sat, 01 Feb 2020 17:24:39 +0100, Toke Høiland-Jørgensen wrote:
quoted
I'm weary of partially implemented XDP features, EGRESS prog does us no good when most drivers didn't yet catch up with the REDIRECTs.I kinda agree with this; but on the other hand, if we have to wait for all drivers to catch up, that would mean we couldn't add *anything* new that requires driver changes, which is not ideal either :/
If EGRESS is only for XDP frames we could try to hide the handling in the core (with slight changes to XDP_TX handling in the drivers), making drivers smaller and XDP feature velocity higher. I think loading the drivers with complexity is hurting us in so many ways..
quoted
And we're adding this before we considered the queuing problem. But if I'm alone in thinking this, and I'm not convincing anyone we can move on :)I do share your concern that this will end up being incompatible with whatever solution we end up with for queueing. However, I don't necessarily think it will: I view the XDP egress hook as something that in any case will run *after* packets are dequeued from whichever intermediate queueing it has been through (if any). I think such a hook is missing in any case; for instance, it's currently impossible to implement something like CoDel (which needs to know how long a packet spent in the queue) in eBPF.
Possibly 🤔 I don't have a good mental image of how the XDP queuing would work. Maybe once the queuing primitives are defined they can easily be hooked into the Qdisc layer. With Martin's recent work all we need is a fifo that can store skb pointers, really... It'd be good if the BPF queuing could replace TC Qdiscs, rather than layer underneath.