Re: [PATCH bpf-next 2/2] libbpf: xsk: move barriers from libbpf_util.h to xsk.h

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

 



On Wed, Mar 10, 2021 at 10:59 PM Björn Töpel <bjorn.topel@xxxxxxxxx> wrote:
>
> On 2021-03-11 01:06, Jonathan Lemon wrote:
> > On Wed, Mar 10, 2021 at 09:09:29AM +0100, Björn Töpel wrote:
> >> From: Björn Töpel <bjorn.topel@xxxxxxxxx>
> >>
> >> The only user of libbpf_util.h is xsk.h. Move the barriers to xsk.h,
> >> and remove libbpf_util.h. The barriers are used as an implementation
> >> detail, and should not be considered part of the stable API.
> >
> > Does that mean that anything else which uses the same type of
> > shared rings (bpf ringbuffer, io_uring, zctap) have to implement
> > the same primitives that xsk.h has?
> >
>
> Jonathan, there's a longer explanation on back-/forward-compatibility in
> the commit message [1]. Again, this is for the XDP socket rings, so I
> wont comment on the other rings. I would not assume compatibility
> between different rings (e.g. the bpf ringbuffer and XDP sockets rings),
> not even prior the barrier change.
>
>

BPF ringbuf is using smp_store_release()/smp_load_acquire(), which are
coming from asm/barrier.h. But libbpf abstracts all the low-level
details, so users don't have to use such low-level primitives
directly.

> Björn
>
> [1]
> https://lore.kernel.org/bpf/20210305094113.413544-2-bjorn.topel@xxxxxxxxx/
>




[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