Re: FW: AF_XDP xdp_umem_reg.headroom XDP_ZEROCOPY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: papito favaro [mailto:papito.favaro@xxxxxxxxx]
> Sent: Monday, February 25, 2019 10:11 PM
> To: Jakub Kicinski <jakub.kicinski@xxxxxxxxxxxxx>
> Cc: xdp-newbies@xxxxxxxxxxxxxxx; Karlsson, Magnus <magnus.karlsson@xxxxxxxxx>; Björn Töpel <bjorn.topel@xxxxxxxxx>; Maciej Fijałkowski <maciejromanfijalkowski@xxxxxxxxx>; Jesper Dangaard Brouer <brouer@xxxxxxxxxx>
> Subject: Re: AF_XDP xdp_umem_reg.headroom XDP_ZEROCOPY
>
> Yes, would be nice that the documentation would mention this facts (like copy vs zerocopy differences) I also had an issue with the rx-path. In zerocopy is required that the fill ring be "initialized" (with indexes) before the setup of rx ring.
> In copy mode this can be done afterwards but in zerocopy must be done before. also not sure minimum (valid) sizes for the rings.
> sorry don't have a ixgbe to test this right now.

You are supposed to be able to insert entries into the fill ring at
any point in time independent on copy mode or zero-copy mode. That it
did not work was a bug in both the i40e and ixgbe drivers. Links to
patches below. As for documentation, yes it needs to be improved :-).
Anything else you would like to see in there?

i40e: https://lore.kernel.org/netdev/1548770597-16141-1-git-send-email-magnus.karlsson@xxxxxxxxx/.
ixgbe: https://lore.kernel.org/netdev/1548770630-16189-1-git-send-email-magnus.karlsson@xxxxxxxxx/

Thanks: Magnus

> anyway thanks for your time
>
> Il giorno lun 25 feb 2019 alle ore 21:10 Jakub Kicinski <jakub.kicinski@xxxxxxxxxxxxx> ha scritto:
> >
> > On Mon, 25 Feb 2019 10:16:15 +0100, papito favaro wrote:
> > > Hi all,
> > > I woulld like to understand if the behaviour i'm getting is correct.
> > >
> > > When I configure the XDP_UMEM_REG in zerocopy mode with a headroom
> > > ==
> > > 0 on a i40e,
> > > the driver (i guess) actually sets a headroom of 256.
> > > if i set a headroom == 256 the driver sets a headroom of 512.
> > >
> > > If this behaviour is correct, would be nice that the xdp_umem_reg
> > > struct after the setsockopt call would contain the actual configured
> > > headroom.
> >
> > Kernel's XDP may require up to 256B (XDP_PACKET_HEADROOM) of headroom
> > this is for calls to xdp_adjust_head() which may want to prepend data.
> > The AF_XDP headroom is extra, beyond that.
> >
> > Perhaps we should document that as expected behaviour?  (Does it hold
> > for ixgbe?)




[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux