diff options
author | Linus Lüssing <linus.luessing@c0d3.blue> | 2017-02-17 13:17:07 +0300 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2017-03-26 13:46:44 +0300 |
commit | e2d9ba43559e5fcd94a365ba86718332737b0817 (patch) | |
tree | 0ebe05e8cb92fd74c617b30c837a4ee3dc500dfd /net/batman-adv/main.c | |
parent | 99ba18ef0200a824e7bae73f358916b6e3624d62 (diff) | |
download | linux-e2d9ba43559e5fcd94a365ba86718332737b0817.tar.xz |
batman-adv: restructure rebroadcast counter into forw_packet API
This patch refactors the num_packets counter of a forw_packet in the
following three ways:
1) Removed dual-use of forw_packet::num_packets:
-> now for aggregation purposes only
2) Using forw_packet::skb::cb::num_bcasts instead:
-> for easier access in aggregation code later
3) make access to num_bcasts private to batadv_forw_packet_*()
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
[sven@narfation.org: Change num_bcasts to unsigned]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/main.c')
-rw-r--r-- | net/batman-adv/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 5000c540614d..fb381fb26a66 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c @@ -516,6 +516,9 @@ static void batadv_recv_handler_init(void) BUILD_BUG_ON(sizeof(struct batadv_tvlv_tt_change) != 12); BUILD_BUG_ON(sizeof(struct batadv_tvlv_roam_adv) != 8); + i = FIELD_SIZEOF(struct sk_buff, cb); + BUILD_BUG_ON(sizeof(struct batadv_skb_cb) > i); + /* broadcast packet */ batadv_rx_handler[BATADV_BCAST] = batadv_recv_bcast_packet; |