diff mbox series

[net-next,1/5] net/sched: Remove uapi support for rsvp classifier

Message ID 20231223140154.1319084-2-jhs@mojatatu.com (mailing list archive)
State Accepted
Commit 41bc3e8fc1f728085da0ca6dbc1bef4a2ddb543c
Delegated to: Netdev Maintainers
Headers show
Series net/sched: Remove UAPI support for retired TC qdiscs and classifiers | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 5204 this patch: 5204
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 1356 this patch: 1356
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 5531 this patch: 5531
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 74 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Jamal Hadi Salim Dec. 23, 2023, 2:01 p.m. UTC
commit 265b4da82dbf ("net/sched: Retire rsvp classifier") retired the TC RSVP
classifier.
Remove UAPI for it. Iproute2 will sync by equally removing it from user space.

Reviewed-by: Victor Nogueira <victor@mojatatu.com>
Reviewed-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 include/uapi/linux/pkt_cls.h       | 31 ------------------------------
 tools/include/uapi/linux/pkt_cls.h | 31 ------------------------------
 2 files changed, 62 deletions(-)

Comments

Stephen Hemminger Dec. 23, 2023, 5:16 p.m. UTC | #1
On Sat, 23 Dec 2023 09:01:50 -0500
Jamal Hadi Salim <jhs@mojatatu.com> wrote:

> diff --git a/tools/include/uapi/linux/pkt_cls.h b/tools/include/uapi/linux/pkt_cls.h
> index 3faee0199a9b..82eccb6a4994 100644
> --- a/tools/include/uapi/linux/pkt_cls.h
> +++ b/tools/include/uapi/linux/pkt_cls.h
> @@ -204,37 +204,6 @@ struct tc_u32_pcnt {
>  

Seems like a mistake for kernel source tree to include two copies of same file.
Shouldn't there be an automated make rule to update?
Jamal Hadi Salim Dec. 23, 2023, 9:15 p.m. UTC | #2
On Sat, Dec 23, 2023 at 12:17 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> On Sat, 23 Dec 2023 09:01:50 -0500
> Jamal Hadi Salim <jhs@mojatatu.com> wrote:
>
> > diff --git a/tools/include/uapi/linux/pkt_cls.h b/tools/include/uapi/linux/pkt_cls.h
> > index 3faee0199a9b..82eccb6a4994 100644
> > --- a/tools/include/uapi/linux/pkt_cls.h
> > +++ b/tools/include/uapi/linux/pkt_cls.h
> > @@ -204,37 +204,6 @@ struct tc_u32_pcnt {
> >
>
> Seems like a mistake for kernel source tree to include two copies of same file.
> Shouldn't there be an automated make rule to update?

Probably there is - but if you pull a fresh net-next those files are
present in both those two dirs, so it seemed rational to patch both.

cheers,
jamal
Cong Wang Jan. 1, 2024, 6:56 p.m. UTC | #3
On Sat, Dec 23, 2023 at 09:16:57AM -0800, Stephen Hemminger wrote:
> On Sat, 23 Dec 2023 09:01:50 -0500
> Jamal Hadi Salim <jhs@mojatatu.com> wrote:
> 
> > diff --git a/tools/include/uapi/linux/pkt_cls.h b/tools/include/uapi/linux/pkt_cls.h
> > index 3faee0199a9b..82eccb6a4994 100644
> > --- a/tools/include/uapi/linux/pkt_cls.h
> > +++ b/tools/include/uapi/linux/pkt_cls.h
> > @@ -204,37 +204,6 @@ struct tc_u32_pcnt {
> >  
> 
> Seems like a mistake for kernel source tree to include two copies of same file.
> Shouldn't there be an automated make rule to update?

It is intentional, based on the initial commit which created this file:

commit 49a249c387268882e8393dd1fafc51e3b21cb7a2
Author: Yonghong Song <yhs@fb.com>
Date:   Wed Nov 7 19:55:36 2018 -0800

    tools/bpftool: copy a few net uapi headers to tools directory

    Commit f6f3bac08ff9 ("tools/bpf: bpftool: add net support")
    added certain networking support to bpftool.
    The implementation relies on a relatively recent uapi header file
    linux/tc_act/tc_bpf.h on the host which contains the marco
    definition of TCA_ACT_BPF_ID.

    Unfortunately, this is not the case for all distributions.
    See the email message below where rhel-7.2 does not have
    an up-to-date linux/tc_act/tc_bpf.h.
      https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1799211.html
    Further investigation found that linux/pkt_cls.h is also needed for macro
    TCA_BPF_TAG.

    This patch fixed the issue by copying linux/tc_act/tc_bpf.h
    and linux/pkt_cls.h from kernel include/uapi directory to
    tools/include/uapi directory so building the bpftool does not depend
    on host system for these files.

    Fixes: f6f3bac08ff9 ("tools/bpf: bpftool: add net support")
    Reported-by: kernel test robot <rong.a.chen@intel.com>
    Cc: Li Zhijian <zhijianx.li@intel.com>
    Signed-off-by: Yonghong Song <yhs@fb.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
diff mbox series

Patch

diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h
index c7082cc60d21..0d85f7faad53 100644
--- a/include/uapi/linux/pkt_cls.h
+++ b/include/uapi/linux/pkt_cls.h
@@ -280,37 +280,6 @@  struct tc_u32_pcnt {
 
 #define TC_U32_MAXDEPTH 8
 
-
-/* RSVP filter */
-
-enum {
-	TCA_RSVP_UNSPEC,
-	TCA_RSVP_CLASSID,
-	TCA_RSVP_DST,
-	TCA_RSVP_SRC,
-	TCA_RSVP_PINFO,
-	TCA_RSVP_POLICE,
-	TCA_RSVP_ACT,
-	__TCA_RSVP_MAX
-};
-
-#define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 )
-
-struct tc_rsvp_gpi {
-	__u32	key;
-	__u32	mask;
-	int	offset;
-};
-
-struct tc_rsvp_pinfo {
-	struct tc_rsvp_gpi dpi;
-	struct tc_rsvp_gpi spi;
-	__u8	protocol;
-	__u8	tunnelid;
-	__u8	tunnelhdr;
-	__u8	pad;
-};
-
 /* ROUTE filter */
 
 enum {
diff --git a/tools/include/uapi/linux/pkt_cls.h b/tools/include/uapi/linux/pkt_cls.h
index 3faee0199a9b..82eccb6a4994 100644
--- a/tools/include/uapi/linux/pkt_cls.h
+++ b/tools/include/uapi/linux/pkt_cls.h
@@ -204,37 +204,6 @@  struct tc_u32_pcnt {
 
 #define TC_U32_MAXDEPTH 8
 
-
-/* RSVP filter */
-
-enum {
-	TCA_RSVP_UNSPEC,
-	TCA_RSVP_CLASSID,
-	TCA_RSVP_DST,
-	TCA_RSVP_SRC,
-	TCA_RSVP_PINFO,
-	TCA_RSVP_POLICE,
-	TCA_RSVP_ACT,
-	__TCA_RSVP_MAX
-};
-
-#define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 )
-
-struct tc_rsvp_gpi {
-	__u32	key;
-	__u32	mask;
-	int	offset;
-};
-
-struct tc_rsvp_pinfo {
-	struct tc_rsvp_gpi dpi;
-	struct tc_rsvp_gpi spi;
-	__u8	protocol;
-	__u8	tunnelid;
-	__u8	tunnelhdr;
-	__u8	pad;
-};
-
 /* ROUTE filter */
 
 enum {