From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
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
Subject: Re: [net-next, PATCH 2/2, v1] net: socionext: add AF_XDP support
Date: Mon, 10 Sep 2018 19:21:32 +0300 [thread overview]
Message-ID: <20180910162132.GA16240@apalos> (raw)
In-Reply-To: <8bfd8219-acea-8b63-b6be-d17a7e3b6e24@lab.ntt.co.jp>
> > @@ -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
next prev parent reply other threads:[~2018-09-10 21:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 8:24 [net-next, PATCH 0/2, v1] net: socionext: add AF_XDP support Ilias Apalodimas
2018-09-10 8:24 ` [net-next, PATCH 1/2, v1] net: socionext: different approach on DMA Ilias Apalodimas
2018-09-10 8:24 ` [net-next, PATCH 2/2, v1] net: socionext: add AF_XDP support Ilias Apalodimas
2018-09-10 10:56 ` Toshiaki Makita
2018-09-10 11:20 ` Ilias Apalodimas
2018-09-10 16:21 ` Ilias Apalodimas [this message]
2018-09-11 0:45 ` Toshiaki Makita
2018-09-10 10:06 ` [net-next, PATCH 0/2, " Björn Töpel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180910162132.GA16240@apalos \
--to=ilias.apalodimas@linaro.org \
--cc=ard.biesheuvel@linaro.org \
--cc=arnd@arndb.de \
--cc=bjorn.topel@intel.com \
--cc=jaswinder.singh@linaro.org \
--cc=magnus.karlsson@intel.com \
--cc=makita.toshiaki@lab.ntt.co.jp \
--cc=masami.hiramatsu@linaro.org \
--cc=mykyta.iziumtsev@linaro.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).