mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
net: make struct net_device::tx_queue_len unsigned int
4 billion packet queue is something unthinkable so use 32-bit value for now. Space savings on x86_64: add/remove: 0/0 grow/shrink: 3/70 up/down: 16/-131 (-115) function old new delta change_tx_queue_len 94 108 +14 qdisc_create 1176 1177 +1 alloc_netdev_mqs 1124 1125 +1 xenvif_alloc 533 532 -1 x25_asy_setup 167 166 -1 ... tun_queue_resize 945 940 -5 pfifo_fast_enqueue 167 162 -5 qfq_init_qdisc 168 158 -10 tap_queue_resize 810 799 -11 transmit 719 698 -21 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
64f5102dcb
commit
0cd2950357
@@ -2046,8 +2046,8 @@ static int do_setlink(const struct sk_buff *skb,
|
||||
}
|
||||
|
||||
if (tb[IFLA_TXQLEN]) {
|
||||
unsigned long value = nla_get_u32(tb[IFLA_TXQLEN]);
|
||||
unsigned long orig_len = dev->tx_queue_len;
|
||||
unsigned int value = nla_get_u32(tb[IFLA_TXQLEN]);
|
||||
unsigned int orig_len = dev->tx_queue_len;
|
||||
|
||||
if (dev->tx_queue_len ^ value) {
|
||||
dev->tx_queue_len = value;
|
||||
|
||||
Reference in New Issue
Block a user