[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180910162132.GA16240@apalos>
Date: Mon, 10 Sep 2018 19:21:32 +0300
From: Ilias Apalodimas <ilias.apalodimas@...aro.org>
To: Toshiaki Makita <makita.toshiaki@....ntt.co.jp>
Cc: netdev@...r.kernel.org, jaswinder.singh@...aro.org,
ard.biesheuvel@...aro.org, masami.hiramatsu@...aro.org,
arnd@...db.de, mykyta.iziumtsev@...aro.org, bjorn.topel@...el.com,
magnus.karlsson@...el.com
Subject: Re: [net-next, PATCH 2/2, v1] net: socionext: add AF_XDP support
> > @@ -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
Powered by blists - more mailing lists