Discussion:
net-sched: When TX over-limit happens on netdev, what does kernel do?
Liu ping fan
2012-04-01 08:27:32 UTC
Permalink
Hi,

Could anybody tell me when TX over-limit happens on netdev, what does kernel do?
Is skb buffered in Qdisc->q and the sending process keeps running?
Or we block the sending process and make it scheduled?

Found some code in net/sched/sch_cbq.c
cbq_dequeue(struct Qdisc *sch) --> qdisc_watchdog_schedule(), so I
guess the skb is buffered in Qdisc, but what about sending process?


Thanks and regards,
pingfan
Eric Dumazet
2012-04-01 08:44:39 UTC
Permalink
Post by Liu ping fan
Hi,
Could anybody tell me when TX over-limit happens on netdev, what does kernel do?
Is skb buffered in Qdisc->q and the sending process keeps running?
Are you referring to the NETDEV_TX_BUSY return code processing ?
Post by Liu ping fan
Or we block the sending process and make it scheduled?
We never block the sender process in qdisc layer.

Only upper protocol layers can eventually block if too many packets are
in flight on the socket.
Post by Liu ping fan
Found some code in net/sched/sch_cbq.c
cbq_dequeue(struct Qdisc *sch) --> qdisc_watchdog_schedule(), so I
guess the skb is buffered in Qdisc, but what about sending process?
sender queued its packet and doesnt care if the packet is sent or not.

Only problem is when qdisc limit (number of packets in queue) is hit,
then we can return an error to sender (packet dropped or congestion
notification)
Liu ping fan
2012-04-02 11:08:35 UTC
Permalink
Post by Eric Dumazet
Hi,
Could anybody tell me when TX over-limit happens on netdev, what doe=
s kernel do?
Post by Eric Dumazet
Is skb buffered in Qdisc->q and the sending process keeps running?
Are you referring to the NETDEV_TX_BUSY return code processing ?
Yes.
Post by Eric Dumazet
Or we block the sending process and make it scheduled?
We never block the sender process in qdisc layer.
=46or qdisc layer in softirq?
Post by Eric Dumazet
Only upper protocol layers can eventually block if too many packets a=
re
Post by Eric Dumazet
in flight on the socket.
Found some code in net/sched/sch_cbq.c
cbq_dequeue(struct Qdisc *sch) --> qdisc_watchdog_schedule(), =C2=A0=
so I
Post by Eric Dumazet
guess the skb is buffered in Qdisc, but what about sending process?
sender queued its packet and doesnt care if the packet is sent or not=
=2E
Post by Eric Dumazet
Only problem is when qdisc limit (number of packets in queue) is hit,
then we can return an error to sender (packet dropped or congestion
notification)
Got it, thanks.

Regards,
pingfan
Loading...