Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3159
b: refs/heads/master
c: 51b0bde
h: refs/heads/master
i:
  3157: d373fe9
  3155: c8970cd
  3151: c74d998
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jun 24, 2005
1 parent f8c4d3f commit b3e8061
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31aa02c53c84658f6694f319f09e232ede27be5a
refs/heads/master: 51b0bdedb8e784d0d969a6b77151911130812400
1 change: 1 addition & 0 deletions trunk/include/linux/sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,8 @@ int dev_queue_xmit(struct sk_buff *skb)
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, };
Expand Down Expand Up @@ -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();

Expand Down
9 changes: 9 additions & 0 deletions trunk/net/core/sysctl_net_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 }
};

Expand Down

0 comments on commit b3e8061

Please sign in to comment.