Re: net_device: limit rate ot tx packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> How to figure this out for yourself:
> 
> Look at net/sched/sch_plug.c, which is a pretty simple qdisc
> (transmit packets until a plug request is recieved, then queue until
> unplugged). In particular, look at plug_enqueue() to see what happens
> when q->limit is exceeded, and plug_init() to see where q->limit is
> set.
> 
> Then look at the definition of qdisc_reshape_fail() in
> include/net/sch_generic.h to figure out what the qdisc returns if
> q->limit is exceeded.
> 
> Then go look at net/core/dev.c, in function __dev_xmit_skb(), and
> watch the variable 'rc'.
> 
> Now go find the caller of __dev_xmit_skb() and see what it does with
> that return value.
> 
> Hope that helps...
> 

Thank You very much, Michi and Vladis!
With Your help, I could figure it out.

I tried it out, and as Michi stated:
  If the tx_queue_len is small, send() will not sleep
  If the tx_queue_len is large, send() will sleep at some point

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux