Re: [Intel-wired-lan] [PATCH bpf-next v4 03/11] libbpf: add flags to umem config

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

 



On Wed, Jul 31, 2019 at 8:21 AM Björn Töpel <bjorn.topel@xxxxxxxxx> wrote:
>
> On Tue, 30 Jul 2019 at 19:43, Kevin Laatz <kevin.laatz@xxxxxxxxx> wrote:
> >
> > This patch adds a 'flags' field to the umem_config and umem_reg structs.
> > This will allow for more options to be added for configuring umems.
> >
> > The first use for the flags field is to add a flag for unaligned chunks
> > mode. These flags can either be user-provided or filled with a default.
> >
> > Signed-off-by: Kevin Laatz <kevin.laatz@xxxxxxxxx>
> > Signed-off-by: Ciara Loftus <ciara.loftus@xxxxxxxxx>
> >
> > ---
> > v2:
> >   - Removed the headroom check from this patch. It has moved to the
> >     previous patch.
> >
> > v4:
> >   - modified chunk flag define
> > ---

[...]

> > diff --git a/tools/lib/bpf/xsk.h b/tools/lib/bpf/xsk.h
> > index 833a6e60d065..44a03d8c34b9 100644
> > --- a/tools/lib/bpf/xsk.h
> > +++ b/tools/lib/bpf/xsk.h
> > @@ -170,12 +170,14 @@ LIBBPF_API int xsk_socket__fd(const struct xsk_socket *xsk);
> >  #define XSK_UMEM__DEFAULT_FRAME_SHIFT    12 /* 4096 bytes */
> >  #define XSK_UMEM__DEFAULT_FRAME_SIZE     (1 << XSK_UMEM__DEFAULT_FRAME_SHIFT)
> >  #define XSK_UMEM__DEFAULT_FRAME_HEADROOM 0
> > +#define XSK_UMEM__DEFAULT_FLAGS 0
> >
> >  struct xsk_umem_config {
> >         __u32 fill_size;
> >         __u32 comp_size;
> >         __u32 frame_size;
> >         __u32 frame_headroom;
> > +       __u32 flags;
>
> And the flags addition here, unfortunately, requires symbol versioning
> of xsk_umem__create(). That'll be the first in libbpf! :-)

xsk_umem_config is passed by pointer to xsk_umem__create(), so this
doesn't break ABI, does it?

>
>
> Björn
>
> >  };
> >
> >  /* Flags for the libbpf_flags field. */
> > --
> > 2.17.1
> >
> > _______________________________________________
> > Intel-wired-lan mailing list
> > Intel-wired-lan@xxxxxxxxxx
> > https://lists.osuosl.org/mailman/listinfo/intel-wired-lan




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux