bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@fb.com>
To: Yonghong Song <yhs@fb.com>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
	Kernel Team <Kernel-team@fb.com>,
	Kevin Laatz <kevin.laatz@intel.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Andrii Nakryiko <andriin@fb.com>
Subject: Re: [PATCH bpf v3] libbpf: handle symbol versioning properly for libbpf.a
Date: Mon, 30 Sep 2019 18:18:35 +0000	[thread overview]
Message-ID: <30ee93ab-a3f7-e92d-a33e-477e74f1849a@fb.com> (raw)
In-Reply-To: <a508b199-d6b9-26ee-a3f6-2012c9fdde37@fb.com>

On 9/30/19 9:56 AM, Yonghong Song wrote:
> 
> 
> On 9/30/19 9:42 AM, Alexei Starovoitov wrote:
>> On 9/30/19 9:29 AM, Yonghong Song wrote:
>>> +OLD_VERSION(xsk_umem__create_v0_0_2, xsk_umem__create, LIBBPF_0.0.2)
>>> +NEW_VERSION(xsk_umem__create_v0_0_4, xsk_umem__create, LIBBPF_0.0.4)
>>
>> how this will look when yet another version of this function is
>> introduced, say in 0.0.6 ?
>>
>> OLD_VERSION(xsk_umem__create_v0_0_2, xsk_umem__create, LIBBPF_0.0.2)
>> OLD_VERSION(xsk_umem__create_v0_0_4, xsk_umem__create, LIBBPF_0.0.4)
>> NEW_VERSION(xsk_umem__create_v0_0_6, xsk_umem__create, LIBBPF_0.0.6)
> 
> Yes.
> 
>>
>> 0.0.4 will be renamed to OLD_ and the latest addition NEW_ ?
> 
> Right.
> 
>> The macro name feels a bit confusing. May be instead of NEW_
>> call it CURRENT_ ? or DEFAULT_ ?
>> NEW_ will become not so 'new' few months from now.
> 
> Right. After a few months, the version number may indeed be
> behind the libbpf versions.... "current" may not be current ....
> Let me use DEFAULT then. How about using
>      COMPAT_VERSION(...)
> for old versions, and using

COMPAT_VERSION sounds fine. I think OLD_VERSION was ok too.

>      DEFAULT_VERSION(...)
> for the new version?

sounds good.

Thanks!


      reply	other threads:[~2019-09-30 20:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30 16:29 [PATCH bpf v3] libbpf: handle symbol versioning properly for libbpf.a Yonghong Song
2019-09-30 16:42 ` Alexei Starovoitov
2019-09-30 16:56   ` Yonghong Song
2019-09-30 18:18     ` Alexei Starovoitov [this message]

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=30ee93ab-a3f7-e92d-a33e-477e74f1849a@fb.com \
    --to=ast@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=acme@redhat.com \
    --cc=andriin@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kevin.laatz@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=yhs@fb.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).