@@ -78,6 +78,38 @@ TRACE_EVENT(qdisc_dequeue,
__entry->txq_state, __entry->packets, __entry->skbaddr )
);
+TRACE_EVENT(qdisc_requeue,
+
+ TP_PROTO(struct sk_buff *skb, struct Qdisc *qdisc,
+ const struct netdev_queue *txq),
+
+ TP_ARGS(skb, qdisc, txq),
+
+ TP_STRUCT__entry(
+ __field( struct Qdisc *, qdisc )
+ __field(const struct netdev_queue *, txq )
+ __field( void *, skbaddr )
+ __field( int, ifindex )
+ __field( u32, handle )
+ __field( u32, parent )
+ __field( unsigned long, txq_state)
+ ),
+
+ TP_fast_assign(
+ __entry->qdisc = qdisc;
+ __entry->txq = txq;
+ __entry->skbaddr = skb;
+ __entry->ifindex = txq->dev ? txq->dev->ifindex : 0;
+ __entry->handle = qdisc->handle;
+ __entry->parent = qdisc->parent;
+ __entry->txq_state = txq->state;
+ ),
+
+ TP_printk("requeue ifindex=%d qdisc handle=0x%X parent=0x%X txq_state=0x%lX skbaddr=%p",
+ __entry->ifindex, __entry->handle, __entry->parent,
+ __entry->txq_state, __entry->skbaddr)
+);
+
TRACE_EVENT(qdisc_reset,
TP_PROTO(struct Qdisc *q),
@@ -137,7 +137,8 @@ static inline void qdisc_enqueue_skb_bad_txq(struct Qdisc *q,
spin_unlock(lock);
}
-static inline void dev_requeue_skb(struct sk_buff *skb, struct Qdisc *q)
+static inline void dev_requeue_skb(struct sk_buff *skb, struct Qdisc *q,
+ struct netdev_queue *txq)
{
spinlock_t *lock = NULL;
@@ -149,6 +150,7 @@ static inline void dev_requeue_skb(struct sk_buff *skb, struct Qdisc *q)
while (skb) {
struct sk_buff *next = skb->next;
+ trace_qdisc_requeue(skb, q, txq);
__skb_queue_tail(&q->gso_skb, skb);
/* it's still part of the queue */
@@ -325,7 +327,7 @@ bool sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q,
if (root_lock)
spin_lock(root_lock);
- dev_requeue_skb(skb, q);
+ dev_requeue_skb(skb, q, txq);
return false;
}
#endif
@@ -353,7 +355,7 @@ bool sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q,
net_warn_ratelimited("BUG %s code %d qlen %d\n",
dev->name, ret, q->q.qlen);
- dev_requeue_skb(skb, q);
+ dev_requeue_skb(skb, q, txq);
return false;
}