bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii@kernel.org>
To: <bpf@vger.kernel.org>, <ast@kernel.org>, <daniel@iogearbox.net>
Cc: <andrii@kernel.org>, <kernel-team@fb.com>
Subject: [PATCH v2 bpf-next 00/15] libbpf: remove deprecated APIs
Date: Mon, 27 Jun 2022 14:15:12 -0700	[thread overview]
Message-ID: <20220627211527.2245459-1-andrii@kernel.org> (raw)

This patch set removes all the deprecated APIs in preparation for 1.0 release.
It also makes libbpf_set_strict_mode() a no-op (but keeps it to let per-1.0
applications buildable and dynamically linkable against libbpf 1.0 if they
were already libbpf-1.0 ready) and starts enforcing all the
behaviors that were previously opt-in through libbpf_set_strict_mode().

xsk.{c,h} parts that are now properly provided by libxdp ([0]) are still used
by xdpxceiver.c in selftest/bpf, so I've moved xsk.{c,h} with barely any
changes to under selftests/bpf.

Other than that, apart from removing all the LIBBPF_DEPRECATED-marked APIs,
there is a bunch of internal clean ups allowed by that. I've also "restored"
libbpf.map inheritance chain while removing all the deprecated APIs. I think
that's the right way to do this, as applications using libbpf as shared
library but not relying on any deprecated APIs (i.e., "good citizens" that
prepared for libbpf 1.0 release ahead of time to minimize disruption) should
be able to link both against 0.x and 1.x versions. Either way, it doesn't seem
to break anything and preserve a history on when each "surviving" API was
added.

  [0] https://github.com/xdp-project/xdp-tools/tree/master/lib/libxdp

v1->v2:
  - rebase on latest bpf-next now that Jiri's perf patches landed;
  - fix xsk.o dependency in Makefile to ensure libbpf headers are installed
    reliably.

Andrii Nakryiko (15):
  libbpf: move xsk.{c,h} into selftests/bpf
  libbpf: remove deprecated low-level APIs
  libbpf: remove deprecated XDP APIs
  libbpf: remove deprecated probing APIs
  libbpf: remove deprecated BTF APIs
  libbpf: clean up perfbuf APIs
  libbpf: remove prog_info_linear APIs
  libbpf: remove most other deprecated high-level APIs
  libbpf: remove multi-instance and custom private data APIs
  libbpf: cleanup LIBBPF_DEPRECATED_SINCE supporting macros for v0.x
  libbpf: remove internal multi-instance prog support
  libbpf: clean up SEC() handling
  selftests/bpf: remove last tests with legacy BPF map definitions
  libbpf: enforce strict libbpf 1.0 behaviors
  libbpf: fix up few libbpf.map problems

 tools/lib/bpf/Build                           |    2 +-
 tools/lib/bpf/Makefile                        |    2 +-
 tools/lib/bpf/bpf.c                           |  178 +-
 tools/lib/bpf/bpf.h                           |   83 -
 tools/lib/bpf/btf.c                           |  183 +--
 tools/lib/bpf/btf.h                           |   86 +-
 tools/lib/bpf/btf_dump.c                      |   23 +-
 tools/lib/bpf/libbpf.c                        | 1429 ++---------------
 tools/lib/bpf/libbpf.h                        |  469 +-----
 tools/lib/bpf/libbpf.map                      |  113 +-
 tools/lib/bpf/libbpf_common.h                 |   16 +-
 tools/lib/bpf/libbpf_internal.h               |   24 +-
 tools/lib/bpf/libbpf_legacy.h                 |   28 +-
 tools/lib/bpf/libbpf_probes.c                 |  125 +-
 tools/lib/bpf/netlink.c                       |   62 +-
 tools/testing/selftests/bpf/Makefile          |    2 +
 tools/testing/selftests/bpf/bpf_legacy.h      |    9 -
 tools/testing/selftests/bpf/prog_tests/btf.c  |    1 -
 .../selftests/bpf/progs/test_btf_haskv.c      |   51 -
 .../selftests/bpf/progs/test_btf_newkv.c      |   18 -
 tools/testing/selftests/bpf/xdpxceiver.c      |    2 +-
 tools/{lib => testing/selftests}/bpf/xsk.c    |   76 +-
 tools/{lib => testing/selftests}/bpf/xsk.h    |   29 +-
 23 files changed, 261 insertions(+), 2750 deletions(-)
 delete mode 100644 tools/testing/selftests/bpf/progs/test_btf_haskv.c
 rename tools/{lib => testing/selftests}/bpf/xsk.c (95%)
 rename tools/{lib => testing/selftests}/bpf/xsk.h (84%)

-- 
2.30.2


             reply	other threads:[~2022-06-27 21:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 21:15 Andrii Nakryiko [this message]
2022-06-27 21:15 ` [PATCH v2 bpf-next 01/15] libbpf: move xsk.{c,h} into selftests/bpf Andrii Nakryiko
2022-06-29  9:41   ` Maciej Fijalkowski
2022-06-29  9:53     ` Daniel Borkmann
2022-06-29  9:55       ` Maciej Fijalkowski
2022-06-27 21:15 ` [PATCH v2 bpf-next 02/15] libbpf: remove deprecated low-level APIs Andrii Nakryiko
2022-06-27 21:15 ` [PATCH v2 bpf-next 03/15] libbpf: remove deprecated XDP APIs Andrii Nakryiko
2022-06-27 21:15 ` [PATCH v2 bpf-next 04/15] libbpf: remove deprecated probing APIs Andrii Nakryiko
2022-06-27 21:15 ` [PATCH v2 bpf-next 05/15] libbpf: remove deprecated BTF APIs Andrii Nakryiko
2022-06-27 21:15 ` [PATCH v2 bpf-next 06/15] libbpf: clean up perfbuf APIs Andrii Nakryiko
2022-06-27 21:15 ` [PATCH v2 bpf-next 07/15] libbpf: remove prog_info_linear APIs Andrii Nakryiko
2022-06-27 21:15 ` [PATCH v2 bpf-next 08/15] libbpf: remove most other deprecated high-level APIs Andrii Nakryiko
2022-06-27 21:15 ` [PATCH v2 bpf-next 09/15] libbpf: remove multi-instance and custom private data APIs Andrii Nakryiko
2022-06-27 21:15 ` [PATCH v2 bpf-next 10/15] libbpf: cleanup LIBBPF_DEPRECATED_SINCE supporting macros for v0.x Andrii Nakryiko
2022-06-27 21:15 ` [PATCH v2 bpf-next 11/15] libbpf: remove internal multi-instance prog support Andrii Nakryiko
2022-06-27 21:15 ` [PATCH v2 bpf-next 12/15] libbpf: clean up SEC() handling Andrii Nakryiko
2022-06-27 21:15 ` [PATCH v2 bpf-next 13/15] selftests/bpf: remove last tests with legacy BPF map definitions Andrii Nakryiko
2022-06-27 21:15 ` [PATCH v2 bpf-next 14/15] libbpf: enforce strict libbpf 1.0 behaviors Andrii Nakryiko
2022-06-27 21:15 ` [PATCH v2 bpf-next 15/15] libbpf: fix up few libbpf.map problems Andrii Nakryiko
2022-06-28 20:20 ` [PATCH v2 bpf-next 00/15] libbpf: remove deprecated APIs patchwork-bot+netdevbpf

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=20220627211527.2245459-1-andrii@kernel.org \
    --to=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@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).