import CS iproute-6.2.0-2.el8

This commit is contained in:
eabdullin 2023-09-27 13:07:12 +00:00
parent e6f20c2434
commit c73c831504
5 changed files with 207 additions and 12 deletions

2
.gitignore vendored
View File

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

View File

@ -1 +1 @@
575ff5bba13c6cb4d9a8e5ecad1d691faecfdee6 SOURCES/iproute2-5.18.0.tar.xz
f4e339800fe15b88cfa516cabcc9e883dda245d7 SOURCES/iproute2-6.2.0.tar.xz

View File

@ -0,0 +1,38 @@
From 6a3ecf4fd80f7dcecb72b6c83781f5aed463a75b Mon Sep 17 00:00:00 2001
Message-Id: <6a3ecf4fd80f7dcecb72b6c83781f5aed463a75b.1683117490.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=2188134
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 1638c2909a2911f981ee437dafde70e5e8d721f8 Mon Sep 17 00:00:00 2001
Message-Id: <1638c2909a2911f981ee437dafde70e5e8d721f8.1683117490.git.aclaudi@redhat.com>
In-Reply-To: <6a3ecf4fd80f7dcecb72b6c83781f5aed463a75b.1683117490.git.aclaudi@redhat.com>
References: <6a3ecf4fd80f7dcecb72b6c83781f5aed463a75b.1683117490.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=2188134
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

@ -1,15 +1,17 @@
Summary: Advanced IP routing and network device configuration tools
Name: iproute
Version: 5.18.0
Release: 1%{?dist}%{?buildid}
Version: 6.2.0
Release: 2%{?dist}%{?buildid}
%if 0%{?rhel}
Group: Applications/System
%endif
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
Source1: rt_dsfield.deprecated
Patch0: 0001-Update-kernel-headers.patch
Patch1: 0002-macvlan-Add-bclim-parameter.patch
License: GPLv2+ and Public Domain
License: GPL-2.0-or-later AND NIST-PD
BuildRequires: bison
BuildRequires: elfutils-libelf-devel
BuildRequires: flex
@ -41,7 +43,7 @@ Summary: Linux Traffic Control utility
%if 0%{?rhel}
Group: Applications/System
%endif
License: GPLv2+
License: GPL-2.0-or-later
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: /sbin/tc
@ -56,7 +58,7 @@ Summary: Documentation for iproute2 utilities with examples
%if 0%{?rhel}
Group: Applications/System
%endif
License: GPLv2+
License: GPL-2.0-or-later
Requires: %{name} = %{version}-%{release}
%description doc
@ -68,7 +70,7 @@ Summary: iproute development files
%if 0%{?rhel}
Group: Development/Libraries
%endif
License: GPLv2+
License: GPL-2.0-or-later
Requires: %{name} = %{version}-%{release}
Provides: iproute-static = %{version}-%{release}
@ -79,12 +81,11 @@ The libnetlink static library.
%autosetup -p1 -n %{name}2-%{version}
%build
%configure
%configure --libdir %{_libdir}
echo -e "\nPREFIX=%{_prefix}\nCONFDIR:=%{_sysconfdir}/iproute2\nSBINDIR=%{_sbindir}" >> config.mk
%make_build
%install
export SBINDIR='%{_sbindir}'
export LIBDIR='%{_libdir}'
%make_install
echo '.so man8/tc-cbq.8' > %{buildroot}%{_mandir}/man8/cbq.8
@ -97,7 +98,7 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a
rm -rf '%{buildroot}%{_docdir}'
# append deprecated values to rt_dsfield for compatibility reasons
%if ! 0%{?fedora}
%if 0%{?rhel} && ! 0%{?eln}
cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield
%endif
@ -140,6 +141,13 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield
%{_includedir}/iproute2/bpf_elf.h
%changelog
* Wed May 03 2023 Andrea Claudi <aclaudi@redhat.com> - 6.2.0-2.el8
- macvlan: Add bclim parameter (Andrea Claudi) [2188134]
- Update kernel headers (Andrea Claudi) [2188134]
* Wed Apr 26 2023 Andrea Claudi <aclaudi@redhat.com> - 6.2.0-1.el8
- New version 6.2.0 (Andrea Claudi) [RHEL-424]
* Wed Jun 08 2022 Wen Liang <wenliang@redhat.com> - 5.18.0-1.el8
- New version 5.18.0 [2074607]