Subject: Re: [RFC PATCH 00/14] Introducing AF_PACKET V4 support

From: Jesper Dangaard Brouer <[email-masked]>
Date: Thu, 16 Nov 2017 09:26:15 +0100

On Thu, 16 Nov 2017 08:09:04 +0100 Björn Töpel <[email-masked]> wrote:

> Ideally, it would be best not having to introduce yet another xmit
> ndo. I believe ndo_xdp_xmit/ndo_xdp_flush would be the best fit, but
> we need to extend it with a destructor callback and potentially some
> kind of DMA trait. Why DMA? For zerocopy, we know the working set of
> packet buffers, so they are DMA mapped up front, whereas ndo_xdp_xmit
> does yet another DMA mapping. Paying for the DMA mapping in the
> fast-path is something we'd like to avoid.

I like your idea of reusing ndo_xdp_xmit/ndo_xdp_flush.  At NetConf I
think we agreed that the ndo_xdp_xmit API likely need to change. See[1]
slide 11.  Andy Gospodarek and Michael Chan wanted to look into the
needed API changes (Cc'ed) thus, lets keep them in the loop.

I also appreciate that you are thinking about avoiding the DMA-mapping
at TX.  It would be a welcomed optimization.

[1] http://people.netfilter.org/hawk/presentations/NetConf2017_Seoul/XDP_devel_update_NetConf2017_Seoul.pdf
-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer