From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilias Apalodimas Subject: Re: [net-next, PATCH 2/2, v1] net: socionext: add AF_XDP support Date: Mon, 10 Sep 2018 19:21:32 +0300 Message-ID: <20180910162132.GA16240@apalos> References: <1536567880-15097-1-git-send-email-ilias.apalodimas@linaro.org> <1536567880-15097-3-git-send-email-ilias.apalodimas@linaro.org> <8bfd8219-acea-8b63-b6be-d17a7e3b6e24@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, jaswinder.singh@linaro.org, ard.biesheuvel@linaro.org, masami.hiramatsu@linaro.org, arnd@arndb.de, mykyta.iziumtsev@linaro.org, bjorn.topel@intel.com, magnus.karlsson@intel.com To: Toshiaki Makita Return-path: Received: from mail-wr1-f67.google.com ([209.85.221.67]:34517 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727777AbeIJVQ3 (ORCPT ); Mon, 10 Sep 2018 17:16:29 -0400 Received: by mail-wr1-f67.google.com with SMTP id g33-v6so22640042wrd.1 for ; Mon, 10 Sep 2018 09:21:37 -0700 (PDT) Content-Disposition: inline In-Reply-To: <8bfd8219-acea-8b63-b6be-d17a7e3b6e24@lab.ntt.co.jp> Sender: netdev-owner@vger.kernel.org List-ID: > > @@ -707,6 +731,26 @@ static int netsec_process_rx(struct netsec_priv *priv, int budget) > > if (unlikely(!buf_addr)) > > break; > > > > + if (xdp_prog) { > > + xdp_result = netsec_run_xdp(desc, priv, xdp_prog, > > + pkt_len); > > + if (xdp_result != NETSEC_XDP_PASS) { > > + xdp_flush |= xdp_result & NETSEC_XDP_REDIR; > > + > > + dma_unmap_single_attrs(priv->dev, > > + desc->dma_addr, > > + desc->len, DMA_TO_DEVICE, > > + DMA_ATTR_SKIP_CPU_SYNC); > > + > > + desc->len = desc_len; > > + desc->dma_addr = dma_handle; > > + desc->addr = buf_addr; > > + netsec_rx_fill(priv, idx, 1); > > + nsetsec_adv_desc(&dring->tail); > > + } > > + continue; > > Continue even on XDP_PASS? Is this really correct? > > Also seems there is no handling of adjust_head/tail for XDP_PASS case. > A question on this. Should XDP related frames be allocated using 1 page per packet? Thanks Ilias