batman-adv: Add hop_penalty mesh genl configuration
authorSven Eckelmann <sven@narfation.org>
Fri, 23 Nov 2018 12:19:38 +0000 (13:19 +0100)
committerSimon Wunderlich <sw@simonwunderlich.de>
Sat, 9 Feb 2019 13:28:14 +0000 (14:28 +0100)
commitbfc7f1be57b8a5ea738ce5db62b82234e4901abf
tree6fd19f42582c100c59f4c78b3714f7947562b633
parente2d0d35b5b0ce420505e88255fd5922ed035bb8d
batman-adv: Add hop_penalty mesh genl configuration

The TQ (B.A.T.M.A.N. IV) and throughput values (B.A.T.M.A.N. V) are reduced
when they are forwarded. One of the reductions is the penalty for
traversing an additional hop. This hop_penalty (0-255) defines the
percentage of reduction (0-100%).

The BATADV_CMD_SET_MESH/BATADV_CMD_GET_MESH commands allow to set/get the
configuration of this feature using the u8 BATADV_ATTR_HOP_PENALTY
attribute.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
include/uapi/linux/batman_adv.h
net/batman-adv/netlink.c