Subject: Re: [PATCH v2 bpf-next 06/17] net: Add IFLA_XDP_EGRESS for XDP programs in the egress path

From: Jesper Dangaard Brouer <[email-masked]>
Date: Fri, 24 Apr 2020 11:56:16 +0200

On Thu, 23 Apr 2020 20:11:37 -0600
David Ahern <[email-masked]> wrote:

> Running programs in the egress path, on skbs or xdp_frames, does not
> require driver specific resources like Rx path. Accordingly, the
> programs can be run in core code, so add xdp_egress_prog to net_device
> to hold a reference to an attached program.

I disagree.  The TX path does need driver specific resources, most
importantly information about the TX-queue that was used.

That said, I think this patch is the right design, to place this more
centrally in the net-core code, as driver changes are harder to
maintain and generally painful (I speak from experience ;-)).

After this patchset goes in, we need continue this work, and find a
solution for the XDP-redirect overflow problem, and TX-queue selection.
We might still have some driver work ahead, as I think we can change the
ndo_xdp_xmit() API, to give us the information I'm looking for.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer