diff options
author | Petr Machata <petrm@mellanox.com> | 2020-06-27 00:45:25 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-30 02:08:28 +0200 |
commit | aebe4426ccaa4838f36ea805cdf7d76503e65117 (patch) | |
tree | 2086a44d7f134b47c8817e68fc67f1e1d1fbc9ba /net/sched/sch_taprio.c | |
parent | Merge branch 'net-ethernet-ti-am65-cpsw-update-and-enable-sr2-0-soc' (diff) | |
download | linux-aebe4426ccaa4838f36ea805cdf7d76503e65117.tar.xz linux-aebe4426ccaa4838f36ea805cdf7d76503e65117.zip |
net: sched: Pass root lock to Qdisc_ops.enqueue
A following patch introduces qevents, points in qdisc algorithm where
packet can be processed by user-defined filters. Should this processing
lead to a situation where a new packet is to be enqueued on the same port,
holding the root lock would lead to deadlocks. To solve the issue, qevent
handler needs to unlock and relock the root lock when necessary.
To that end, add the root lock argument to the qdisc op enqueue, and
propagate throughout.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_taprio.c')
-rw-r--r-- | net/sched/sch_taprio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index e981992634dd..daef2ff60a98 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -410,7 +410,7 @@ done: return txtime; } -static int taprio_enqueue(struct sk_buff *skb, struct Qdisc *sch, +static int taprio_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock, struct sk_buff **to_free) { struct taprio_sched *q = qdisc_priv(sch); @@ -435,7 +435,7 @@ static int taprio_enqueue(struct sk_buff *skb, struct Qdisc *sch, qdisc_qstats_backlog_inc(sch, skb); sch->q.qlen++; - return qdisc_enqueue(skb, child, to_free); + return qdisc_enqueue(skb, child, root_lock, to_free); } static struct sk_buff *taprio_peek_soft(struct Qdisc *sch) |