Revert "net/sched: Fix mirred deadlock on device recursion"
This reverts commitspull/1354/merge0f022d32c3and44180feacc. 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 <edumazet@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Reviewed-by: Victor Nogueira <victor@mojatatu.com> Tested-by: Jamal Hadi Salim <jhs@mojatatu.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://patch.msgid.link/20251014171907.3554413-5-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
parent
fe946a751d
commit
178ca30889
|
|
@ -117,7 +117,6 @@ struct Qdisc {
|
|||
struct qdisc_skb_head q;
|
||||
struct gnet_stats_basic_sync bstats;
|
||||
struct gnet_stats_queue qstats;
|
||||
int owner;
|
||||
unsigned long state;
|
||||
unsigned long state2; /* must be written under qdisc spinlock */
|
||||
struct Qdisc *next_sched;
|
||||
|
|
|
|||
|
|
@ -4167,10 +4167,6 @@ no_lock_out:
|
|||
return rc;
|
||||
}
|
||||
|
||||
if (unlikely(READ_ONCE(q->owner) == smp_processor_id())) {
|
||||
kfree_skb_reason(skb, SKB_DROP_REASON_TC_RECLASSIFY_LOOP);
|
||||
return NET_XMIT_DROP;
|
||||
}
|
||||
/*
|
||||
* Heuristic to force contended enqueues to serialize on a
|
||||
* separate lock before trying to get qdisc main lock.
|
||||
|
|
@ -4210,9 +4206,7 @@ no_lock_out:
|
|||
qdisc_run_end(q);
|
||||
rc = NET_XMIT_SUCCESS;
|
||||
} else {
|
||||
WRITE_ONCE(q->owner, smp_processor_id());
|
||||
rc = dev_qdisc_enqueue(skb, q, &to_free, txq);
|
||||
WRITE_ONCE(q->owner, -1);
|
||||
if (qdisc_run_begin(q)) {
|
||||
if (unlikely(contended)) {
|
||||
spin_unlock(&q->busylock);
|
||||
|
|
|
|||
|
|
@ -679,7 +679,6 @@ struct Qdisc noop_qdisc = {
|
|||
.qlen = 0,
|
||||
.lock = __SPIN_LOCK_UNLOCKED(noop_qdisc.skb_bad_txq.lock),
|
||||
},
|
||||
.owner = -1,
|
||||
};
|
||||
EXPORT_SYMBOL(noop_qdisc);
|
||||
|
||||
|
|
@ -985,7 +984,6 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
|
|||
sch->enqueue = ops->enqueue;
|
||||
sch->dequeue = ops->dequeue;
|
||||
sch->dev_queue = dev_queue;
|
||||
sch->owner = -1;
|
||||
netdev_hold(dev, &sch->dev_tracker, GFP_KERNEL);
|
||||
refcount_set(&sch->refcnt, 1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue