import CS iproute-6.2.0-5.el9

This commit is contained in:
eabdullin 2023-09-21 18:53:05 +00:00
parent 499732e6c6
commit 5a056c1466
8 changed files with 396 additions and 11 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/iproute2-6.1.0.tar.xz SOURCES/iproute2-6.2.0.tar.xz

View File

@ -1 +1 @@
a10a6b479a641f2d4280c762ce531ebe3f2adb1c SOURCES/iproute2-6.1.0.tar.xz f4e339800fe15b88cfa516cabcc9e883dda245d7 SOURCES/iproute2-6.2.0.tar.xz

View File

@ -0,0 +1,38 @@
From d60a7ac3c0f6aa2a933f48a69ab31e3637f6906c Mon Sep 17 00:00:00 2001
Message-Id: <d60a7ac3c0f6aa2a933f48a69ab31e3637f6906c.1683109787.git.aclaudi@redhat.com>
From: Andrea Claudi <aclaudi@redhat.com>
Date: Wed, 3 May 2023 11:19:24 +0200
Subject: [PATCH] Update kernel headers
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2186945
Upstream Status: iproute2-next.git commit 88786cd1
commit 88786cd1a96a89427bc22061c7736eb2eac31121
Author: David Ahern <dsahern@kernel.org>
Date: Thu Mar 30 09:43:49 2023 -0600
Update kernel headers
Update kernel headers to commit:
da617cd8d906 ("smsc911x: remove superfluous variable init")
Signed-off-by: David Ahern <dsahern@kernel.org>
---
include/uapi/linux/if_link.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 147ad0a3..644d3554 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -628,6 +628,7 @@ enum {
IFLA_MACVLAN_MACADDR_COUNT,
IFLA_MACVLAN_BC_QUEUE_LEN,
IFLA_MACVLAN_BC_QUEUE_LEN_USED,
+ IFLA_MACVLAN_BC_CUTOFF,
__IFLA_MACVLAN_MAX,
};
--
2.40.1

View File

@ -0,0 +1,149 @@
From 7d1444d9563575ec3346620f12788799080db8c5 Mon Sep 17 00:00:00 2001
Message-Id: <7d1444d9563575ec3346620f12788799080db8c5.1683109787.git.aclaudi@redhat.com>
In-Reply-To: <d60a7ac3c0f6aa2a933f48a69ab31e3637f6906c.1683109787.git.aclaudi@redhat.com>
References: <d60a7ac3c0f6aa2a933f48a69ab31e3637f6906c.1683109787.git.aclaudi@redhat.com>
From: Andrea Claudi <aclaudi@redhat.com>
Date: Wed, 3 May 2023 11:19:24 +0200
Subject: [PATCH] macvlan: Add bclim parameter
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2186945
Upstream Status: iproute2-next.git commit e8a3fb47
commit e8a3fb470b4e96aa35a2731c7cc175b946c0a62d
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu Mar 30 11:07:25 2023 +0800
macvlan: Add bclim parameter
This patch adds support for setting the broadcast queueing threshold
on macvlan devices. This controls which multicast packets will be
processed in a workqueue instead of inline.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
ip/iplink_macvlan.c | 26 ++++++++++++++++++++++++--
man/man8/ip-link.8.in | 18 ++++++++++++++++++
3 files changed, 43 insertions(+), 2 deletions(-)
Signed-off-by: David Ahern <dsahern@kernel.org>
---
ip/iplink_macvlan.c | 26 ++++++++++++++++++++++++--
man/man8/ip-link.8.in | 18 ++++++++++++++++++
2 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/ip/iplink_macvlan.c b/ip/iplink_macvlan.c
index 0f13637d..6bdc76d1 100644
--- a/ip/iplink_macvlan.c
+++ b/ip/iplink_macvlan.c
@@ -26,13 +26,14 @@
static void print_explain(struct link_util *lu, FILE *f)
{
fprintf(f,
- "Usage: ... %s mode MODE [flag MODE_FLAG] MODE_OPTS [bcqueuelen BC_QUEUE_LEN]\n"
+ "Usage: ... %s mode MODE [flag MODE_FLAG] MODE_OPTS [bcqueuelen BC_QUEUE_LEN] [bclim BCLIM]\n"
"\n"
"MODE: private | vepa | bridge | passthru | source\n"
"MODE_FLAG: null | nopromisc | nodst\n"
"MODE_OPTS: for mode \"source\":\n"
"\tmacaddr { { add | del } <macaddr> | set [ <macaddr> [ <macaddr> ... ] ] | flush }\n"
- "BC_QUEUE_LEN: Length of the rx queue for broadcast/multicast: [0-4294967295]\n",
+ "BC_QUEUE_LEN: Length of the rx queue for broadcast/multicast: [0-4294967295]\n"
+ "BCLIM: Threshold for broadcast queueing: 32-bit integer\n",
lu->id
);
}
@@ -67,6 +68,12 @@ static int bc_queue_len_arg(const char *arg)
return -1;
}
+static int bclim_arg(const char *arg)
+{
+ fprintf(stderr, "Error: illegal value for \"bclim\": \"%s\"\n", arg);
+ return -1;
+}
+
static int macvlan_parse_opt(struct link_util *lu, int argc, char **argv,
struct nlmsghdr *n)
{
@@ -168,6 +175,15 @@ static int macvlan_parse_opt(struct link_util *lu, int argc, char **argv,
return bc_queue_len_arg(*argv);
}
addattr32(n, 1024, IFLA_MACVLAN_BC_QUEUE_LEN, bc_queue_len);
+ } else if (!strcmp(*argv, "bclim")) {
+ __s32 bclim;
+ NEXT_ARG();
+
+ if (get_s32(&bclim, *argv, 0)) {
+ return bclim_arg(*argv);
+ }
+ addattr_l(n, 1024, IFLA_MACVLAN_BC_CUTOFF,
+ &bclim, sizeof(bclim));
} else if (matches(*argv, "help") == 0) {
explain(lu);
return -1;
@@ -245,6 +261,12 @@ static void macvlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]
print_luint(PRINT_ANY, "usedbcqueuelen", "usedbcqueuelen %lu ", bc_queue_len);
}
+ if (tb[IFLA_MACVLAN_BC_CUTOFF] &&
+ RTA_PAYLOAD(tb[IFLA_MACVLAN_BC_CUTOFF]) >= sizeof(__s32)) {
+ __s32 bclim = rta_getattr_s32(tb[IFLA_MACVLAN_BC_CUTOFF]);
+ print_int(PRINT_ANY, "bclim", "bclim %d ", bclim);
+ }
+
/* in source mode, there are more options to print */
if (mode != MACVLAN_MODE_SOURCE)
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index eeddf493..62aebabd 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -1455,6 +1455,7 @@ the following additional arguments are supported:
.BR mode " { " private " | " vepa " | " bridge " | " passthru
.RB " [ " nopromisc " ] | " source " [ " nodst " ] } "
.RB " [ " bcqueuelen " { " LENGTH " } ] "
+.RB " [ " bclim " " LIMIT " ] "
.in +8
.sp
@@ -1513,6 +1514,13 @@ will be the maximum length that any macvlan interface has requested.
When listing device parameters both the bcqueuelen parameter
as well as the actual used bcqueuelen are listed to better help
the user understand the setting.
+
+.BR bclim " " LIMIT
+- Set the threshold for broadcast queueing.
+.BR LIMIT " must be a 32-bit integer."
+Setting this to -1 disables broadcast queueing altogether. Otherwise
+a multicast address will be queued as broadcast if the number of devices
+using it is greater than the given value.
.in -8
.TP
@@ -2675,6 +2683,9 @@ Update the broadcast/multicast queue length.
[
.BI bcqueuelen " LENGTH "
]
+[
+.BI bclim " LIMIT "
+]
.in +8
.BI bcqueuelen " LENGTH "
@@ -2688,6 +2699,13 @@ will be the maximum length that any macvlan interface has requested.
When listing device parameters both the bcqueuelen parameter
as well as the actual used bcqueuelen are listed to better help
the user understand the setting.
+
+.BI bclim " LIMIT "
+- Set the threshold for broadcast queueing.
+.IR LIMIT " must be a 32-bit integer."
+Setting this to -1 disables broadcast queueing altogether. Otherwise
+a multicast address will be queued as broadcast if the number of devices
+using it is greater than the given value.
.in -8
.TP
--
2.40.1

View File

@ -0,0 +1,69 @@
From ad96352bfdc2865237beca32fd7d50cfef3e75c7 Mon Sep 17 00:00:00 2001
From: Wen Liang <wenliang@redhat.com>
Date: Thu, 1 Jun 2023 10:33:46 -0400
Subject: [PATCH] mptcp: add support for implicit flag
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2109135
Upstream Status: iproute2-next.git commit 3a2535a4
commit 3a2535a41854d481c1a052e267d1fe5d83f9493c
Author: Andrea Claudi <aclaudi@redhat.com>
Date: Tue May 16 11:48:04 2023 +0200
mptcp: add support for implicit flag
Kernel supports implicit flag since commit d045b9eb95a9 ("mptcp:
introduce implicit endpoints"), included in v5.18.
Let's add support for displaying it to iproute2.
Before this change:
$ ip mptcp endpoint show
10.0.2.2 id 1 rawflags 10
After this change:
$ ip mptcp endpoint show
10.0.2.2 id 1 implicit
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
---
ip/ipmptcp.c | 1 +
man/man8/ip-mptcp.8 | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c
index beba7a41..9847f95b 100644
--- a/ip/ipmptcp.c
+++ b/ip/ipmptcp.c
@@ -58,6 +58,7 @@ static const struct {
{ "subflow", MPTCP_PM_ADDR_FLAG_SUBFLOW },
{ "backup", MPTCP_PM_ADDR_FLAG_BACKUP },
{ "fullmesh", MPTCP_PM_ADDR_FLAG_FULLMESH },
+ { "implicit", MPTCP_PM_ADDR_FLAG_IMPLICIT },
{ "nobackup", MPTCP_PM_ADDR_FLAG_NONE },
{ "nofullmesh", MPTCP_PM_ADDR_FLAG_NONE }
};
diff --git a/man/man8/ip-mptcp.8 b/man/man8/ip-mptcp.8
index 72762f49..b427065c 100644
--- a/man/man8/ip-mptcp.8
+++ b/man/man8/ip-mptcp.8
@@ -176,6 +176,15 @@ endpoint. When the peer does announce addresses, each received ADD_ADDR
sub-option will trigger creation of an additional subflow to generate a
full mesh topology.
+.TP
+.BR implicit
+In some scenarios, an MPTCP
+.BR subflow
+can use a local address mapped by a implicit endpoint created by the
+in-kernel path manager. Once set, the implicit flag cannot be removed, but
+other flags can be added to the endpoint. Implicit endpoints cannot be
+created from user-space.
+
.sp
.PP
The
--
2.38.1

View File

@ -0,0 +1,65 @@
From 80e59389e93bf3f45204a38536f3f228adf153c7 Mon Sep 17 00:00:00 2001
Message-Id: <80e59389e93bf3f45204a38536f3f228adf153c7.1686076455.git.aclaudi@redhat.com>
In-Reply-To: <d60a7ac3c0f6aa2a933f48a69ab31e3637f6906c.1686076455.git.aclaudi@redhat.com>
References: <d60a7ac3c0f6aa2a933f48a69ab31e3637f6906c.1686076455.git.aclaudi@redhat.com>
From: Andrea Claudi <aclaudi@redhat.com>
Date: Tue, 6 Jun 2023 20:05:15 +0200
Subject: [PATCH] u32: fix TC_U32_TERMINAL printing
Jira: https://issues.redhat.com/browse/RHEL-337
Upstream Status: iproute2-next.git commit 2854d69a
commit 2854d69a99f6e38d0d2426bd641a56d7a85bc61b
Author: Hangbin Liu <liuhangbin@gmail.com>
Date: Wed Mar 1 22:21:00 2023 +0800
u32: fix TC_U32_TERMINAL printing
We previously printed an asterisk if there was no 'sel' or
'TC_U32_TERMINAL' flag. However,
commit 1ff227545ce1 ("u32: fix json formatting of flowid")
changed the logic to print an asterisk only if there is a
'TC_U32_TERMINAL' flag. Therefore, we need to fix this
regression.
Before the fix, the tdc u32 test failed:
1..11
not ok 1 afa9 - Add u32 with source match
Could not match regex pattern. Verify command output:
filter protocol ip pref 1 u32 chain 0
filter protocol ip pref 1 u32 chain 0 fh 800: ht divisor 1
filter protocol ip pref 1 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 *flowid 1:1 not_in_hw
match 7f000001/ffffffff at 12
action order 1: gact action pass
random type none pass val 0
index 1 ref 1 bind 1
After fix, the test passed:
1..11
ok 1 afa9 - Add u32 with source match
Fixes: 1ff227545ce1 ("u32: fix json formatting of flowid")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
tc/f_u32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/f_u32.c b/tc/f_u32.c
index bfe9e5f9..de2d0c9e 100644
--- a/tc/f_u32.c
+++ b/tc/f_u32.c
@@ -1273,7 +1273,7 @@ static int u32_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt,
if (tb[TCA_U32_CLASSID]) {
__u32 classid = rta_getattr_u32(tb[TCA_U32_CLASSID]);
SPRINT_BUF(b1);
- if (sel && (sel->flags & TC_U32_TERMINAL))
+ if (!sel || !(sel->flags & TC_U32_TERMINAL))
print_string(PRINT_FP, NULL, "*", NULL);
print_string(PRINT_ANY, "flowid", "flowid %s ",
--
2.40.1

View File

@ -0,0 +1,43 @@
From 8bc9a4f3855d28ae718f14875dd78d49d53c4349 Mon Sep 17 00:00:00 2001
Message-Id: <8bc9a4f3855d28ae718f14875dd78d49d53c4349.1686076455.git.aclaudi@redhat.com>
In-Reply-To: <d60a7ac3c0f6aa2a933f48a69ab31e3637f6906c.1686076455.git.aclaudi@redhat.com>
References: <d60a7ac3c0f6aa2a933f48a69ab31e3637f6906c.1686076455.git.aclaudi@redhat.com>
From: Andrea Claudi <aclaudi@redhat.com>
Date: Tue, 6 Jun 2023 20:08:25 +0200
Subject: [PATCH] tc: add missing separator
Jira: https://issues.redhat.com/browse/RHEL-586
Upstream Status: iproute2-next.git commit 4e0e56e0
commit 4e0e56e0ef05387f7f5d8ab41fe6ec6a1897b26d
Author: Christian Hesse <mail@eworm.de>
Date: Thu Feb 23 11:15:03 2023 +0100
tc: add missing separator
This is missing a separator, that was accidently removed
when JSON was added.
Fixes: 010a8388aea1 ("tc: Add JSON output to tc-class")
Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
tc/tc_class.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/tc_class.c b/tc/tc_class.c
index c1feb009..096fa2ec 100644
--- a/tc/tc_class.c
+++ b/tc/tc_class.c
@@ -356,7 +356,7 @@ int print_class(struct nlmsghdr *n, void *arg)
print_string(PRINT_ANY, "parent", "parent %s ", abuf);
}
if (t->tcm_info)
- print_0xhex(PRINT_ANY, "leaf", "leaf %x", t->tcm_info>>16);
+ print_0xhex(PRINT_ANY, "leaf", "leaf %x: ", t->tcm_info>>16);
q = get_qdisc_kind(RTA_DATA(tb[TCA_KIND]));
if (tb[TCA_OPTIONS]) {
--
2.40.1

View File

@ -1,15 +1,20 @@
Summary: Advanced IP routing and network device configuration tools Summary: Advanced IP routing and network device configuration tools
Name: iproute Name: iproute
Version: 6.1.0 Version: 6.2.0
Release: 1%{?dist}%{?buildid} Release: 5%{?dist}%{?buildid}
%if 0%{?rhel} %if 0%{?rhel}
Group: Applications/System Group: Applications/System
%endif %endif
URL: https://kernel.org/pub/linux/utils/net/%{name}2/ URL: https://kernel.org/pub/linux/utils/net/%{name}2/
Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz
Source1: rt_dsfield.deprecated Source1: rt_dsfield.deprecated
Patch0: 0001-Update-kernel-headers.patch
Patch1: 0002-macvlan-Add-bclim-parameter.patch
Patch2: 0003-mptcp-add-support-for-implicit-flag.patch
Patch3: 0004-u32-fix-TC_U32_TERMINAL-printing.patch
Patch4: 0005-tc-add-missing-separator.patch
License: GPLv2+ and Public Domain License: GPL-2.0-or-later AND NIST-PD
BuildRequires: bison BuildRequires: bison
BuildRequires: elfutils-libelf-devel BuildRequires: elfutils-libelf-devel
BuildRequires: flex BuildRequires: flex
@ -41,7 +46,7 @@ Summary: Linux Traffic Control utility
%if 0%{?rhel} %if 0%{?rhel}
Group: Applications/System Group: Applications/System
%endif %endif
License: GPLv2+ License: GPL-2.0-or-later
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: /sbin/tc Provides: /sbin/tc
@ -56,7 +61,7 @@ Summary: Documentation for iproute2 utilities with examples
%if 0%{?rhel} %if 0%{?rhel}
Group: Applications/System Group: Applications/System
%endif %endif
License: GPLv2+ License: GPL-2.0-or-later
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description doc %description doc
@ -68,7 +73,7 @@ Summary: iproute development files
%if 0%{?rhel} %if 0%{?rhel}
Group: Development/Libraries Group: Development/Libraries
%endif %endif
License: GPLv2+ License: GPL-2.0-or-later
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Provides: iproute-static = %{version}-%{release} Provides: iproute-static = %{version}-%{release}
@ -79,12 +84,11 @@ The libnetlink static library.
%autosetup -p1 -n %{name}2-%{version} %autosetup -p1 -n %{name}2-%{version}
%build %build
%configure %configure --libdir %{_libdir}
echo -e "\nPREFIX=%{_prefix}\nCONFDIR:=%{_sysconfdir}/iproute2\nSBINDIR=%{_sbindir}" >> config.mk
%make_build %make_build
%install %install
export SBINDIR='%{_sbindir}'
export LIBDIR='%{_libdir}'
%make_install %make_install
echo '.so man8/tc-cbq.8' > %{buildroot}%{_mandir}/man8/cbq.8 echo '.so man8/tc-cbq.8' > %{buildroot}%{_mandir}/man8/cbq.8
@ -140,6 +144,23 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield
%{_includedir}/iproute2/bpf_elf.h %{_includedir}/iproute2/bpf_elf.h
%changelog %changelog
* Tue Jun 06 2023 Andrea Claudi <aclaudi@redhat.com> - 6.2.0-5.el9
- tc: add missing separator (Andrea Claudi) [RHEL-337]
- u32: fix TC_U32_TERMINAL printing (Andrea Claudi) [RHEL-586]
* Mon Jun 05 2023 Andrea Claudi <aclaudi@redhat.com> - 6.2.0-4.el9
- Fix NVR, %autorelease not working (Andrea Claudi)
* Thu Jun 01 2023 Wen Liang <wenliang@redhat.com> - 6.2.0-3.el9
- mptcp: add support for implicit flag (Wen Liang) [2109135]
* Wed May 03 2023 Andrea Claudi <aclaudi@redhat.com> - 6.2.0-2.el9
- macvlan: Add bclim parameter (Andrea Claudi) [2186945]
- Update kernel headers (Andrea Claudi) [2186945]
* Thu Apr 27 2023 Andrea Claudi <aclaudi@redhat.com> - 6.2.0-1.el9
- New version 6.2.0 (Andrea Claudi) [RHEL-428]
* Sat Jan 28 2023 Andrea Claudi <aclaudi@redhat.com> - 6.1.0-1.el9 * Sat Jan 28 2023 Andrea Claudi <aclaudi@redhat.com> - 6.1.0-1.el9
- New version 6.1.0 [2155604] - New version 6.1.0 [2155604]