[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sun, 5 May 2019 00:08:54 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Y Song <ys114321@...il.com>
Cc: William Tu <u9012063@...il.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
netdev <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
Magnus Karlsson <magnus.karlsson@...el.com>,
Ben Pfaff <blp@....org>
Subject: Re: [PATCH bpf] libbpf: add libbpf_util.h to header install.
On Fri, May 3, 2019 at 2:09 PM Y Song <ys114321@...il.com> wrote:
>
> On Fri, May 3, 2019 at 12:54 PM William Tu <u9012063@...il.com> wrote:
> >
> > On Thu, May 2, 2019 at 1:18 PM Y Song <ys114321@...il.com> wrote:
> > >
> > > On Thu, May 2, 2019 at 11:34 AM William Tu <u9012063@...il.com> wrote:
> > > >
> > > > The libbpf_util.h is used by xsk.h, so add it to
> > > > the install headers.
> > >
> > > Can we try to change code a little bit to avoid exposing libbpf_util.h?
> > > Originally libbpf_util.h is considered as libbpf internal.
> > > I am not strongly against this patch. But would really like to see
> > > whether we have an alternative not exposing libbpf_util.h.
> > >
> >
> > The commit b7e3a28019c92ff ("libbpf: remove dependency on barrier.h in xsk.h")
> > adds the dependency of libbpf_util.h to xsk.h.
> > How about we move the libbpf_smp_* into the xsk.h, since they are
> > used only by xsk.h.
>
> Okay. Looks like the libbpf_smp_* is used in some static inline functions
> which are also API functions.
>
> Probably having libbpf_smp_* in libbpf_util.h is a better choice as these
> primitives can be used by other .c files in tools/lib/bpf.
>
> On the other hand, exposing macros pr_warning(), pr_info() and
> pr_debug() may not
> be a bad thing as user can use them with the same debug level used by
> libbpf itself.
>
> Ack your original patch:
> Acked-by: Yonghong Song <yhs@...com>
Applied. Thanks
Powered by blists - more mailing lists