diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2017-04-10 04:11:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-12 13:59:21 -0400 |
commit | 5b3dc2f37d7daf76a679cd204492ec5dff06bb8a (patch) | |
tree | 959c17821a16b655118100cb46f2d468bbc6cec6 /include/net/neighbour.h | |
parent | eaffadbbb3f2711fc76e7b0ddf37c452ee11b805 (diff) |
net: neigh: make ->hh_len 32-bit
Using 16-bit ->hh_len doesn't save any memory, save some .text instead:
add/remove: 0/0 grow/shrink: 1/6 up/down: 2/-19 (-17)
function old new delta
neigh_update 2312 2314 +2
fwnet_header_cache 199 197 -2
eth_header_cache 101 99 -2
ip6_finish_output2 2371 2368 -3
vrf_finish_output6 1522 1518 -4
vrf_finish_output 1413 1409 -4
ip_finish_output2 1627 1623 -4
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/neighbour.h')
-rw-r--r-- | include/net/neighbour.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 9496179c7b4e..e4dd3a214034 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -450,7 +450,7 @@ static inline int neigh_hh_bridge(struct hh_cache *hh, struct sk_buff *skb) | |||
450 | static inline int neigh_hh_output(const struct hh_cache *hh, struct sk_buff *skb) | 450 | static inline int neigh_hh_output(const struct hh_cache *hh, struct sk_buff *skb) |
451 | { | 451 | { |
452 | unsigned int seq; | 452 | unsigned int seq; |
453 | int hh_len; | 453 | unsigned int hh_len; |
454 | 454 | ||
455 | do { | 455 | do { |
456 | seq = read_seqbegin(&hh->hh_lock); | 456 | seq = read_seqbegin(&hh->hh_lock); |
@@ -459,7 +459,7 @@ static inline int neigh_hh_output(const struct hh_cache *hh, struct sk_buff *skb | |||
459 | /* this is inlined by gcc */ | 459 | /* this is inlined by gcc */ |
460 | memcpy(skb->data - HH_DATA_MOD, hh->hh_data, HH_DATA_MOD); | 460 | memcpy(skb->data - HH_DATA_MOD, hh->hh_data, HH_DATA_MOD); |
461 | } else { | 461 | } else { |
462 | int hh_alen = HH_DATA_ALIGN(hh_len); | 462 | unsigned int hh_alen = HH_DATA_ALIGN(hh_len); |
463 | 463 | ||
464 | memcpy(skb->data - hh_alen, hh->hh_data, hh_alen); | 464 | memcpy(skb->data - hh_alen, hh->hh_data, hh_alen); |
465 | } | 465 | } |