mbox series

[bpf-next,0/2] Add CGROUP prefix to cgroup_iter_order

Message ID 20220825213905.1817722-1-haoluo@google.com (mailing list archive)
Headers show
Series Add CGROUP prefix to cgroup_iter_order | expand

Message

Hao Luo Aug. 25, 2022, 9:39 p.m. UTC
As suggested by Andrii, add 'CGROUP' to cgroup_iter_order. This fix is
divided into two patches. Patch 1/2 fixes the commit that introduced
cgroup_iter. Patch 2/2 fixes the selftest that uses the
cgroup_iter_order. This is because the selftest was introduced in a
different commit. I tested this patchset via the following command:

  test_progs -t cgroup,iter,btf_dump

Hao Luo (2):
  bpf: Add CGROUP to cgroup_iter order
  selftests/bpf: Fix test that uses cgroup_iter order

 include/uapi/linux/bpf.h                      | 10 +++---
 kernel/bpf/cgroup_iter.c                      | 32 +++++++++----------
 tools/include/uapi/linux/bpf.h                | 10 +++---
 .../selftests/bpf/prog_tests/btf_dump.c       |  2 +-
 .../prog_tests/cgroup_hierarchical_stats.c    |  2 +-
 .../selftests/bpf/prog_tests/cgroup_iter.c    | 10 +++---
 6 files changed, 33 insertions(+), 33 deletions(-)

Comments

Andrii Nakryiko Aug. 25, 2022, 9:56 p.m. UTC | #1
On Thu, Aug 25, 2022 at 2:39 PM Hao Luo <haoluo@google.com> wrote:
>
> As suggested by Andrii, add 'CGROUP' to cgroup_iter_order. This fix is
> divided into two patches. Patch 1/2 fixes the commit that introduced
> cgroup_iter. Patch 2/2 fixes the selftest that uses the
> cgroup_iter_order. This is because the selftest was introduced in a

but if you split rename into two patches, you break selftests build
and thus potentially bisectability of selftests regressions. So I
think you have to keep both in the same patch.

With that:

Acked-by: Andrii Nakryiko <andrii@kernel.org>

> different commit. I tested this patchset via the following command:
>
>   test_progs -t cgroup,iter,btf_dump
>
> Hao Luo (2):
>   bpf: Add CGROUP to cgroup_iter order
>   selftests/bpf: Fix test that uses cgroup_iter order
>
>  include/uapi/linux/bpf.h                      | 10 +++---
>  kernel/bpf/cgroup_iter.c                      | 32 +++++++++----------
>  tools/include/uapi/linux/bpf.h                | 10 +++---
>  .../selftests/bpf/prog_tests/btf_dump.c       |  2 +-
>  .../prog_tests/cgroup_hierarchical_stats.c    |  2 +-
>  .../selftests/bpf/prog_tests/cgroup_iter.c    | 10 +++---
>  6 files changed, 33 insertions(+), 33 deletions(-)
>
> --
> 2.37.2.672.g94769d06f0-goog
>
Hao Luo Aug. 25, 2022, 10 p.m. UTC | #2
On Thu, Aug 25, 2022 at 2:56 PM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Thu, Aug 25, 2022 at 2:39 PM Hao Luo <haoluo@google.com> wrote:
> >
> > As suggested by Andrii, add 'CGROUP' to cgroup_iter_order. This fix is
> > divided into two patches. Patch 1/2 fixes the commit that introduced
> > cgroup_iter. Patch 2/2 fixes the selftest that uses the
> > cgroup_iter_order. This is because the selftest was introduced in a
>
> but if you split rename into two patches, you break selftests build
> and thus potentially bisectability of selftests regressions. So I
> think you have to keep both in the same patch.
>
> With that:
>
> Acked-by: Andrii Nakryiko <andrii@kernel.org>
>

Yeah. I wasn't sure what to do. Then we need bundle this fix with
those two commits together. Will squash the commits into one and send
a v2.

> > different commit. I tested this patchset via the following command:
> >
> >   test_progs -t cgroup,iter,btf_dump
> >
> > Hao Luo (2):
> >   bpf: Add CGROUP to cgroup_iter order
> >   selftests/bpf: Fix test that uses cgroup_iter order
> >
> >  include/uapi/linux/bpf.h                      | 10 +++---
> >  kernel/bpf/cgroup_iter.c                      | 32 +++++++++----------
> >  tools/include/uapi/linux/bpf.h                | 10 +++---
> >  .../selftests/bpf/prog_tests/btf_dump.c       |  2 +-
> >  .../prog_tests/cgroup_hierarchical_stats.c    |  2 +-
> >  .../selftests/bpf/prog_tests/cgroup_iter.c    | 10 +++---
> >  6 files changed, 33 insertions(+), 33 deletions(-)
> >
> > --
> > 2.37.2.672.g94769d06f0-goog
> >
Yosry Ahmed Aug. 25, 2022, 11:19 p.m. UTC | #3
On Thu, Aug 25, 2022 at 2:56 PM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Thu, Aug 25, 2022 at 2:39 PM Hao Luo <haoluo@google.com> wrote:
> >
> > As suggested by Andrii, add 'CGROUP' to cgroup_iter_order. This fix is
> > divided into two patches. Patch 1/2 fixes the commit that introduced
> > cgroup_iter. Patch 2/2 fixes the selftest that uses the
> > cgroup_iter_order. This is because the selftest was introduced in a
>
> but if you split rename into two patches, you break selftests build
> and thus potentially bisectability of selftests regressions. So I
> think you have to keep both in the same patch.

I thought fixes to commits still in bpf-next would get squashed. Would
you mind elaborating why we don't do this?

>
> With that:
>
> Acked-by: Andrii Nakryiko <andrii@kernel.org>
>
> > different commit. I tested this patchset via the following command:
> >
> >   test_progs -t cgroup,iter,btf_dump
> >
> > Hao Luo (2):
> >   bpf: Add CGROUP to cgroup_iter order
> >   selftests/bpf: Fix test that uses cgroup_iter order
> >
> >  include/uapi/linux/bpf.h                      | 10 +++---
> >  kernel/bpf/cgroup_iter.c                      | 32 +++++++++----------
> >  tools/include/uapi/linux/bpf.h                | 10 +++---
> >  .../selftests/bpf/prog_tests/btf_dump.c       |  2 +-
> >  .../prog_tests/cgroup_hierarchical_stats.c    |  2 +-
> >  .../selftests/bpf/prog_tests/cgroup_iter.c    | 10 +++---
> >  6 files changed, 33 insertions(+), 33 deletions(-)
> >
> > --
> > 2.37.2.672.g94769d06f0-goog
> >
Andrii Nakryiko Aug. 26, 2022, 2:03 a.m. UTC | #4
On Thu, Aug 25, 2022 at 4:20 PM Yosry Ahmed <yosryahmed@google.com> wrote:
>
> On Thu, Aug 25, 2022 at 2:56 PM Andrii Nakryiko
> <andrii.nakryiko@gmail.com> wrote:
> >
> > On Thu, Aug 25, 2022 at 2:39 PM Hao Luo <haoluo@google.com> wrote:
> > >
> > > As suggested by Andrii, add 'CGROUP' to cgroup_iter_order. This fix is
> > > divided into two patches. Patch 1/2 fixes the commit that introduced
> > > cgroup_iter. Patch 2/2 fixes the selftest that uses the
> > > cgroup_iter_order. This is because the selftest was introduced in a
> >
> > but if you split rename into two patches, you break selftests build
> > and thus potentially bisectability of selftests regressions. So I
> > think you have to keep both in the same patch.
>
> I thought fixes to commits still in bpf-next would get squashed. Would
> you mind elaborating why we don't do this?
>

We don't amend follow up fixes into original commits and preserve history.

> >
> > With that:
> >
> > Acked-by: Andrii Nakryiko <andrii@kernel.org>
> >
> > > different commit. I tested this patchset via the following command:
> > >
> > >   test_progs -t cgroup,iter,btf_dump
> > >
> > > Hao Luo (2):
> > >   bpf: Add CGROUP to cgroup_iter order
> > >   selftests/bpf: Fix test that uses cgroup_iter order
> > >
> > >  include/uapi/linux/bpf.h                      | 10 +++---
> > >  kernel/bpf/cgroup_iter.c                      | 32 +++++++++----------
> > >  tools/include/uapi/linux/bpf.h                | 10 +++---
> > >  .../selftests/bpf/prog_tests/btf_dump.c       |  2 +-
> > >  .../prog_tests/cgroup_hierarchical_stats.c    |  2 +-
> > >  .../selftests/bpf/prog_tests/cgroup_iter.c    | 10 +++---
> > >  6 files changed, 33 insertions(+), 33 deletions(-)
> > >
> > > --
> > > 2.37.2.672.g94769d06f0-goog
> > >
Yosry Ahmed Aug. 26, 2022, 2:04 a.m. UTC | #5
On Thu, Aug 25, 2022 at 7:03 PM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Thu, Aug 25, 2022 at 4:20 PM Yosry Ahmed <yosryahmed@google.com> wrote:
> >
> > On Thu, Aug 25, 2022 at 2:56 PM Andrii Nakryiko
> > <andrii.nakryiko@gmail.com> wrote:
> > >
> > > On Thu, Aug 25, 2022 at 2:39 PM Hao Luo <haoluo@google.com> wrote:
> > > >
> > > > As suggested by Andrii, add 'CGROUP' to cgroup_iter_order. This fix is
> > > > divided into two patches. Patch 1/2 fixes the commit that introduced
> > > > cgroup_iter. Patch 2/2 fixes the selftest that uses the
> > > > cgroup_iter_order. This is because the selftest was introduced in a
> > >
> > > but if you split rename into two patches, you break selftests build
> > > and thus potentially bisectability of selftests regressions. So I
> > > think you have to keep both in the same patch.
> >
> > I thought fixes to commits still in bpf-next would get squashed. Would
> > you mind elaborating why we don't do this?
> >
>
> We don't amend follow up fixes into original commits and preserve history.

Got it. Thanks Andrii.

>
> > >
> > > With that:
> > >
> > > Acked-by: Andrii Nakryiko <andrii@kernel.org>
> > >
> > > > different commit. I tested this patchset via the following command:
> > > >
> > > >   test_progs -t cgroup,iter,btf_dump
> > > >
> > > > Hao Luo (2):
> > > >   bpf: Add CGROUP to cgroup_iter order
> > > >   selftests/bpf: Fix test that uses cgroup_iter order
> > > >
> > > >  include/uapi/linux/bpf.h                      | 10 +++---
> > > >  kernel/bpf/cgroup_iter.c                      | 32 +++++++++----------
> > > >  tools/include/uapi/linux/bpf.h                | 10 +++---
> > > >  .../selftests/bpf/prog_tests/btf_dump.c       |  2 +-
> > > >  .../prog_tests/cgroup_hierarchical_stats.c    |  2 +-
> > > >  .../selftests/bpf/prog_tests/cgroup_iter.c    | 10 +++---
> > > >  6 files changed, 33 insertions(+), 33 deletions(-)
> > > >
> > > > --
> > > > 2.37.2.672.g94769d06f0-goog
> > > >