All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	"dsahern@gmail.com" <dsahern@gmail.com>,
	Camelia Alexandra Groza <camelia.groza@nxp.com>
Subject: RE: [PATCH v2 net-next 0/8] dpaa2-eth: Introduce XDP support
Date: Thu, 13 Dec 2018 17:43:16 +0000	[thread overview]
Message-ID: <AM0PR04MB49943C0F634AD2B735E60FAD94A00@AM0PR04MB4994.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <AM0PR04MB4994069A30049AE6C34D442194AA0@AM0PR04MB4994.eurprd04.prod.outlook.com>

> -----Original Message-----
> From: Ioana Ciocoi Radulescu
> Sent: Friday, December 7, 2018 8:08 PM
> To: 'Ilias Apalodimas' <ilias.apalodimas@linaro.org>
> Cc: Jesper Dangaard Brouer <brouer@redhat.com>;
> netdev@vger.kernel.org; davem@davemloft.net; Ioana Ciornei
> <ioana.ciornei@nxp.com>; dsahern@gmail.com; Camelia Alexandra Groza
> <camelia.groza@nxp.com>
> Subject: RE: [PATCH v2 net-next 0/8] dpaa2-eth: Introduce XDP support
> 
> > -----Original Message-----
> > From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> > Sent: Friday, December 7, 2018 7:52 PM
> > To: Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com>
> > Cc: Jesper Dangaard Brouer <brouer@redhat.com>;
> > netdev@vger.kernel.org; davem@davemloft.net; Ioana Ciornei
> > <ioana.ciornei@nxp.com>; dsahern@gmail.com; Camelia Alexandra Groza
> > <camelia.groza@nxp.com>
> > Subject: Re: [PATCH v2 net-next 0/8] dpaa2-eth: Introduce XDP support
> >
> > Hi Ioana,
> > > > > >
> > > > I only did a quick grep around the driver so i might be missing
> something,
> > > > but i can only see allocations via napi_alloc_frag(). XDP requires pages
> > > > (either a single page per packet or a driver that does the page
> > management
> > > > of
> > > > its own and fits 2 frames in a single page, assuming 4kb pages).
> > > > Am i missing something on the driver?
> > >
> > > No, I guess I'm the one missing stuff, I didn't realise single page per
> packet
> > > is a hard requirement for XDP. Could you point me to more info on this?
> > >
> >
> > Well if you don't have to use 64kb pages you can use the page_pool API
> (only
> > used from mlx5 atm) and get the xdp recycling for free. The memory
> 'waste'
> > for
> > 4kb pages isn't too much if the platforms the driver sits on have decent
> > amounts
> > of memory  (and the number of descriptors used is not too high).
> > We still have work in progress with Jesper (just posted an RFC)with
> > improvements
> > on the API.
> > Using it is fairly straightforward. This is a patchset on marvell's mvneta
> > driver with the API changes needed:
> > https://www.spinics.net/lists/netdev/msg538285.html
> >
> > If you need 64kb pages you would have to introduce page recycling and
> > sharing
> > like intel/mlx drivers on your driver.
> 
> Thanks a lot for the info, will look into this. Do you have any pointers
> as to why the full page restriction exists in the first place? Sorry if it's
> a dumb question, but I haven't found details on this and I'd really like
> to understand it.

After a quick glance, not sure we can use page_pool API.

The problem is our driver is not ring-based: we have a single
buffer pool used by all Rx queues, so using page_pool allocations
would imply adding a layer of synchronization in our driver.

I'm still trying to figure out how deep is the trouble we're in
for not using single page per packet in our driver, considering
we don't support XDP_REDIRECT yet. Guess I'll wait for Jasper's
answer for this.

Thanks,
Ioana

  reply	other threads:[~2018-12-13 17:44 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-26 16:27 [PATCH v2 net-next 0/8] dpaa2-eth: Introduce XDP support Ioana Ciocoi Radulescu
2018-11-26 16:27 ` [PATCH v2 net-next 1/8] dpaa2-eth: Add basic " Ioana Ciocoi Radulescu
2018-11-27 15:45   ` Camelia Alexandra Groza
2018-11-28 16:11   ` David Ahern
2018-11-26 16:27 ` [PATCH v2 net-next 2/8] dpaa2-eth: Allow XDP header adjustments Ioana Ciocoi Radulescu
2018-11-26 16:27 ` [PATCH v2 net-next 4/8] dpaa2-eth: Release buffers back to pool on XDP_DROP Ioana Ciocoi Radulescu
2018-11-26 16:27 ` [PATCH v2 net-next 3/8] dpaa2-eth: Move function Ioana Ciocoi Radulescu
2018-11-26 16:27 ` [PATCH v2 net-next 5/8] dpaa2-eth: Map Rx buffers as bidirectional Ioana Ciocoi Radulescu
2018-11-26 16:27 ` [PATCH v2 net-next 6/8] dpaa2-eth: Add support for XDP_TX Ioana Ciocoi Radulescu
2018-11-26 16:27 ` [PATCH v2 net-next 7/8] dpaa2-eth: Cleanup channel stats Ioana Ciocoi Radulescu
2018-11-26 16:27 ` [PATCH v2 net-next 8/8] dpaa2-eth: Add xdp counters Ioana Ciocoi Radulescu
2018-11-28 16:11   ` David Ahern
2018-11-28  0:24 ` [PATCH v2 net-next 0/8] dpaa2-eth: Introduce XDP support David Miller
2018-11-28  9:18   ` Ioana Ciocoi Radulescu
2018-11-28 16:10     ` David Ahern
2018-11-28 18:57     ` David Miller
2018-12-05 15:45 ` Jesper Dangaard Brouer
2018-12-07 16:54   ` Ioana Ciocoi Radulescu
2018-12-07 17:20     ` Ilias Apalodimas
2018-12-07 17:42       ` Ioana Ciocoi Radulescu
2018-12-07 17:51         ` Ilias Apalodimas
2018-12-07 18:07           ` Ioana Ciocoi Radulescu
2018-12-13 17:43             ` Ioana Ciocoi Radulescu [this message]
2018-12-13 18:47               ` Ilias Apalodimas
2018-12-21 15:31             ` Explaining the XDP page-requirement (Was: [PATCH v2 net-next 0/8] dpaa2-eth: Introduce XDP support) Jesper Dangaard Brouer
2019-01-07 10:34               ` Ioana Ciocoi Radulescu
2019-01-07 10:45                 ` Ilias Apalodimas
2019-01-07 10:49                   ` Ioana Ciocoi Radulescu
2019-01-07 10:53                     ` Ilias Apalodimas
2019-01-09 14:22               ` Madalin-cristian Bucur
2019-01-09 14:25                 ` Ilias Apalodimas

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=AM0PR04MB49943C0F634AD2B735E60FAD94A00@AM0PR04MB4994.eurprd04.prod.outlook.com \
    --to=ruxandra.radulescu@nxp.com \
    --cc=brouer@redhat.com \
    --cc=camelia.groza@nxp.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=ioana.ciornei@nxp.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.