RE: net_rx_action() query in dev.c?

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

 



 

> -----Original Message-----
> From: kernelnewbies-bounce@xxxxxxxxxxxx 
> [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of pradeep singh
> Sent: Wednesday, April 25, 2007 3:31 PM
> To: kernel newbies
> Subject: net_rx_action() query in dev.c?
> 
> Hi All,
> 
> I was going through the implementation code for 
> net_rx_action, whcih is invoked everytime the NET_RX_SOFTIRQ 
> gets to run.
> 
> The logic at line number 1916 in file net/core/dev.c is -
> 
>    while(!list_empty(&queue->poll_list)) {
>      /*something here*/
>       if(budget <= 0 || jiffies  - start_time > 1)  <- line 1916
>           goto softnet_break;
> 
>     /*something here*/
>    }
> 
> if budget <= 0 we must go to softnet_break is understandable 
> but why if budget is > 0 we must check for the time elapsed??
> And if the difference is > 1, why we should goto softnet_break?
> 
The loop is getting only '1 jiffy' for processing the packets and the
maximum number of packets it can process is netdev_budget (which is
assigned value of 300).
So if either of the condition is true it breaks the loop and queues the
softirq again.
> I didn't quite get it.
> 
> Any help?
> 
> Thanks
> ~psr
> 
> --
> play the game
> 
> --
> To unsubscribe from this list: send an email with 
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please 
> read the FAQ at http://kernelnewbies.org/FAQ
> 

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[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