[NET]: Separate two usages of netdev_max_backlog.
authorStephen Hemminger <shemminger@osdl.org>
Fri, 24 Jun 2005 03:14:40 +0000 (20:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Jun 2005 03:14:40 +0000 (20:14 -0700)
Separate out the two uses of netdev_max_backlog. One controls the
upper bound on packets processed per softirq, the new name for this is
netdev_budget; the other controls the limit on packets queued via
netif_rx.

Increase the max_backlog default to account for faster processors.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/sysctl.h
net/core/dev.c
net/core/sysctl_net_core.c

index 72965bf..ebfe125 100644 (file)
@@ -243,6 +243,7 @@ enum
        NET_CORE_MOD_CONG=16,
        NET_CORE_DEV_WEIGHT=17,
        NET_CORE_SOMAXCONN=18,
+       NET_CORE_BUDGET=19,
 };
 
 /* /proc/sys/net/ethernet */
index 1a64508..7016e0c 100644 (file)
@@ -1346,7 +1346,8 @@ out:
                        Receiver routines
   =======================================================================*/
 
-int netdev_max_backlog = 300;
+int netdev_max_backlog = 1000;
+int netdev_budget = 300;
 int weight_p = 64;            /* old backlog weight */
 
 DEFINE_PER_CPU(struct netif_rx_stats, netdev_rx_stat) = { 0, };
@@ -1695,8 +1696,7 @@ static void net_rx_action(struct softirq_action *h)
 {
        struct softnet_data *queue = &__get_cpu_var(softnet_data);
        unsigned long start_time = jiffies;
-       int budget = netdev_max_backlog;
-
+       int budget = netdev_budget;
        
        local_irq_disable();
 
index fff6364..8f817ad 100644 (file)
@@ -13,6 +13,7 @@
 #ifdef CONFIG_SYSCTL
 
 extern int netdev_max_backlog;
+extern int netdev_budget;
 extern int weight_p;
 extern int net_msg_cost;
 extern int net_msg_burst;
@@ -124,6 +125,14 @@ ctl_table core_table[] = {
                .mode           = 0644,
                .proc_handler   = &proc_dointvec
        },
+       {
+               .ctl_name       = NET_CORE_BUDGET,
+               .procname       = "netdev_budget",
+               .data           = &netdev_budget,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec
+       },
        { .ctl_name = 0 }
 };