batman-adv: Add gateway mesh genl configuration
authorSven Eckelmann <sven@narfation.org>
Fri, 23 Nov 2018 12:15:00 +0000 (13:15 +0100)
committerSimon Wunderlich <sw@simonwunderlich.de>
Sat, 9 Feb 2019 13:28:14 +0000 (14:28 +0100)
commite2d0d35b5b0ce420505e88255fd5922ed035bb8d
tree737bc6ecf7636ad8466296a132623abba08a9deb
parent3e15b06eb7e410ef9f1b9673be094b3e10eacf93
batman-adv: Add gateway mesh genl configuration

The mesh/soft-interface can optimize the handling of DHCP packets. Instead
of flooding them through the whole mesh, it can be forwarded as unicast to
a specific gateway server. The originator which injects the packets in the
mesh has to select (based on sel_class thresholds) a responsible gateway
server. This is done by switching this originator to the gw_mode client.
The servers announce their forwarding bandwidth (download/upload) when the
gw_mode server was selected.

The BATADV_CMD_SET_MESH/BATADV_CMD_GET_MESH commands allow to set/get the
configuration of this feature using the attributes:

* u8 BATADV_ATTR_GW_MODE (0 == off, 1 == client, 2 == server)
* u32 BATADV_ATTR_GW_BANDWIDTH_DOWN (in 100 kbit/s steps)
* u32 BATADV_ATTR_GW_BANDWIDTH_UP (in 100 kbit/s steps)
* u32 BATADV_ATTR_GW_SEL_CLASS

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/gateway_client.c
net/batman-adv/gateway_common.c
net/batman-adv/gateway_common.h
net/batman-adv/netlink.c
net/batman-adv/soft-interface.c
net/batman-adv/sysfs.c