From 003b9af5163e82b8e601fc90e8ac2d7e18a021d8 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Sun, 11 Oct 2020 22:50:22 -0700 Subject: [PATCH 1/5] uapi: add new SNMP entry Update to snmp.h from 5.9 Signed-off-by: Stephen Hemminger --- include/uapi/linux/snmp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/snmp.h b/include/uapi/linux/snmp.h index cee9f8e6..f84e7bca 100644 --- a/include/uapi/linux/snmp.h +++ b/include/uapi/linux/snmp.h @@ -288,6 +288,7 @@ enum LINUX_MIB_TCPTIMEOUTREHASH, /* TCPTimeoutRehash */ LINUX_MIB_TCPDUPLICATEDATAREHASH, /* TCPDuplicateDataRehash */ LINUX_MIB_TCPDSACKRECVSEGS, /* TCPDSACKRecvSegs */ + LINUX_MIB_TCPDSACKIGNOREDDUBIOUS, /* TCPDSACKIgnoredDubious */ __LINUX_MIB_MAX }; From 58c3c55f3888fd2482545dfc902b9cb38458e404 Mon Sep 17 00:00:00 2001 From: Dmitry Yakunin Date: Thu, 8 Oct 2020 20:59:27 +0300 Subject: [PATCH 2/5] lib: ignore invalid mounts in cg_init_map In case of bad entries in /proc/mounts just skip cgroup cache initialization. Cgroups in output will be shown as "unreachable:cgroup_id". Fixes: d5e6ee0dac64 ("ss: introduce cgroup2 cache and helper functions") Signed-off-by: Dmitry Yakunin Reported-by: Donald Sharp Signed-off-by: Stephen Hemminger --- lib/cg_map.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/cg_map.c b/lib/cg_map.c index 77f030e3..39f244db 100644 --- a/lib/cg_map.c +++ b/lib/cg_map.c @@ -96,11 +96,10 @@ static void cg_init_map(void) mnt = find_cgroup2_mount(false); if (!mnt) - exit(1); + return; mntlen = strlen(mnt); - if (nftw(mnt, nftw_fn, 1024, FTW_MOUNT) < 0) - exit(1); + (void) nftw(mnt, nftw_fn, 1024, FTW_MOUNT); free(mnt); } From 0ca1312c208a6b4260898dccc59030a85c131b27 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 12 Oct 2020 15:55:55 +0200 Subject: [PATCH 3/5] ip: add error reporting when RTM_GETNSID failed `ip addr` when run under qemu-user-riscv64, fails. This likely is due to qemu-5.1 not doing translation of RTM_GETNSID calls. Aborting ip completely is not helpful for the user however. This patch reworks the error handling. Before: rtest:/ # ip a 2: host0@if4: mtu 1500 qdisc noqueue state UP group default qlen 1000 request send failed: Operation not supported link/ether 46:3f:2d:88:3d:db brd ff:ff:ff:ff:ff:ffrtest:/ # Afterwards: rtest:/ # ip a 2: host0@if4: mtu 1500 qdisc noqueue state UP group default qlen 1000 rtnl_send(RTM_GETNSID): Operation not supported. Continuing anyway. link/ether 46:3f:2d:88:3d:db brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet 192.168.72.147/28 brd 192.168.72.159 scope global host0 valid_lft forever preferred_lft forever inet6 fe80::443f:2dff:fe88:3ddb/64 scope link valid_lft forever preferred_lft forever Signed-off-by: Jan Engelhardt Signed-off-by: Stephen Hemminger --- ip/ipnetns.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ip/ipnetns.c b/ip/ipnetns.c index 46cc235b..14e8e087 100644 --- a/ip/ipnetns.c +++ b/ip/ipnetns.c @@ -75,9 +75,12 @@ static int ipnetns_have_nsid(void) }; int fd; - if (have_rtnl_getnsid < 0) { + if (have_rtnl_getnsid >= 0) { fd = open("/proc/self/ns/net", O_RDONLY); if (fd < 0) { + fprintf(stderr, + "/proc/self/ns/net: %s. Continuing anyway.\n", + strerror(errno)); have_rtnl_getnsid = 0; return 0; } @@ -85,8 +88,12 @@ static int ipnetns_have_nsid(void) addattr32(&req.n, 1024, NETNSA_FD, fd); if (rtnl_send(&rth, &req.n, req.n.nlmsg_len) < 0) { - perror("request send failed"); - exit(1); + fprintf(stderr, + "rtnl_send(RTM_GETNSID): %s. Continuing anyway.\n", + strerror(errno)); + have_rtnl_getnsid = 0; + close(fd); + return 0; } rtnl_listen(&rth, ipnetns_accept_msg, NULL); close(fd); From 78ace1c2115f16a4f8edead7b63396f50b2b719e Mon Sep 17 00:00:00 2001 From: "zhangkaiheb@126.com" Date: Tue, 13 Oct 2020 05:26:40 +0000 Subject: [PATCH 4/5] tc: fq: clarify the length of orphan_mask. Signed-off-by: kai zhang Signed-off-by: Stephen Hemminger --- tc/q_fq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/q_fq.c b/tc/q_fq.c index 98d1bf40..b10d01e9 100644 --- a/tc/q_fq.c +++ b/tc/q_fq.c @@ -253,7 +253,7 @@ static int fq_parse_opt(struct qdisc_util *qu, int argc, char **argv, &refill_delay, sizeof(refill_delay)); if (set_orphan_mask) addattr_l(n, 1024, TCA_FQ_ORPHAN_MASK, - &orphan_mask, sizeof(refill_delay)); + &orphan_mask, sizeof(orphan_mask)); if (set_ce_threshold) addattr_l(n, 1024, TCA_FQ_CE_THRESHOLD, &ce_threshold, sizeof(ce_threshold)); From cb7ce51cc1abd7b98370b903ec96205ebfe48661 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 15 Oct 2020 15:18:35 -0700 Subject: [PATCH 5/5] v5.9.0 --- include/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/version.h b/include/version.h index 0088493d..89d05974 100644 --- a/include/version.h +++ b/include/version.h @@ -1 +1 @@ -static const char version[] = "5.8.0"; +static const char version[] = "5.9.0";