Skip to content

Commit fcf7cdc

Browse files
[patch] add patch "net: sch_generic: fix the missing new qdisc assignment bug" (sonic-net#213)
To fix ENOBUFS returned by send() instead of ENETDOWN when interface flaps. The original issue is - when performing LAG memeber flapping, a LAG memeber can stuck in disabled state until next interface flap. This is because, teamd calls lacp_send() when setting internal LAG member state which ignores ENETDOWN but not ENOBUFS. This will lead to a situation when internal LACP member state stucks in disabled state.
1 parent 12d8a0a commit fcf7cdc

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
From 81504d1952d712c8bb9c3966896efee8a37ea966 Mon Sep 17 00:00:00 2001
2+
From: Yunsheng Lin <[email protected]>
3+
Date: Tue, 3 Nov 2020 11:25:38 +0800
4+
Subject: net: sch_generic: fix the missing new qdisc assignment bug
5+
6+
When commit 2fb541c862c9 ("net: sch_generic: aviod concurrent reset and
7+
enqueue op for lockless qdisc") is backported to stable kernel, one
8+
assignment is missing, which causes two problems reported by Joakim and
9+
Vishwanath, see [1] and [2].
10+
11+
So add the assignment back to fix it.
12+
13+
1. https://www.spinics.net/lists/netdev/msg693916.html
14+
2. https://www.spinics.net/lists/netdev/msg695131.html
15+
16+
Fixes: 749cc0b0c7f3 ("net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc")
17+
Signed-off-by: Yunsheng Lin <[email protected]>
18+
Acked-by: Jakub Kicinski <[email protected]>
19+
Tested-by: Brian Norris <[email protected]>
20+
Signed-off-by: Greg Kroah-Hartman <[email protected]>
21+
---
22+
net/sched/sch_generic.c | 3 +++
23+
1 file changed, 3 insertions(+)
24+
25+
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
26+
index bd96fd261dba3..4e15913e7519e 100644
27+
--- a/net/sched/sch_generic.c
28+
+++ b/net/sched/sch_generic.c
29+
@@ -1116,10 +1116,13 @@ static void dev_deactivate_queue(struct net_device *dev,
30+
void *_qdisc_default)
31+
{
32+
struct Qdisc *qdisc = rtnl_dereference(dev_queue->qdisc);
33+
+ struct Qdisc *qdisc_default = _qdisc_default;
34+
35+
if (qdisc) {
36+
if (!(qdisc->flags & TCQ_F_BUILTIN))
37+
set_bit(__QDISC_STATE_DEACTIVATED, &qdisc->state);
38+
+
39+
+ rcu_assign_pointer(dev_queue->qdisc, qdisc_default);
40+
}
41+
}
42+
43+
--
44+
cgit 1.2.3-1.el7
45+

patch/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ netlink-add-NLA_MIN_LEN.patch
4040
macsec-Netlink-support-of-XPN-cipher-suites-IEEE-802.patch
4141
Support-for-fullcone-nat.patch
4242
driver-ixgbe-external-phy.patch
43+
net-sch_generic-fix-the-missing-new-qdisc-assignment.patch
4344
#
4445
# This series applies on GIT commit 1451b36b2b0d62178e42f648d8a18131af18f7d8
4546
# Tkernel-sched-core-fix-cgroup-fork-race.patch

0 commit comments

Comments
 (0)