flow_dissector: Provide basic batman-adv unicast handling
Subsystems (3)
v2 cover flow_dissector: Provide basic batman-adv unicast handling
Hi,
we are currently starting to use batman-adv as mesh protocol on multicore embedded devices. These usually don't have a lot of CPU power per core but are reasonable fast when using multiple cores.
It was noticed that sending was working very well but receiving was basically only using on CPU core per neighbor. The reason for that is format of the (normal) incoming packet:
+--------------------+
| ip(v6)hdr |
+--------------------+
| inner ethhdr |
+--------------------+
| batadv unicast hdr |
+--------------------+
| outer ethhdr |
+--------------------+The flow dissector will therefore stop after parsing the outer ethernet header and will not parse the actual ipv(4|6)/... header of the packet. Our assumption was now that it would help us to add minimal support to the flow dissector to jump over the batman-adv unicast and inner ethernet header (like in gre ETH_P_TEB). The patch was implemented in a slightly hacky way [1] and the results looked quite promising.
Now we comes the actual "problematic" part. The packet format is currently only available in net/batman-adv/packet.h. I've guessed that it should be moved somewhere under include/ to make it accessible to the flow dissector in a "standard way".
First we have to find the correct place for it. I am not aware of any standard for that - so I've grepped for some packet headers which are used by the dissector and found following files (most likely not a complete list):
* linux/if_vlan.h
* net/gre.h
* net/tipc.h
* uapi/linux/if_arp.h
* uapi/linux/if_ether.h
* uapi/linux/if_pppox.h
* uapi/linux/ip.h
* uapi/linux/ipv6.h
* uapi/linux/mpls.h
* uapi/linux/tcp.h
So I would say that uapi/linux is the "winner" here. This would actually also helpful for userspace tools which either inject packets or monitor interfaces + dissect packets (for example batctl). Now to the actual filename. batman_adv.h is already used in the moment for the netlink definition and I would like to avoid that these two things are placed in the same file.
A quick grep for "NL_NAME" showed me following names:
* linux/nl802154.h
* net/nl802154.h
* uapi/linux/batman_adv.h
* uapi/linux/devlink.h
* uapi/linux/dlm_netlink.h
* uapi/linux/fou.h
* uapi/linux/if_macsec.h
* uapi/linux/if_team.h
* uapi/linux/ila.h
* uapi/linux/ip_vs.h
* uapi/linux/irda.h
* uapi/linux/l2tp.h
* uapi/linux/nfc.h
* uapi/linux/nl80211.h
* uapi/linux/psample.h
* uapi/linux/seg6_genl.h
* uapi/linux/taskstats.h
* uapi/linux/tcp_metrics.h
* uapi/linux/tipc_config.h
* uapi/linux/tipc_netlink.h
There doesn't seem to be any common way to do it - so I have to guess what the best names could be. I've decided (but please provide better alternatives) to use batadv_genl.h (for generic netlink stuff) and batadv.h (for the packet format).
I would really appreciate it when you would provide feedback to the naming/placement of the files. Btw. the patches are currently based on the top of batadv/net-next [2] and this repository contains changes which still have to be submitted to net-next.
Changes in v2:
=============
* removed the batman-adv unicast packet header definition from flow_dissector.c
* moved the batman-adv packet.h/uapi headers around to provide the correct definitions to flow_dissector.c
Kind regards,
Sven
[1] https://patchwork.open-mesh.org/patch/17162/
[2] https://git.open-mesh.org/linux-merge.git/shortlog/refs/heads/batadv/net-next
Sven Eckelmann (6):
batman-adv: Change nl references to genl
batman-adv: Rename batman-adv.h to batadv_genl.h
batman-adv: Let packet.h include its headers directly
batman-adv: Remove usage of BIT(x) in packet.h
batman-adv: Convert packet.h to uapi header
flow_dissector: Parse batman-adv unicast headers
MAINTAINERS | 3 +-
.../packet.h => include/uapi/linux/batadv.h | 32 ++++++++++++----------
include/uapi/linux/{batman_adv.h => batadv_genl.h} | 20 +++++++-------
net/batman-adv/bat_algo.c | 2 +-
net/batman-adv/bat_iv_ogm.c | 4 +--
net/batman-adv/bat_v.c | 4 +--
net/batman-adv/bat_v_elp.c | 2 +-
net/batman-adv/bat_v_ogm.c | 2 +-
net/batman-adv/bridge_loop_avoidance.c | 4 +--
net/batman-adv/distributed-arp-table.h | 2 +-
net/batman-adv/fragmentation.c | 2 +-
net/batman-adv/gateway_client.c | 4 +--
net/batman-adv/gateway_common.c | 2 +-
net/batman-adv/hard-interface.c | 2 +-
net/batman-adv/icmp_socket.c | 2 +-
net/batman-adv/main.c | 6 ++--
net/batman-adv/main.h | 4 +--
net/batman-adv/multicast.c | 2 +-
net/batman-adv/netlink.c | 14 ++++++----
net/batman-adv/network-coding.c | 2 +-
net/batman-adv/originator.c | 2 +-
net/batman-adv/routing.c | 2 +-
net/batman-adv/send.h | 3 +-
net/batman-adv/soft-interface.c | 2 +-
net/batman-adv/sysfs.c | 2 +-
net/batman-adv/tp_meter.c | 4 +--
net/batman-adv/translation-table.c | 4 +--
net/batman-adv/tvlv.c | 2 +-
net/batman-adv/types.h | 5 ++--
net/core/flow_dissector.c | 30 ++++++++++++++++++++
30 files changed, 101 insertions(+), 70 deletions(-)
rename net/batman-adv/packet.h => include/uapi/linux/batadv.h (96%)
rename include/uapi/linux/{batman_adv.h => batadv_genl.h} (95%)Signature · 1 line
2.11.0
RFC v2 1/6 batman-adv: Change nl references to genl
The batman-adv netlink functionality is actually not pure netlink but is using NETLINK_GENERIC and related API. The code should therefore also use this "genl" instead of "nl" to make this more clear.
--- include/uapi/linux/batman_adv.h | 14 +++++++------- net/batman-adv/main.c | 2 +- net/batman-adv/netlink.c | 10 ++++++---- 3 files changed, 14 insertions(+), 12 deletions(-)
include/uapi/linux/batman_adv.h +7 -7
@@ -25,9 +25,9 @@#ifndef _UAPI_LINUX_BATMAN_ADV_H_#define _UAPI_LINUX_BATMAN_ADV_H_ -#define BATADV_NL_NAME "batadv" +#define BATADV_GENL_NAME "batadv" -#define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter" +#define BATADV_GENL_MCAST_GROUP_TPMETER "tpmeter"/** * enum batadv_tt_client_flags - TT client specific flags
@@ -92,9 +92,9 @@ enum batadv_tt_client_flags { };/** -* enum batadv_nl_attrs - batman-adv netlink attributes +* enum batadv_genl_attrs - batman-adv netlink attributes */ -enum batadv_nl_attrs { +enum batadv_genl_attrs {/** * @BATADV_ATTR_UNSPEC: unspecified attribute to catch errors */
@@ -280,7 +280,7 @@ enum batadv_nl_attrs { __BATADV_ATTR_AFTER_LAST,/** -* @NUM_BATADV_ATTR: total number of batadv_nl_attrs available +* @NUM_BATADV_ATTR: total number of batadv_genl_attrs available */ NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST,
@@ -291,9 +291,9 @@ enum batadv_nl_attrs { };/** -* enum batadv_nl_commands - supported batman-adv netlink commands +* enum batadv_genl_commands - supported batman-adv netlink commands */ -enum batadv_nl_commands { +enum batadv_genl_commands {/** * @BATADV_CMD_UNSPEC: unspecified command to catch errors */
net/batman-adv/main.c +1 -1
@@ -687,4 +687,4 @@ MODULE_DESCRIPTION(BATADV_DRIVER_DESC);MODULE_SUPPORTED_DEVICE (BATADV_DRIVER_DEVICE );MODULE_VERSION (BATADV_SOURCE_VERSION );MODULE_ALIAS_RTNL_LINK ("batadv" ); -MODULE_ALIAS_GENL_FAMILY (BATADV_NL_NAME ); +MODULE_ALIAS_GENL_FAMILY (BATADV_GENL_NAME );
net/batman-adv/netlink.c +6 -4
@@ -58,11 +58,13 @@ struct genl_family batadv_netlink_family;/* multicast groups */ enum batadv_netlink_multicast_groups { -BATADV_NL_MCGRP_TPMETER , +BATADV_GENL_MCGRP_TPMETER , };static const struct genl_multicast_group batadv_netlink_mcgrps[] = { - [BATADV_NL_MCGRP_TPMETER ] = { .name =BATADV_NL_MCAST_GROUP_TPMETER }, + [BATADV_GENL_MCGRP_TPMETER ] = { + .name =BATADV_GENL_MCAST_GROUP_TPMETER + }, };static const struct nla_policy batadv_netlink_policy[NUM_BATADV_ATTR ] = {
@@ -298,7 +300,7 @@ int batadv_netlink_tpmeter_notify(struct batadv_priv *bat_priv, const u8 *dst,genlmsg_multicast_netns (&batadv_netlink_family,dev_net (bat_priv->soft_iface), msg,0 , -BATADV_NL_MCGRP_TPMETER ,GFP_KERNEL ); +BATADV_GENL_MCGRP_TPMETER ,GFP_KERNEL );return 0 ;
@@ -611,7 +613,7 @@ static const struct genl_ops batadv_netlink_ops[] = {struct genl_family batadv_netlink_family__ro_after_init = { .hdrsize =0 , - .name =BATADV_NL_NAME , + .name =BATADV_GENL_NAME , .version =1 , .maxattr =BATADV_ATTR_MAX , .netnsok = true,
Signature · 1 line
2.11.0
RFC v2 2/6 batman-adv: Rename batman-adv.h to batadv_genl.h
In reply to Sven EckelmannThis file contains the relevant information to let userspace communicate with batman-adv over generic netlink. The relevant genl enums for the attributes and commands have the prefix batadv_genl. Renaming this file to this name therefore represents the content better and avoids confusion with the file which will contain the packet format definitions.
---
MAINTAINERS | 2 +-
include/uapi/linux/{batman_adv.h => batadv_genl.h} | 6 +++---
net/batman-adv/bat_algo.c | 2 +-
net/batman-adv/bat_iv_ogm.c | 2 +-
net/batman-adv/bat_v.c | 2 +-
net/batman-adv/bridge_loop_avoidance.c | 2 +-
net/batman-adv/gateway_client.c | 2 +-
net/batman-adv/main.c | 2 +-
net/batman-adv/netlink.c | 2 +-
net/batman-adv/originator.c | 2 +-
net/batman-adv/tp_meter.c | 2 +-
net/batman-adv/translation-table.c | 2 +-
net/batman-adv/types.h | 2 +-
13 files changed, 15 insertions(+), 15 deletions(-)
rename include/uapi/linux/{batman_adv.h => batadv_genl.h} (98%)MAINTAINERS +1 -1
@@ -2563,7 +2563,7 @@ S: Maintained F: Documentation/ABI/testing/sysfs-class-net-batman-adv F: Documentation/ABI/testing/sysfs-class-net-mesh F: Documentation/networking/batman-adv.rst -F: include/uapi/linux/batman_adv.h +F: include/uapi/linux/batadv_genl.h F: net/batman-adv/ BAYCOM/HDLCDRV DRIVERS FOR AX.25
include/uapi/linux/batadv_genl.h renamed from include/uapi/linux/batman_adv.h +3 -3
@@ -22,8 +22,8 @@* DEALINGS IN THE SOFTWARE. */ -#ifndef _UAPI_LINUX_BATMAN_ADV_H_ -#define _UAPI_LINUX_BATMAN_ADV_H_ +#ifndef _UAPI_LINUX_BATADV_GENL_H_ +#define _UAPI_LINUX_BATADV_GENL_H_#define BATADV_GENL_NAME "batadv"
@@ -423,4 +423,4 @@ enum batadv_tp_meter_reason { BATADV_TP_REASON_TOO_MANY = 133, }; -#endif /* _UAPI_LINUX_BATMAN_ADV_H_ */ +#endif /* _UAPI_LINUX_BATADV_GENL_H_ */
net/batman-adv/bat_algo.c +1 -1
@@ -31,7 +31,7 @@#include <linux/string.h> #include <net/genetlink.h> #include <net/netlink.h> -#include <uapi/linux/batman_adv.h> +#include <uapi/linux/batadv_genl.h> #include "bat_algo.h" #include "netlink.h"
net/batman-adv/bat_iv_ogm.c +1 -1
@@ -54,7 +54,7 @@#include <linux/workqueue.h> #include <net/genetlink.h> #include <net/netlink.h> -#include <uapi/linux/batman_adv.h> +#include <uapi/linux/batadv_genl.h> #include "bat_algo.h" #include "bitarray.h"
net/batman-adv/bat_v.c +1 -1
@@ -39,7 +39,7 @@#include <linux/workqueue.h> #include <net/genetlink.h> #include <net/netlink.h> -#include <uapi/linux/batman_adv.h> +#include <uapi/linux/batadv_genl.h> #include "bat_algo.h" #include "bat_v_elp.h"
net/batman-adv/bridge_loop_avoidance.c +1 -1
@@ -52,7 +52,7 @@#include <net/genetlink.h> #include <net/netlink.h> #include <net/sock.h> -#include <uapi/linux/batman_adv.h> +#include <uapi/linux/batadv_genl.h> #include "hard-interface.h" #include "hash.h"
net/batman-adv/gateway_client.c +1 -1
@@ -45,7 +45,7 @@#include <linux/stddef.h> #include <linux/udp.h> #include <net/sock.h> -#include <uapi/linux/batman_adv.h> +#include <uapi/linux/batadv_genl.h> #include "gateway_common.h" #include "hard-interface.h"
net/batman-adv/main.c +1 -1
@@ -48,7 +48,7 @@#include <linux/workqueue.h> #include <net/dsfield.h> #include <net/rtnetlink.h> -#include <uapi/linux/batman_adv.h> +#include <uapi/linux/batadv_genl.h> #include "bat_algo.h" #include "bat_iv_ogm.h"
net/batman-adv/netlink.c +1 -1
@@ -42,7 +42,7 @@#include <net/genetlink.h> #include <net/netlink.h> #include <net/sock.h> -#include <uapi/linux/batman_adv.h> +#include <uapi/linux/batadv_genl.h> #include "bat_algo.h" #include "bridge_loop_avoidance.h"
net/batman-adv/originator.c +1 -1
@@ -41,7 +41,7 @@#include <linux/stddef.h> #include <linux/workqueue.h> #include <net/sock.h> -#include <uapi/linux/batman_adv.h> +#include <uapi/linux/batadv_genl.h> #include "bat_algo.h" #include "distributed-arp-table.h"
net/batman-adv/tp_meter.c +1 -1
@@ -51,7 +51,7 @@#include <linux/timer.h> #include <linux/wait.h> #include <linux/workqueue.h> -#include <uapi/linux/batman_adv.h> +#include <uapi/linux/batadv_genl.h> #include "hard-interface.h" #include "log.h"
net/batman-adv/translation-table.c +1 -1
@@ -54,7 +54,7 @@#include <net/genetlink.h> #include <net/netlink.h> #include <net/sock.h> -#include <uapi/linux/batman_adv.h> +#include <uapi/linux/batadv_genl.h> #include "bridge_loop_avoidance.h" #include "hard-interface.h"
net/batman-adv/types.h +1 -1
@@ -37,7 +37,7 @@#include <linux/types.h> #include <linux/wait.h> #include <linux/workqueue.h> -#include <uapi/linux/batman_adv.h> +#include <uapi/linux/batadv_genl.h> #include "packet.h"
Signature · 1 line
2.11.0
RFC v2 3/6 batman-adv: Let packet.h include its headers directly
In reply to Sven EckelmannThe headers used by packet.h should also be included by it directly. main.h is currently dealing with it in batman-adv, but this will no longer work when this header is moved to include/uapi/linux/.
--- net/batman-adv/main.h | 2 -- net/batman-adv/packet.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-)
net/batman-adv/main.h +0 -2
@@ -219,10 +219,8 @@ enum batadv_uev_type {/* Kernel headers */ -#include <linux/bitops.h> /* for packet.h */ #include <linux/compiler.h> #include <linux/etherdevice.h> -#include <linux/if_ether.h> /* for packet.h */ #include <linux/if_vlan.h> #include <linux/jiffies.h> #include <linux/percpu.h>
net/batman-adv/packet.h +2 -0
@@ -22,6 +22,8 @@#define _NET_BATMAN_ADV_PACKET_H_#include <asm/byteorder.h> +#include <linux/bitops.h> +#include <linux/if_ether.h> #include <linux/types.h> /**
Signature · 1 line
2.11.0
RFC v2 4/6 batman-adv: Remove usage of BIT(x) in packet.h
In reply to Sven EckelmannThe BIT(x) macro is no longer available for uapi headers because it is defined outside of it (linux/bitops.h). The use of it must therefore be avoided and replaced by an appropriate other representation.
--- net/batman-adv/packet.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-)
net/batman-adv/packet.h +11 -12
@@ -22,7 +22,6 @@#define _NET_BATMAN_ADV_PACKET_H_#include <asm/byteorder.h> -#include <linux/bitops.h> #include <linux/if_ether.h> #include <linux/types.h>
@@ -94,9 +93,9 @@ enum batadv_subtype {* one hop neighbor on the interface where it was originally received. */ enum batadv_iv_flags { -BATADV_NOT_BEST_NEXT_HOP =BIT (0 ), -BATADV_PRIMARIES_FIRST_HOP =BIT (1 ), -BATADV_DIRECTLINK =BIT (2 ), +BATADV_NOT_BEST_NEXT_HOP =1UL <<0 , +BATADV_PRIMARIES_FIRST_HOP =1UL <<1 , +BATADV_DIRECTLINK =1UL <<2 , };/**
@@ -125,9 +124,9 @@ enum batadv_icmp_packettype {* @BATADV_MCAST_WANT_ALL_IPV6: we want all IPv6 multicast packets */ enum batadv_mcast_flags { -BATADV_MCAST_WANT_ALL_UNSNOOPABLES =BIT (0 ), -BATADV_MCAST_WANT_ALL_IPV4 =BIT (1 ), -BATADV_MCAST_WANT_ALL_IPV6 =BIT (2 ), +BATADV_MCAST_WANT_ALL_UNSNOOPABLES =1UL <<0 , +BATADV_MCAST_WANT_ALL_IPV4 =1UL <<1 , +BATADV_MCAST_WANT_ALL_IPV6 =1UL <<2 , };/* tt data subtypes */
@@ -141,10 +140,10 @@ enum batadv_mcast_flags {* @BATADV_TT_FULL_TABLE: contains full table to replace existing table */ enum batadv_tt_data_flags { -BATADV_TT_OGM_DIFF =BIT (0 ), -BATADV_TT_REQUEST =BIT (1 ), -BATADV_TT_RESPONSE =BIT (2 ), -BATADV_TT_FULL_TABLE =BIT (4 ), +BATADV_TT_OGM_DIFF =1UL <<0 , +BATADV_TT_REQUEST =1UL <<1 , +BATADV_TT_RESPONSE =1UL <<2 , +BATADV_TT_FULL_TABLE =1UL <<4 , };/**
@@ -152,7 +151,7 @@ enum batadv_tt_data_flags {* @BATADV_VLAN_HAS_TAG: whether the field contains a valid vlan tag or not */ enum batadv_vlan_flags { -BATADV_VLAN_HAS_TAG =BIT (15 ), +BATADV_VLAN_HAS_TAG =1UL <<15 , };/**
Signature · 1 line
2.11.0
RFC v2 5/6 batman-adv: Convert packet.h to uapi header
In reply to Sven EckelmannThe header file is used by different userspace programs to inject packets or to decode sniffed packets. It should therefore be available to them as userspace header.
Also other components in the kernel (like the flow dissector) require access to the packet definitions to be able to decode ETH_P_BATMAN ethernet packets.
--- MAINTAINERS | 1 + net/batman-adv/packet.h => include/uapi/linux/batadv.h | 9 +++++---- net/batman-adv/bat_iv_ogm.c | 2 +- net/batman-adv/bat_v.c | 2 +- net/batman-adv/bat_v_elp.c | 2 +- net/batman-adv/bat_v_ogm.c | 2 +- net/batman-adv/bridge_loop_avoidance.c | 2 +- net/batman-adv/distributed-arp-table.h | 2 +- net/batman-adv/fragmentation.c | 2 +- net/batman-adv/gateway_client.c | 2 +- net/batman-adv/gateway_common.c | 2 +- net/batman-adv/hard-interface.c | 2 +- net/batman-adv/icmp_socket.c | 2 +- net/batman-adv/main.c | 2 +- net/batman-adv/main.h | 2 +- net/batman-adv/multicast.c | 2 +- net/batman-adv/netlink.c | 2 +- net/batman-adv/network-coding.c | 2 +- net/batman-adv/routing.c | 2 +- net/batman-adv/send.h | 3 +-- net/batman-adv/soft-interface.c | 2 +- net/batman-adv/sysfs.c | 2 +- net/batman-adv/tp_meter.c | 2 +- net/batman-adv/translation-table.c | 2 +- net/batman-adv/tvlv.c | 2 +- net/batman-adv/types.h | 3 +-- 26 files changed, 30 insertions(+), 30 deletions(-) rename net/batman-adv/packet.h => include/uapi/linux/batadv.h (98%)
MAINTAINERS +1 -0
@@ -2563,6 +2563,7 @@ S: Maintained F: Documentation/ABI/testing/sysfs-class-net-batman-adv F: Documentation/ABI/testing/sysfs-class-net-mesh F: Documentation/networking/batman-adv.rst +F: include/uapi/linux/batadv.h F: include/uapi/linux/batadv_genl.h F: net/batman-adv/
include/uapi/linux/batadv.h renamed from net/batman-adv/packet.h +5 -4
@@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
@@ -16,10 +16,11 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. * * License-Filename: LICENSES/preferred/GPL-2.0 +* License-Filename: LICENSES/exceptions/Linux-syscall-note */ -#ifndef _NET_BATMAN_ADV_PACKET_H_ -#define _NET_BATMAN_ADV_PACKET_H_ +#ifndef _UAPI_LINUX_BATADV_H_ +#define _UAPI_LINUX_BATADV_H_#include <asm/byteorder.h> #include <linux/if_ether.h>
@@ -643,4 +644,4 @@ struct batadv_tvlv_mcast_data { u8 reserved[3]; }; -#endif /* _NET_BATMAN_ADV_PACKET_H_ */ +#endif /* _UAPI_LINUX_BATADV_H_ */
net/batman-adv/bat_iv_ogm.c +1 -1
@@ -54,6 +54,7 @@#include <linux/workqueue.h> #include <net/genetlink.h> #include <net/netlink.h> +#include <uapi/linux/batadv.h> #include <uapi/linux/batadv_genl.h> #include "bat_algo.h"
@@ -65,7 +66,6 @@#include "netlink.h" #include "network-coding.h" #include "originator.h" -#include "packet.h" #include "routing.h" #include "send.h" #include "translation-table.h"
net/batman-adv/bat_v.c +1 -1
@@ -39,6 +39,7 @@#include <linux/workqueue.h> #include <net/genetlink.h> #include <net/netlink.h> +#include <uapi/linux/batadv.h> #include <uapi/linux/batadv_genl.h> #include "bat_algo.h"
@@ -51,7 +52,6 @@#include "log.h" #include "netlink.h" #include "originator.h" -#include "packet.h" struct sk_buff ;
net/batman-adv/bat_v_elp.c +1 -1
@@ -44,13 +44,13 @@#include <linux/types.h> #include <linux/workqueue.h> #include <net/cfg80211.h> +#include <uapi/linux/batadv.h> #include "bat_algo.h" #include "bat_v_ogm.h" #include "hard-interface.h" #include "log.h" #include "originator.h" -#include "packet.h" #include "routing.h" #include "send.h"
net/batman-adv/bat_v_ogm.c +1 -1
@@ -41,13 +41,13 @@#include <linux/string.h> #include <linux/types.h> #include <linux/workqueue.h> +#include <uapi/linux/batadv.h> #include "bat_algo.h" #include "hard-interface.h" #include "hash.h" #include "log.h" #include "originator.h" -#include "packet.h" #include "routing.h" #include "send.h" #include "translation-table.h"
net/batman-adv/bridge_loop_avoidance.c +1 -1
@@ -52,6 +52,7 @@#include <net/genetlink.h> #include <net/netlink.h> #include <net/sock.h> +#include <uapi/linux/batadv.h> #include <uapi/linux/batadv_genl.h> #include "hard-interface.h"
@@ -59,7 +60,6 @@#include "log.h" #include "netlink.h" #include "originator.h" -#include "packet.h" #include "soft-interface.h" #include "sysfs.h" #include "translation-table.h"
net/batman-adv/distributed-arp-table.h +1 -1
@@ -26,9 +26,9 @@#include <linux/compiler.h> #include <linux/netdevice.h> #include <linux/types.h> +#include <uapi/linux/batadv.h> #include "originator.h" -#include "packet.h" struct seq_file ;struct sk_buff ;
net/batman-adv/fragmentation.c +1 -1
@@ -35,10 +35,10 @@#include <linux/slab.h> #include <linux/spinlock.h> #include <linux/string.h> +#include <uapi/linux/batadv.h> #include "hard-interface.h" #include "originator.h" -#include "packet.h" #include "routing.h" #include "send.h" #include "soft-interface.h"
net/batman-adv/gateway_client.c +1 -1
@@ -45,6 +45,7 @@#include <linux/stddef.h> #include <linux/udp.h> #include <net/sock.h> +#include <uapi/linux/batadv.h> #include <uapi/linux/batadv_genl.h> #include "gateway_common.h"
@@ -52,7 +53,6 @@#include "log.h" #include "netlink.h" #include "originator.h" -#include "packet.h" #include "routing.h" #include "soft-interface.h" #include "sysfs.h"
net/batman-adv/gateway_common.c +1 -1
@@ -29,10 +29,10 @@#include <linux/netdevice.h> #include <linux/stddef.h> #include <linux/string.h> +#include <uapi/linux/batadv.h> #include "gateway_client.h" #include "log.h" -#include "packet.h" #include "tvlv.h" /**
net/batman-adv/hard-interface.c +1 -1
@@ -40,6 +40,7 @@#include <linux/spinlock.h> #include <net/net_namespace.h> #include <net/rtnetlink.h> +#include <uapi/linux/batadv.h> #include "bat_v.h" #include "bridge_loop_avoidance.h"
@@ -48,7 +49,6 @@#include "gateway_client.h" #include "log.h" #include "originator.h" -#include "packet.h" #include "send.h" #include "soft-interface.h" #include "sysfs.h"
net/batman-adv/icmp_socket.c +1 -1
@@ -46,11 +46,11 @@#include <linux/string.h> #include <linux/uaccess.h> #include <linux/wait.h> +#include <uapi/linux/batadv.h> #include "hard-interface.h" #include "log.h" #include "originator.h" -#include "packet.h" #include "send.h" static struct batadv_socket_client *batadv_socket_client_hash[256 ];
net/batman-adv/main.c +1 -1
@@ -48,6 +48,7 @@#include <linux/workqueue.h> #include <net/dsfield.h> #include <net/rtnetlink.h> +#include <uapi/linux/batadv.h> #include <uapi/linux/batadv_genl.h> #include "bat_algo.h"
@@ -65,7 +66,6 @@#include "netlink.h" #include "network-coding.h" #include "originator.h" -#include "packet.h" #include "routing.h" #include "send.h" #include "soft-interface.h"
net/batman-adv/main.h +1 -1
@@ -225,8 +225,8 @@ enum batadv_uev_type {#include <linux/jiffies.h> #include <linux/percpu.h> #include <linux/types.h> +#include <uapi/linux/batadv.h> -#include "packet.h" #include "types.h" struct net_device ;
net/batman-adv/multicast.c +1 -1
@@ -57,11 +57,11 @@#include <net/if_inet6.h> #include <net/ip.h> #include <net/ipv6.h> +#include <uapi/linux/batadv.h> #include "hard-interface.h" #include "hash.h" #include "log.h" -#include "packet.h" #include "translation-table.h" #include "tvlv.h"
net/batman-adv/netlink.c +1 -1
@@ -42,6 +42,7 @@#include <net/genetlink.h> #include <net/netlink.h> #include <net/sock.h> +#include <uapi/linux/batadv.h> #include <uapi/linux/batadv_genl.h> #include "bat_algo.h"
@@ -49,7 +50,6 @@#include "gateway_client.h" #include "hard-interface.h" #include "originator.h" -#include "packet.h" #include "soft-interface.h" #include "tp_meter.h" #include "translation-table.h"
net/batman-adv/network-coding.c +1 -1
@@ -51,12 +51,12 @@#include <linux/stddef.h> #include <linux/string.h> #include <linux/workqueue.h> +#include <uapi/linux/batadv.h> #include "hard-interface.h" #include "hash.h" #include "log.h" #include "originator.h" -#include "packet.h" #include "routing.h" #include "send.h" #include "tvlv.h"
net/batman-adv/routing.c +1 -1
@@ -36,6 +36,7 @@#include <linux/skbuff.h> #include <linux/spinlock.h> #include <linux/stddef.h> +#include <uapi/linux/batadv.h> #include "bitarray.h" #include "bridge_loop_avoidance.h"
@@ -46,7 +47,6 @@#include "log.h" #include "network-coding.h" #include "originator.h" -#include "packet.h" #include "send.h" #include "soft-interface.h" #include "tp_meter.h"
net/batman-adv/send.h +1 -2
@@ -26,8 +26,7 @@#include <linux/compiler.h> #include <linux/spinlock.h> #include <linux/types.h> - -#include "packet.h" +#include <uapi/linux/batadv.h> struct sk_buff ;
net/batman-adv/soft-interface.c +1 -1
@@ -51,6 +51,7 @@#include <linux/stddef.h> #include <linux/string.h> #include <linux/types.h> +#include <uapi/linux/batadv.h> #include "bat_algo.h" #include "bridge_loop_avoidance.h"
@@ -62,7 +63,6 @@#include "multicast.h" #include "network-coding.h" #include "originator.h" -#include "packet.h" #include "send.h" #include "sysfs.h" #include "translation-table.h"
net/batman-adv/sysfs.c +1 -1
@@ -41,6 +41,7 @@#include <linux/string.h> #include <linux/stringify.h> #include <linux/workqueue.h> +#include <uapi/linux/batadv.h> #include "bridge_loop_avoidance.h" #include "distributed-arp-table.h"
@@ -49,7 +50,6 @@#include "hard-interface.h" #include "log.h" #include "network-coding.h" -#include "packet.h" #include "soft-interface.h" static struct net_device *batadv_kobj_to_netdev (struct kobject *obj)
net/batman-adv/tp_meter.c +1 -1
@@ -51,13 +51,13 @@#include <linux/timer.h> #include <linux/wait.h> #include <linux/workqueue.h> +#include <uapi/linux/batadv.h> #include <uapi/linux/batadv_genl.h> #include "hard-interface.h" #include "log.h" #include "netlink.h" #include "originator.h" -#include "packet.h" #include "send.h" /**
net/batman-adv/translation-table.c +1 -1
@@ -54,6 +54,7 @@#include <net/genetlink.h> #include <net/netlink.h> #include <net/sock.h> +#include <uapi/linux/batadv.h> #include <uapi/linux/batadv_genl.h> #include "bridge_loop_avoidance.h"
@@ -62,7 +63,6 @@#include "log.h" #include "netlink.h" #include "originator.h" -#include "packet.h" #include "soft-interface.h" #include "tvlv.h"
net/batman-adv/tvlv.c +1 -1
@@ -38,9 +38,9 @@#include <linux/stddef.h> #include <linux/string.h> #include <linux/types.h> +#include <uapi/linux/batadv.h> #include "originator.h" -#include "packet.h" #include "send.h" #include "tvlv.h"
net/batman-adv/types.h +1 -2
@@ -37,10 +37,9 @@#include <linux/types.h> #include <linux/wait.h> #include <linux/workqueue.h> +#include <uapi/linux/batadv.h> #include <uapi/linux/batadv_genl.h> -#include "packet.h" -struct seq_file ;#ifdef CONFIG_BATMAN_ADV_DAT
Signature · 1 line
2.11.0
RFC v2 6/6 flow_dissector: Parse batman-adv unicast headers
In reply to Sven EckelmannThe batman-adv unicast packets contain a full layer 2 frame in encapsulated form. The flow dissector must therefore be able to parse the batman-adv unicast header to reach the layer 2+3 information.
+--------------------+ | ip(v6)hdr | +--------------------+ | inner ethhdr | +--------------------+ | batadv unicast hdr | +--------------------+ | outer ethhdr | +--------------------+
The obtained information from the upper layer can then be used by RPS to schedule the processing on separate cores. This allows better distribution of multiple flows from the same neighbor to different cores.
--- net/core/flow_dissector.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
net/core/flow_dissector.c +30 -0
@@ -24,6 +24,7 @@#include <linux/tcp.h> #include <net/flow_dissector.h> #include <scsi/fc/fc_fcoe.h> +#include <uapi/linux/batadv.h> static void dissector_set_key (struct flow_dissector *flow_dissector,enum flow_dissector_key_id key_id)
@@ -696,6 +697,35 @@ bool __skb_flow_dissect(const struct sk_buff *skb,break ; } +case htons (ETH_P_BATMAN ): { +struct { +struct batadv_unicast_packet batadv_unicast; +struct ethhdr eth; + } *hdr, _hdr; + + hdr =__skb_header_pointer (skb, nhoff,sizeof (_hdr), data, hlen, + &_hdr); +if (!hdr) { + fdret =FLOW_DISSECT_RET_OUT_BAD ; +break ; + } + +if (hdr->batadv_unicast.version !=BATADV_COMPAT_VERSION ) { + fdret =FLOW_DISSECT_RET_OUT_BAD ; +break ; + } + +if (hdr->batadv_unicast.packet_type !=BATADV_UNICAST ) { + fdret =FLOW_DISSECT_RET_OUT_BAD ; +break ; + } + + proto = hdr->eth.h_proto; + nhoff +=sizeof (*hdr); + + fdret =FLOW_DISSECT_RET_PROTO_AGAIN ; +break ; + }case htons (ETH_P_8021AD ):case htons (ETH_P_8021Q ): {const struct vlan_hdr *vlan;
Signature · 1 line
2.11.0
Re: [RFC v2 6/6] flow_dissector: Parse batman-adv unicast headers
Quoted 72 lines · Sven Eckelmann
The batman-adv unicast packets contain a full layer 2 frame in encapsulated form. The flow dissector must therefore be able to parse the batman-adv unicast header to reach the layer 2+3 information.
+--------------------+ | ip(v6)hdr | +--------------------+ | inner ethhdr | +--------------------+ | batadv unicast hdr | +--------------------+ | outer ethhdr | +--------------------+The obtained information from the upper layer can then be used by RPS to schedule the processing on separate cores. This allows better distribution of multiple flows from the same neighbor to different cores.
Signed-off-by Sven Eckelmann <[email protected]>--- net/core/flow_dissector.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)net/core/flow_dissector.c +30
-1@@ -24,6 +24,7 @@#include <linux/tcp.h> #include <net/flow_dissector.h> #include <scsi/fc/fc_fcoe.h> +#include <uapi/linux/batadv.h> static void dissector_set_key (struct flow_dissector *flow_dissector,enum flow_dissector_key_id key_id)@@ -696,6 +697,35 @@ bool __skb_flow_dissect(const struct sk_buff *skb,break ; } +case htons (ETH_P_BATMAN ): { +struct { +struct batadv_unicast_packet batadv_unicast; +struct ethhdr eth; + } *hdr, _hdr; + + hdr =__skb_header_pointer (skb, nhoff,sizeof (_hdr), data, hlen, + &_hdr); +if (!hdr) { + fdret =FLOW_DISSECT_RET_OUT_BAD ; +break ; + } + +if (hdr->batadv_unicast.version !=BATADV_COMPAT_VERSION ) { + fdret =FLOW_DISSECT_RET_OUT_BAD ; +break ; + } + +if (hdr->batadv_unicast.packet_type !=BATADV_UNICAST ) { + fdret =FLOW_DISSECT_RET_OUT_BAD ; +break ; + } + + proto = hdr->eth.h_proto; + nhoff +=sizeof (*hdr); + + fdret =FLOW_DISSECT_RET_PROTO_AGAIN ; +break ; + }case htons (ETH_P_8021AD ):case htons (ETH_P_8021Q ): {const struct vlan_hdr *vlan; --
Quoted 2 lines
2.11.0
Switch statements with cases having many LOC is hard to read and __skb_flow_dissect is aleady quite convoluted to begin with.
I suggest putting this in a static function similar to how MPLS and GRE are handled.
Tom
Re: [RFC v2 6/6] flow_dissector: Parse batman-adv unicast headers
On Dienstag, 5. Dezember 2017 09:19:45 CET Tom Herbert wrote:
[...]
Quoted 5 lines
Switch statements with cases having many LOC is hard to read and
__skb_flow_dissectis aleady quite convoluted to begin with.I suggest putting this in a static function similar to how MPLS and GRE are handled.
Thanks for the feedback.
I was not sure whether "inline" or an extra function would be preferred. I've then decided to implement it like most of the other protocols. But since an extra function is the preferred method for handling new protos, I will move it to an extra function.
The change can already be found in
https://git.open-mesh.org/linux-merge.git/shortlog/refs/heads/ecsv/flowdissector
I also saw that you've introduced in
commit 823b96939578 ("flow_dissector: Add control/reporting of encapsulation") a flag to stop dissecting when something encapsulated was detected. It is not 100% clear to me when the FLOW_DIS_ENCAPSULATION should be set and FLOW_DISSECTOR_F_STOP_AT_ENCAP be checked. Only when there is IP/eth in IP (like in the two examples from the commit message) or also when there is a ethernet header, followed by batman-adv unicast header and again followed by an ethernet header?
Right now, the flag FLOW_DISSECTOR_F_STOP_AT_ENCAP is only used by fib_multipath_hash - so it doesn't really help me to understand it. But the FLOW_DIS_ENCAPSULATION is checked by drivers/net/ethernet/broadcom/bnxt/bnxt.c to set it in a special tunnel_type (anytunnel) mode for IPv4/IPv6 packets. So my (wild) guess right now is that these flags should only be used/checked when handling encapsulation inside IPv4/IPv6 packets. But maybe you can correct me here.
Kind regards,
Sven
Re: [RFC v2 2/6] batman-adv: Rename batman-adv.h to batadv_genl.h
In reply to Sven EckelmannQuoted 10 lines · Sven Eckelmann
This file contains the relevant information to let userspace communicate with batman-adv over generic netlink. The relevant genl enums for the attributes and commands have the prefix
batadv_genl. Renaming this file to this name therefore represents the content better and avoids confusion with the file which will contain the packet format definitions.Signed-off-by Sven Eckelmann <[email protected]>--- MAINTAINERS | 2 +- include/uapi/linux/{batman_adv.h => batadv_genl.h} | 6 +++---
This and the previous patch changes uapi. That might break userspace applications that rely on it.
Re: [RFC v2 6/6] flow_dissector: Parse batman-adv unicast headers
In reply to Sven EckelmannQuoted 7 lines · Sven Eckelmann
On Dienstag, 5. Dezember 2017 09:19:45 CET Tom Herbert wrote:
[...]Quoted 5 lines
Switch statements with cases having many LOC is hard to read and
__skb_flow_dissectis aleady quite convoluted to begin with.I suggest putting this in a static function similar to how MPLS and GRE are handled.
Perhaps it can even be behind a static key depending on whether any devices are active, adjusted in batadv_hardif_(en|dis)able_interface.
Quoted 10 lines
Thanks for the feedback.
I was not sure whether "inline" or an extra function would be preferred. I've then decided to implement it like most of the other protocols. But since an extra function is the preferred method for handling new protos, I will move it to an extra function.
The change can already be found in
https://git.open-mesh.org/linux-merge.git/shortlog/refs/heads/ecsv/flowdissector
Quoted 8 lines
I also saw that you've introduced in
commit823b96939578("flow_dissector: Add control/reporting of encapsulation") a flag to stop dissecting when something encapsulated was detected. It is not 100% clear to me when theFLOW_DIS_ENCAPSULATIONshould be set andFLOW_DISSECTOR_F_STOP_AT_ENCAPbe checked. Only when there is IP/eth in IP (like in the two examples from the commit message) or also when there is a ethernet header, followed by batman-adv unicast header and again followed by an ethernet header?
Please implement FLOW_DISSECTOR_F_STOP_AT_ENCAP. It may be used in more flow dissector paths in the future.
The features are also used by GRE, which can encap Ethernet, for an example that is closer to this protocol.
Re: [B.A.T.M.A.N.] [RFC v2 2/6] batman-adv: Rename batman-adv.h to batadv_genl.h
In reply to Willem de BruijnQuoted 6 lines · On Mittwoch, 6. Dezember 2017 11:42:33 CET Willem de Bruijn wrote:
Quoted 4 lines · Sven Eckelmann
This file contains the relevant information to let userspace communicate with batman-adv over generic netlink. The relevant genl enums for the attributes and commands have the prefix
batadv_genl. Renaming this file to this name therefore represents the content better and avoids confusion
with
Quoted 9 lines
Quoted 6 lines
the file which will contain the packet format definitions.
Signed-off-by Sven Eckelmann <[email protected]>--- MAINTAINERS | 2 +- include/uapi/linux/{batman_adv.h => batadv_genl.h} | 6 +++---This and the previous patch changes uapi. That might break userspace applications that rely on it.
I am not aware of any application because all (alfred, batctl and some gluon integration) of them currently ship their own copy because distribution didn't catch up. And this is also the reason why I want to do it now - not later.
Kind regards,
Sven
Re: [B.A.T.M.A.N.] [RFC v2 2/6] batman-adv: Rename batman-adv.h to batadv_genl.h
Quoted 15 lines · Sven Eckelmann
Quoted 6 lines · On Mittwoch, 6. Dezember 2017 11:42:33 CET Willem de Bruijn wrote:
Quoted 4 lines · Sven Eckelmann
This file contains the relevant information to let userspace communicate with batman-adv over generic netlink. The relevant genl enums for the attributes and commands have the prefix
batadv_genl. Renaming this file to this name therefore represents the content better and avoids confusionwith
Quoted 7 lines
Quoted 6 lines
the file which will contain the packet format definitions.
Signed-off-by Sven Eckelmann <[email protected]>--- MAINTAINERS | 2 +- include/uapi/linux/{batman_adv.h => batadv_genl.h} | 6 +++---
Quoted 6 lines
Quoted 2 lines
This and the previous patch changes uapi. That might break userspace applications that rely on it.
I am not aware of any application because all (alfred, batctl and some gluon integration) of them currently ship their own copy because distribution didn't catch up. And this is also the reason why I want to do it now - not later.
That assumes that you know all applications, including those not publicly available. It may be true in this instance, but it is not possible to be certain.
Re: [RFC v2 6/6] flow_dissector: Parse batman-adv unicast headers
In reply to Willem de BruijnQuoted 4 lines · Willem de Bruijn
Quoted 2 lines · Sven Eckelmann
On Dienstag, 5. Dezember 2017 09:19:45 CET Tom Herbert wrote:
[...]
Quoted 9 lines
Quoted 5 lines
Quoted 5 lines
Switch statements with cases having many LOC is hard to read and
__skb_flow_dissectis aleady quite convoluted to begin with.I suggest putting this in a static function similar to how MPLS and GRE are handled.
Perhaps it can even be behind a static key depending on whether any devices are active, adjusted in batadv_hardif_(en|dis)able_interface.
It's aready in a switch statement so static key shouldn't make a difference. Also, we have made flow dissector operate indendently of whether to end protocol is enable (for instance GRE is dissected regarless of whether and GRE tunnels are configured).
Tom
Quoted 24 lines
Quoted 10 lines
Thanks for the feedback.
I was not sure whether "inline" or an extra function would be preferred. I've then decided to implement it like most of the other protocols. But since an extra function is the preferred method for handling new protos, I will move it to an extra function.
The change can already be found in
https://git.open-mesh.org/linux-merge.git/shortlog/refs/heads/ecsv/flowdissectorQuoted 8 lines
I also saw that you've introduced in
commit823b96939578("flow_dissector: Add control/reporting of encapsulation") a flag to stop dissecting when something encapsulated was detected. It is not 100% clear to me when theFLOW_DIS_ENCAPSULATIONshould be set andFLOW_DISSECTOR_F_STOP_AT_ENCAPbe checked. Only when there is IP/eth in IP (like in the two examples from the commit message) or also when there is a ethernet header, followed by batman-adv unicast header and again followed by an ethernet header?Please implement
FLOW_DISSECTOR_F_STOP_AT_ENCAP. It may be used in more flow dissector paths in the future.The features are also used by GRE, which can encap Ethernet, for an example that is closer to this protocol.
Re: [RFC v2 6/6] flow_dissector: Parse batman-adv unicast headers
In reply to Willem de BruijnQuoted 2 lines · On Mittwoch, 6. Dezember 2017 11:54:13 CET Willem de Bruijn wrote:
Perhaps it can even be behind a static key depending on whether any devices are active, adjusted in batadv_hardif_(en|dis)able_interface.
I don't like that because we don't need batman-adv loaded to simply forward (bridge) traffic between interfaces. And not being able to use RPS with multiple cores just because the batman-adv module (and interfaces) is not enabled seems to be counter-intuitive.
Quoted 5 lines
Please implement
FLOW_DISSECTOR_F_STOP_AT_ENCAP. It may be used in more flow dissector paths in the future.The features are also used by GRE, which can encap Ethernet, for an example that is closer to this protocol.
Thanks for the feedback. I have it now implemented like in GRE.
The change can already be found in
https://git.open-mesh.org/linux-merge.git/shortlog/refs/heads/ecsv/flowdissector
Kind regards,
Sven
Re: [RFC v2 6/6] flow_dissector: Parse batman-adv unicast headers
Quoted 8 lines · On Mittwoch, 6. Dezember 2017 11:54:13 CET Willem de Bruijn wrote:
Quoted 2 lines
Perhaps it can even be behind a static key depending on whether any devices are active, adjusted in batadv_hardif_(en|dis)able_interface.
I don't like that because we don't need batman-adv loaded to simply forward (bridge) traffic between interfaces. And not being able to use RPS with multiple cores just because the batman-adv module (and interfaces) is not enabled seems to be counter-intuitive.
Okay. Ack on Tom's points, too.
I want to be able to administratively limit the footprint of flow dissector, but agreed that this can be configured independent from the rest of the datapath, i.e., with knobs specific to flow dissector.
Quoted 10 lines
Quoted 5 lines
Please implement
FLOW_DISSECTOR_F_STOP_AT_ENCAP. It may be used in more flow dissector paths in the future.The features are also used by GRE, which can encap Ethernet, for an example that is closer to this protocol.
Thanks for the feedback. I have it now implemented like in GRE.
The change can already be found in
https://git.open-mesh.org/linux-merge.git/shortlog/refs/heads/ecsv/flowdissector
Great, thanks.
Re: [B.A.T.M.A.N.] [RFC v2 2/6] batman-adv: Rename batman-adv.h to batadv_genl.h
In reply to Willem de BruijnOn Mittwoch, 6. Dezember 2017 11:58:14 CET Willem de Bruijn wrote:
[...]
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
--- MAINTAINERS | 2 +- include/uapi/linux/{batman_adv.h => batadv_genl.h} | 6 +++---This and the previous patch changes uapi. That might break userspace applications that rely on it.
Quoted 7 lines
Quoted 3 lines
I am not aware of any application because all (alfred, batctl and some gluon integration) of them currently ship their own copy because distribution didn't catch up. And this is also the reason why I want to do it now - not later.
That assumes that you know all applications, including those not publicly available. It may be true in this instance, but it is not possible to be certain.
I've just talked with Simon. Because you have a problem with these two changes, he suggested that I should drop these two patches and merge packet.h with the uapi batadv genl header batman_adv.h
Kind regards,
Sven
Re: [B.A.T.M.A.N.] [RFC v2 2/6] batman-adv: Rename batman-adv.h to batadv_genl.h
Quoted 13 lines · On Freitag, 15. Dezember 2017 11:32:05 CET Sven Eckelmann wrote:
On Mittwoch, 6. Dezember 2017 11:58:14 CET Willem de Bruijn wrote:
[...]Quoted 11 lines
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
--- MAINTAINERS | 2 +- include/uapi/linux/{batman_adv.h => batadv_genl.h} | 6 +++---This and the previous patch changes uapi. That might break userspace applications that rely on it.
I am not aware of any application because all (alfred, batctl and some gluon integration) of them currently ship their own copy because distribution didn't catch up. And this is also the reason why I want to do it now - not later.
Quoted 7 lines
Quoted 3 lines
That assumes that you know all applications, including those not publicly available. It may be true in this instance, but it is not possible to be certain.
I've just talked with Simon. Because you have a problem with these two changes, he suggested that I should drop these two patches and merge
packet.hwith the uapi batadv genl headerbatman_adv.h
No, this is also bad because batman_adv.h is MIT license and packet.h is GPL-2. So what other name would you suggest for packet.h? batman_adv_packet.h?
Kind regards,
Sven
Re: [B.A.T.M.A.N.] [RFC v2 2/6] batman-adv: Rename batman-adv.h to batadv_genl.h
Quoted 18 lines · Sven Eckelmann
Quoted 17 lines · On Freitag, 15. Dezember 2017 11:32:05 CET Sven Eckelmann wrote:
On Mittwoch, 6. Dezember 2017 11:58:14 CET Willem de Bruijn wrote:
[...]Quoted 14 lines
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
--- MAINTAINERS | 2 +- include/uapi/linux/{batman_adv.h => batadv_genl.h} | 6 +++---This and the previous patch changes uapi. That might break userspace applications that rely on it.
I am not aware of any application because all (alfred, batctl and some gluon integration) of them currently ship their own copy because distribution didn't catch up. And this is also the reason why I want to do it now - not later.
That assumes that you know all applications, including those not publicly available. It may be true in this instance, but it is not possible to be certain.
Quoted 6 lines
Quoted 3 lines
I've just talked with Simon. Because you have a problem with these two changes, he suggested that I should drop these two patches and merge
packet.hwith the uapi batadv genl headerbatman_adv.hNo, this is also bad because
batman_adv.his MIT license andpacket.his GPL-2. So what other name would you suggest forpacket.h?batman_adv_packet.h?
Sure, that sounds great. Thanks.
Re: [B.A.T.M.A.N.] [RFC v2 2/6] batman-adv: Rename batman-adv.h to batadv_genl.h
Quoted 4 lines · On Freitag, 15. Dezember 2017 11:57:55 CET Willem de Bruijn wrote:
Quoted 2 lines
No, this is also bad because
batman_adv.his MIT license andpacket.his GPL-2. So what other name would you suggest forpacket.h?batman_adv_packet.h?Sure, that sounds great. Thanks.
Really? Isn't include/uapi/linux/batman_adv_packet.h looking like an accident which never should have had happened?
Kind regards,
Sven
Re: [B.A.T.M.A.N.] [RFC v2 2/6] batman-adv: Rename batman-adv.h to batadv_genl.h
Quoted 8 lines · Sven Eckelmann
Quoted 4 lines · On Freitag, 15. Dezember 2017 11:57:55 CET Willem de Bruijn wrote:
Quoted 2 lines
No, this is also bad because
batman_adv.his MIT license andpacket.his GPL-2. So what other name would you suggest forpacket.h?batman_adv_packet.h?Sure, that sounds great. Thanks.
Really? Isn't
include/uapi/linux/batman_adv_packet.hlooking like an accident which never should have had happened?
My only point was that renaming and modifying existing uapi files can break userspace compilation.
As long as the existing files are not changed, I don't have a strong opinion on naming for new files.