From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilias Apalodimas Subject: Re: [PATCH v2] net: mvneta: add basic XDP_DROP support Date: Mon, 24 Dec 2018 08:59:58 +0200 Message-ID: <20181224065958.GA16682@apalos> References: <20181221132223.14012-1-domagoj.pintaric@sartura.hr> <20181222115254.2001201b@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Domagoj Pintaric , netdev@vger.kernel.org, Luka Perkov , Thomas Petazzoni , "David S . Miller" , Marcin Wojtas To: Jesper Dangaard Brouer Return-path: Received: from mail-wr1-f66.google.com ([209.85.221.66]:36169 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725927AbeLXHAF (ORCPT ); Mon, 24 Dec 2018 02:00:05 -0500 Received: by mail-wr1-f66.google.com with SMTP id u4so10734915wrp.3 for ; Sun, 23 Dec 2018 23:00:02 -0800 (PST) Content-Disposition: inline In-Reply-To: <20181222115254.2001201b@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: Hi Domagoj, > > Add initial mvneta XDP support for hardware buffer management enabled > > devices only. > > Hi Domagoj, > > I would really appreciate if we could coordinate our work on the mvneta > driver. Ilias (Cc'ed) and I are also working on adding XDP support for > this driver, although this is the software-buffer side of the driver we > have functioning now. Yes please, Jesper and i didn't have access to hardware with BM. Let's sync up and try to provide XDP for both. > > You can directly follow our progress here: [1][2] > [1] https://github.com/xdp-project/xdp-project/blob/master/areas/arm64/board_espressobin04_bench_xdp.org > [2] https://github.com/apalos/bpf-next/commits/mvneta_04_page_pool_recycle_xdp > > You XDP-setup function is actually more correct that ours[3], as you > handle BPF per queue (which we were planning to fix before upstreaming). > > That said, adding XDP_DROP is easy, but I want to see more of the XDP > features/actions added, as those require a lot more work. I always > worry that a driver will stop at just XDP_DROP, so what are your plans > for adding the harder features? > > Even-thought XDP_DROP looks easy in this patch, then you are actually > doing some wrong, as XDP can also modify frames before doing XDP_PASS, > and (1) you have non-standard-head room (MVNETA_MH_SIZE + NET_SKB_PAD), > (2) and you don't handle if XDP changed the xdp.data header pointer, > and (3) you backing memory either comes from page-fragments or kmalloc > which also goes against the XDP memory requirements. > [3] https://github.com/apalos/bpf-next/commit/4b567e74552d3cdf55 Our patches use the page_pool API for this (the mvneta SWBM part of the driver was already allocating pages for backing up descriptors) Thanks! /Ilias