Skip to content

Commit e387660

Browse files
Stephen Hemmingerdavem330
authored andcommitted
[NET]: Fix sysctl net.core.dev_weight
Changing the sysctl net.core.dev_weight has no effect because the weight of the backlog devices is set during initialization and never changed. This patch propagates any changes to the global value affected by sysctl to the per-cpu devices. It is done every time the packet handler function is run. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 699a411 commit e387660

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎net/core/dev.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,6 +1744,7 @@ static int process_backlog(struct net_device *backlog_dev, int *budget)
17441744
struct softnet_data *queue = &__get_cpu_var(softnet_data);
17451745
unsigned long start_time = jiffies;
17461746

1747+
backlog_dev->weight = weight_p;
17471748
for (;;) {
17481749
struct sk_buff *skb;
17491750
struct net_device *dev;

0 commit comments

Comments
 (0)