bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: Andrii Nakryiko <andrii@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>, Martin Lau <kafai@fb.com>,
	Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
	john fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>, Shuah Khan <shuah@kernel.org>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH bpf-next v3 00/27] bpf: RLIMIT_MEMLOCK cleanups
Date: Tue, 5 Apr 2022 13:52:58 -0700	[thread overview]
Message-ID: <CAEf4BzaEF013kPkV=gkN6fw7e9hO_h0MLWuDbx4Qd68ZCr=5pw@mail.gmail.com> (raw)
In-Reply-To: <20220405130858.12165-1-laoar.shao@gmail.com>

On Tue, Apr 5, 2022 at 6:09 AM Yafang Shao <laoar.shao@gmail.com> wrote:
>
> We have switched to memcg based memory accouting and thus the rlimit is
> not needed any more. LIBBPF_STRICT_AUTO_RLIMIT_MEMLOCK was introduced in
> libbpf for backward compatibility, so we can use it instead now.
>
> This patchset cleanups the usage of RLIMIT_MEMLOCK in tools/bpf/,
> tools/testing/selftests/bpf and samples/bpf. The file
> tools/testing/selftests/bpf/bpf_rlimit.h is removed. The included header
> sys/resource.h is removed from many files as it is useless in these files.
>
> - v3: Get rid of bpf_rlimit.h and fix some typos (Andrii)
> - v2: Use libbpf_set_strict_mode instead. (Andrii)
> - v1: https://lore.kernel.org/bpf/20220320060815.7716-2-laoar.shao@gmail.com/
>
> Yafang Shao (27):
>   bpf: selftests: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK in
>     xdping
>   bpf: selftests: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK in
>     xdpxceiver
>   bpf: selftests: No need to include bpf_rlimit.h in test_tcpnotify_user
>   bpf: selftests: No need to include bpf_rlimit.h in flow_dissector_load
>   bpf: selftests: Set libbpf 1.0 API mode explicitly in
>     get_cgroup_id_user
>   bpf: selftests: Set libbpf 1.0 API mode explicitly in
>     test_cgroup_storage
>   bpf: selftests: Set libbpf 1.0 API mode explicitly in
>     get_cgroup_id_user
>   bpf: selftests: Set libbpf 1.0 API mode explicitly in test_lpm_map
>   bpf: selftests: Set libbpf 1.0 API mode explicitly in test_lru_map
>   bpf: selftests: Set libbpf 1.0 API mode explicitly in
>     test_skb_cgroup_id_user
>   bpf: selftests: Set libbpf 1.0 API mode explicitly in test_sock_addr
>   bpf: selftests: Set libbpf 1.0 API mode explicitly in test_sock
>   bpf: selftests: Set libbpf 1.0 API mode explicitly in test_sockmap
>   bpf: selftests: Set libbpf 1.0 API mode explicitly in test_sysctl
>   bpf: selftests: Set libbpf 1.0 API mode explicitly in test_tag
>   bpf: selftests: Set libbpf 1.0 API mode explicitly in
>     test_tcp_check_syncookie_user
>   bpf: selftests: Set libbpf 1.0 API mode explicitly in
>     test_verifier_log
>   bpf: samples: Set libbpf 1.0 API mode explicitly in hbm
>   bpf: selftests: Get rid of bpf_rlimit.h
>   bpf: selftests: No need to include sys/resource.h in some files
>   bpf: samples: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK in
>     xdpsock_user
>   bpf: samples: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK in
>     xsk_fwd
>   bpf: samples: No need to include sys/resource.h in many files
>   bpf: bpftool: Remove useless return value of libbpf_set_strict_mode
>   bpf: bpftool: Set LIBBPF_STRICT_AUTO_RLIMIT_MEMLOCK for legacy libbpf
>   bpf: bpftool: remove RLIMIT_MEMLOCK
>   bpf: runqslower: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK
>

Hey Yafang, thanks for the clean up! It looks good, but please make it
a bit more manageable in terms of number of patches. There is no need
to have so many tiny patches. Can you squash together all the
samples/bpf changes into one patch, all the selftests/bpf changes into
another, bpftool ones still can be just one patch. runqslower makes
sense to keep separate. Please also use customary subject prefixes for
those: "selftests/bpf: ", "bpftool: ", "samples/bpf: ". For runqslower
probably "tools/runqslower: " would be ok as well.

>  samples/bpf/cpustat_user.c                    |  1 -
>  samples/bpf/hbm.c                             |  5 ++--
>  samples/bpf/ibumad_user.c                     |  1 -
>  samples/bpf/map_perf_test_user.c              |  1 -
>  samples/bpf/offwaketime_user.c                |  1 -
>  samples/bpf/sockex2_user.c                    |  1 -
>  samples/bpf/sockex3_user.c                    |  1 -
>  samples/bpf/spintest_user.c                   |  1 -
>  samples/bpf/syscall_tp_user.c                 |  1 -
>  samples/bpf/task_fd_query_user.c              |  1 -
>  samples/bpf/test_lru_dist.c                   |  1 -
>  samples/bpf/test_map_in_map_user.c            |  1 -
>  samples/bpf/test_overhead_user.c              |  1 -
>  samples/bpf/tracex2_user.c                    |  1 -
>  samples/bpf/tracex3_user.c                    |  1 -
>  samples/bpf/tracex4_user.c                    |  1 -
>  samples/bpf/tracex5_user.c                    |  1 -
>  samples/bpf/tracex6_user.c                    |  1 -
>  samples/bpf/xdp1_user.c                       |  1 -
>  samples/bpf/xdp_adjust_tail_user.c            |  1 -
>  samples/bpf/xdp_monitor_user.c                |  1 -
>  samples/bpf/xdp_redirect_cpu_user.c           |  1 -
>  samples/bpf/xdp_redirect_map_multi_user.c     |  1 -
>  samples/bpf/xdp_redirect_user.c               |  1 -
>  samples/bpf/xdp_router_ipv4_user.c            |  1 -
>  samples/bpf/xdp_rxq_info_user.c               |  1 -
>  samples/bpf/xdp_sample_pkts_user.c            |  1 -
>  samples/bpf/xdp_sample_user.c                 |  1 -
>  samples/bpf/xdp_tx_iptunnel_user.c            |  1 -
>  samples/bpf/xdpsock_user.c                    |  9 ++----
>  samples/bpf/xsk_fwd.c                         |  7 ++---
>  tools/bpf/bpftool/common.c                    |  8 ------
>  tools/bpf/bpftool/feature.c                   |  2 --
>  tools/bpf/bpftool/main.c                      |  6 ++--
>  tools/bpf/bpftool/main.h                      |  2 --
>  tools/bpf/bpftool/map.c                       |  2 --
>  tools/bpf/bpftool/pids.c                      |  1 -
>  tools/bpf/bpftool/prog.c                      |  3 --
>  tools/bpf/bpftool/struct_ops.c                |  2 --
>  tools/bpf/runqslower/runqslower.c             | 18 ++----------
>  tools/testing/selftests/bpf/bench.c           |  1 -
>  tools/testing/selftests/bpf/bpf_rlimit.h      | 28 -------------------
>  .../selftests/bpf/flow_dissector_load.c       |  6 ++--
>  .../selftests/bpf/get_cgroup_id_user.c        |  4 ++-
>  tools/testing/selftests/bpf/prog_tests/btf.c  |  1 -
>  .../selftests/bpf/test_cgroup_storage.c       |  4 ++-
>  tools/testing/selftests/bpf/test_dev_cgroup.c |  4 ++-
>  tools/testing/selftests/bpf/test_lpm_map.c    |  4 ++-
>  tools/testing/selftests/bpf/test_lru_map.c    |  4 ++-
>  .../selftests/bpf/test_skb_cgroup_id_user.c   |  4 ++-
>  tools/testing/selftests/bpf/test_sock.c       |  4 ++-
>  tools/testing/selftests/bpf/test_sock_addr.c  |  4 ++-
>  tools/testing/selftests/bpf/test_sockmap.c    |  5 ++--
>  tools/testing/selftests/bpf/test_sysctl.c     |  4 ++-
>  tools/testing/selftests/bpf/test_tag.c        |  4 ++-
>  .../bpf/test_tcp_check_syncookie_user.c       |  4 ++-
>  .../selftests/bpf/test_tcpnotify_user.c       |  1 -
>  .../testing/selftests/bpf/test_verifier_log.c |  5 ++--
>  .../selftests/bpf/xdp_redirect_multi.c        |  1 -
>  tools/testing/selftests/bpf/xdping.c          |  8 ++----
>  tools/testing/selftests/bpf/xdpxceiver.c      |  6 ++--
>  61 files changed, 57 insertions(+), 142 deletions(-)
>  delete mode 100644 tools/testing/selftests/bpf/bpf_rlimit.h
>
> --
> 2.17.1
>

  parent reply	other threads:[~2022-04-06  0:10 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05 13:08 [PATCH bpf-next v3 00/27] bpf: RLIMIT_MEMLOCK cleanups Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 01/27] bpf: selftests: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK in xdping Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 02/27] bpf: selftests: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK in xdpxceiver Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 03/27] bpf: selftests: No need to include bpf_rlimit.h in test_tcpnotify_user Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 04/27] bpf: selftests: No need to include bpf_rlimit.h in flow_dissector_load Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 05/27] bpf: selftests: Set libbpf 1.0 API mode explicitly in get_cgroup_id_user Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 06/27] bpf: selftests: Set libbpf 1.0 API mode explicitly in test_cgroup_storage Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 07/27] bpf: selftests: Set libbpf 1.0 API mode explicitly in get_cgroup_id_user Yafang Shao
2022-04-05 20:46   ` Jeff Johnson
2022-04-06 14:33     ` Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 08/27] bpf: selftests: Set libbpf 1.0 API mode explicitly in test_lpm_map Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 09/27] bpf: selftests: Set libbpf 1.0 API mode explicitly in test_lru_map Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 10/27] bpf: selftests: Set libbpf 1.0 API mode explicitly in test_skb_cgroup_id_user Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 11/27] bpf: selftests: Set libbpf 1.0 API mode explicitly in test_sock_addr Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 12/27] bpf: selftests: Set libbpf 1.0 API mode explicitly in test_sock Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 13/27] bpf: selftests: Set libbpf 1.0 API mode explicitly in test_sockmap Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 14/27] bpf: selftests: Set libbpf 1.0 API mode explicitly in test_sysctl Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 15/27] bpf: selftests: Set libbpf 1.0 API mode explicitly in test_tag Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 16/27] bpf: selftests: Set libbpf 1.0 API mode explicitly in test_tcp_check_syncookie_user Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 17/27] bpf: selftests: Set libbpf 1.0 API mode explicitly in test_verifier_log Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 18/27] bpf: samples: Set libbpf 1.0 API mode explicitly in hbm Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 19/27] bpf: selftests: Get rid of bpf_rlimit.h Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 20/27] bpf: selftests: No need to include sys/resource.h in some files Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 21/27] bpf: samples: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK in xdpsock_user Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 22/27] bpf: samples: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK in xsk_fwd Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 23/27] bpf: samples: No need to include sys/resource.h in many files Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 24/27] bpf: bpftool: Remove useless return value of libbpf_set_strict_mode Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 25/27] bpf: bpftool: Set LIBBPF_STRICT_AUTO_RLIMIT_MEMLOCK for legacy libbpf Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 26/27] bpf: bpftool: remove RLIMIT_MEMLOCK Yafang Shao
2022-04-05 13:08 ` [PATCH bpf-next v3 27/27] bpf: runqslower: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK Yafang Shao
2022-04-05 20:52 ` Andrii Nakryiko [this message]
2022-04-06 14:32   ` [PATCH bpf-next v3 00/27] bpf: RLIMIT_MEMLOCK cleanups Yafang Shao

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='CAEf4BzaEF013kPkV=gkN6fw7e9hO_h0MLWuDbx4Qd68ZCr=5pw@mail.gmail.com' \
    --to=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=laoar.shao@gmail.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=songliubraving@fb.com \
    --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).