Skip to content

Commit 178ca30

Browse files
edumazetkuba-moo
authored andcommitted
Revert "net/sched: Fix mirred deadlock on device recursion"
This reverts commits 0f022d3 and 44180fe. Prior patch in this series implemented loop detection in act_mirred, we can remove q->owner to save some cycles in the fast path. Signed-off-by: Eric Dumazet <[email protected]> Reviewed-by: Kuniyuki Iwashima <[email protected]> Reviewed-by: Toke Høiland-Jørgensen <[email protected]> Reviewed-by: Victor Nogueira <[email protected]> Tested-by: Jamal Hadi Salim <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent fe946a7 commit 178ca30

File tree

3 files changed

+0
-9
lines changed

3 files changed

+0
-9
lines changed

include/net/sch_generic.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ struct Qdisc {
117117
struct qdisc_skb_head q;
118118
struct gnet_stats_basic_sync bstats;
119119
struct gnet_stats_queue qstats;
120-
int owner;
121120
unsigned long state;
122121
unsigned long state2; /* must be written under qdisc spinlock */
123122
struct Qdisc *next_sched;

net/core/dev.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4167,10 +4167,6 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
41674167
return rc;
41684168
}
41694169

4170-
if (unlikely(READ_ONCE(q->owner) == smp_processor_id())) {
4171-
kfree_skb_reason(skb, SKB_DROP_REASON_TC_RECLASSIFY_LOOP);
4172-
return NET_XMIT_DROP;
4173-
}
41744170
/*
41754171
* Heuristic to force contended enqueues to serialize on a
41764172
* separate lock before trying to get qdisc main lock.
@@ -4210,9 +4206,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
42104206
qdisc_run_end(q);
42114207
rc = NET_XMIT_SUCCESS;
42124208
} else {
4213-
WRITE_ONCE(q->owner, smp_processor_id());
42144209
rc = dev_qdisc_enqueue(skb, q, &to_free, txq);
4215-
WRITE_ONCE(q->owner, -1);
42164210
if (qdisc_run_begin(q)) {
42174211
if (unlikely(contended)) {
42184212
spin_unlock(&q->busylock);

net/sched/sch_generic.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,6 @@ struct Qdisc noop_qdisc = {
679679
.qlen = 0,
680680
.lock = __SPIN_LOCK_UNLOCKED(noop_qdisc.skb_bad_txq.lock),
681681
},
682-
.owner = -1,
683682
};
684683
EXPORT_SYMBOL(noop_qdisc);
685684

@@ -985,7 +984,6 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
985984
sch->enqueue = ops->enqueue;
986985
sch->dequeue = ops->dequeue;
987986
sch->dev_queue = dev_queue;
988-
sch->owner = -1;
989987
netdev_hold(dev, &sch->dev_tracker, GFP_KERNEL);
990988
refcount_set(&sch->refcnt, 1);
991989

0 commit comments

Comments
 (0)