From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesper Dangaard Brouer Subject: Re: [RFC PATCH 00/14] Introducing AF_PACKET V4 support Date: Thu, 16 Nov 2017 09:26:15 +0100 Message-ID: <20171116092615.3581d368@redhat.com> References: <20171031124145.9667-1-bjorn.topel@gmail.com> <2ea8c29a-25bb-c632-9622-3a8b123ce32c@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Cc: Willem de Bruijn , Alexei Starovoitov , John Fastabend , "Karlsson, Magnus" , "Duyck, Alexander H" , Alexander Duyck , michael.lundkvist@ericsson.com, ravineet.singh@ericsson.com, Daniel Borkmann , Netdev , Tushar Dave , Eric Dumazet , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , "Brandeburg, Jesse" , "Singhai, Anjali" , "Rosen, Rami" , "Shaw, Jeffrey B" , "Yigit, Ferruh" , To: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49490 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752152AbdKPI02 (ORCPT ); Thu, 16 Nov 2017 03:26:28 -0500 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 16 Nov 2017 08:09:04 +0100 Björn Töpel 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