batman-adv: Move OGM rebroadcast stats to orig_ifinfo
authorSven Eckelmann <sven@narfation.org>
Thu, 16 Aug 2018 14:54:45 +0000 (16:54 +0200)
committerSimon Wunderlich <sw@simonwunderlich.de>
Sat, 15 Sep 2018 07:51:10 +0000 (09:51 +0200)
commitdee222c7b20cdfff4b4d554bb4a5199572c5f28c
tree05da4b067681ffcdf74b510c4ce68809fdacd2d2
parentd331a739949992043b135fcfba649196b397ec3b
batman-adv: Move OGM rebroadcast stats to orig_ifinfo

B.A.T.M.A.N. IV requires the number of rebroadcast from a neighboring
originator. These statistics are gathered per interface which transmitted
the OGM (and then received it again). Since an originator is not interface
specific, a resizable array was used in each originator.

This resizable array had an entry for each interface and had to be resizes
(for all OGMs) when the number of active interface was modified. This could
cause problems when a large number of interface is added and not enough
continuous memory is available to allocate the array.

There is already a per interface originator structure "batadv_orig_ifinfo"
which can be used to store this information.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/bat_iv_ogm.c
net/batman-adv/hard-interface.c
net/batman-adv/originator.c
net/batman-adv/originator.h
net/batman-adv/soft-interface.c
net/batman-adv/types.h