All of lore.kernel.org
 help / color / mirror / Atom feed
* net-sched: When TX over-limit happens on netdev, what does kernel do?
@ 2012-04-01  8:27 Liu ping fan
  2012-04-01  8:44 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: Liu ping fan @ 2012-04-01  8:27 UTC (permalink / raw)
  To: linux-net; +Cc: Jamal Hadi Salim, linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: net-sched: When TX over-limit happens on netdev, what does kernel do?
  2012-04-01  8:27 net-sched: When TX over-limit happens on netdev, what does kernel do? Liu ping fan
@ 2012-04-01  8:44 ` Eric Dumazet
  2012-04-02 11:08   ` Liu ping fan
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2012-04-01  8:44 UTC (permalink / raw)
  To: Liu ping fan; +Cc: linux-net, Jamal Hadi Salim, linux-kernel

On Sun, 2012-04-01 at 16:27 +0800, Liu ping fan wrote:
> 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 ?

> 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.

> 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)




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: net-sched: When TX over-limit happens on netdev, what does kernel do?
  2012-04-01  8:44 ` Eric Dumazet
@ 2012-04-02 11:08   ` Liu ping fan
  0 siblings, 0 replies; 3+ messages in thread
From: Liu ping fan @ 2012-04-02 11:08 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: linux-net, Jamal Hadi Salim, linux-kernel

On Sun, Apr 1, 2012 at 4:44 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Sun, 2012-04-01 at 16:27 +0800, Liu ping fan wrote:
>> 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 ?
>
Yes.
>> Or we block the sending process and make it scheduled?
>>
>
> We never block the sender process in qdisc layer.
>
For qdisc layer in softirq?

> Only upper protocol layers can eventually block if too many packets are
> in flight on the socket.
>
>> 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)
>
Got it, thanks.

Regards,
pingfan
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-02 11:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-01  8:27 net-sched: When TX over-limit happens on netdev, what does kernel do? Liu ping fan
2012-04-01  8:44 ` Eric Dumazet
2012-04-02 11:08   ` Liu ping fan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.