Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

eql: dont rely on HZ=100

HZ is more likely to be 1000 these days.

timer handlers are run from softirq, no need to disable bh

skb priority 1 is TC_PRIO_FILLER

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eric Dumazet and committed by
David S. Miller
09e79d6e 819a1008

+5 -4
+4 -3
drivers/net/eql.c
··· 125 125 #include <linux/if.h> 126 126 #include <linux/if_arp.h> 127 127 #include <linux/if_eql.h> 128 + #include <linux/pkt_sched.h> 128 129 129 130 #include <asm/uaccess.h> 130 131 ··· 144 143 equalizer_t *eql = (equalizer_t *) param; 145 144 struct list_head *this, *tmp, *head; 146 145 147 - spin_lock_bh(&eql->queue.lock); 146 + spin_lock(&eql->queue.lock); 148 147 head = &eql->queue.all_slaves; 149 148 list_for_each_safe(this, tmp, head) { 150 149 slave_t *slave = list_entry(this, slave_t, list); ··· 158 157 } 159 158 160 159 } 161 - spin_unlock_bh(&eql->queue.lock); 160 + spin_unlock(&eql->queue.lock); 162 161 163 162 eql->timer.expires = jiffies + EQL_DEFAULT_RESCHED_IVAL; 164 163 add_timer(&eql->timer); ··· 342 341 struct net_device *slave_dev = slave->dev; 343 342 344 343 skb->dev = slave_dev; 345 - skb->priority = 1; 344 + skb->priority = TC_PRIO_FILLER; 346 345 slave->bytes_queued += skb->len; 347 346 dev_queue_xmit(skb); 348 347 dev->stats.tx_packets++;
+1 -1
include/linux/if_eql.h
··· 22 22 #define EQL_DEFAULT_SLAVE_PRIORITY 28800 23 23 #define EQL_DEFAULT_MAX_SLAVES 4 24 24 #define EQL_DEFAULT_MTU 576 25 - #define EQL_DEFAULT_RESCHED_IVAL 100 25 + #define EQL_DEFAULT_RESCHED_IVAL HZ 26 26 27 27 #define EQL_ENSLAVE (SIOCDEVPRIVATE) 28 28 #define EQL_EMANCIPATE (SIOCDEVPRIVATE + 1)