[RFC,v3,0/4] flow_dissector: Provide basic batman-adv unicast handling
Message ID | 20171215182313.15767-1-sven.eckelmann@openmesh.com (mailing list archive) |
---|---|
Headers |
Return-Path: <b.a.t.m.a.n-bounces@lists.open-mesh.org> X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 66BD181355; Fri, 15 Dec 2017 19:23:28 +0100 (CET) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=openmesh-com.20150623.gappssmtp.com header.i=@openmesh-com.20150623.gappssmtp.com header.b="QgNjjasr"; dkim-atps=neutral Received-SPF: None (mailfrom) identity=mailfrom; client-ip=2a00:1450:400c:c0c::234; helo=mail-wr0-x234.google.com; envelope-from=sven.eckelmann@openmesh.com; receiver=<UNKNOWN> Received: from mail-wr0-x234.google.com (mail-wr0-x234.google.com [IPv6:2a00:1450:400c:c0c::234]) by open-mesh.org (Postfix) with ESMTPS id C1968800E6 for <b.a.t.m.a.n@lists.open-mesh.org>; Fri, 15 Dec 2017 19:23:25 +0100 (CET) Received: by mail-wr0-x234.google.com with SMTP id z34so8775046wrz.10 for <b.a.t.m.a.n@lists.open-mesh.org>; Fri, 15 Dec 2017 10:23:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openmesh-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=guM593nifOy/6jDrqPShS5d04QEAL+qlFLGSseHKzIY=; b=QgNjjasrM4W+Ryl7wFxx+GGtWR5G7jWvyNPvvvp6sAaIvmXsIL63uwmvfLP+AKGVb7 SQsSjuJu8sA7IH5VKUSoBgkBi0G9vHhXE6KtX8uafElNyPa0Fvt2saUQjuUGJ0Qzbg3R NKazr4aeZSCK8BgMR6rod+jRSmpP55fyfiIbAfKWt/ktgpM0cqCHE8dBt++nPSrLNR82 3K81D4RYnd+lIIdNOWPASFCAz3LzZRnJYKPhkDu4343ZZcKQiN/9bciCSmgHC9nUkufy sAEt3kautqXgkOKv5zbRmiAFGrXVrOAj0rhfywp1c0/q09HGqHLH/NtEgQlYNj4Q9NfO htlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=guM593nifOy/6jDrqPShS5d04QEAL+qlFLGSseHKzIY=; b=NzK4xagdDxgK592/Xb6liGMvbx2mv7WcMP6iw7qUoa4XA1OTmIRVC1T6Tg+ZgStKjv rcUMjYzUQaGNMLISXxi4hBWolayCy+fsRNoAMKjHuXelpSawGE2xJW0OMn4Gcl9VTxrd l0c19wT3iXVBwNZQukcmNFhSHzUaC7ukHjyXfLtS7PRu+jjatUMLt4ppnAgT7PdxN2Sh RoMmSItHL11CHFyJB6VV8b55DkLXSIUAAZi1FNyfvrUcqzN31b61quO2PT2dHx3EaHQ1 /gaPhoITfCD/D8tNqDsr9hpg53U6OehpWPlIbDNhDF0K/pNkd7UUsAAPcvU5Y299+OZm 2hxA== X-Gm-Message-State: AKGB3mJTdGvYtySeTIHpq6nIMpoT/V2uK6ICuznmXrJFLJoPJ+JHiM2y nXwIMpH9Coc/I4u/FrIqKUZOOg== X-Google-Smtp-Source: ACJfBouhE4dRKiz/UBwX91HQYUV4mojQ7T8f9Tdq63j4oWMqI7bAagnMuGgHy4EnwClGWpd2wZ06UA== X-Received: by 10.223.128.195 with SMTP id 61mr10325228wrl.122.1513362205523; Fri, 15 Dec 2017 10:23:25 -0800 (PST) Received: from sven-desktop.home.narfation.org (p200300C593C571F90000000000004065.dip0.t-ipconnect.de. [2003:c5:93c5:71f9::4065]) by smtp.gmail.com with ESMTPSA id k30sm7871200wrf.63.2017.12.15.10.23.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Dec 2017 10:23:24 -0800 (PST) From: Sven Eckelmann <sven.eckelmann@openmesh.com> To: netdev@vger.kernel.org Date: Fri, 15 Dec 2017 19:23:09 +0100 Message-Id: <20171215182313.15767-1-sven.eckelmann@openmesh.com> X-Mailer: git-send-email 2.11.0 Subject: [B.A.T.M.A.N.] [RFC v3 0/4] flow_dissector: Provide basic batman-adv unicast handling X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n.lists.open-mesh.org> List-Unsubscribe: <https://lists.open-mesh.org/mm/options/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=unsubscribe> List-Archive: <http://lists.open-mesh.org/pipermail/b.a.t.m.a.n/> List-Post: <mailto:b.a.t.m.a.n@lists.open-mesh.org> List-Help: <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=help> List-Subscribe: <https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=subscribe> Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n@lists.open-mesh.org> Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>, Tom Herbert <tom@herbertland.com>, b.a.t.m.a.n@lists.open-mesh.org, Jiri Pirko <jiri@mellanox.com>, linux-kernel@vger.kernel.org, Eric Dumazet <edumazet@google.com>, Sven Eckelmann <sven.eckelmann@openmesh.com>, "David S . Miller" <davem@davemloft.net> Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" <b.a.t.m.a.n-bounces@lists.open-mesh.org> |
Message
Sven Eckelmann
Dec. 15, 2017, 6:23 p.m. UTC
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. I didn't get any feedback how the files should actually be named and I am not really happy with the current names - so please feel free to propose better names. The discussion of the RFC v2 can be found in the related patches of https://patchwork.ozlabs.org/cover/844783/ Changes in v3: ============== * removed change of uapi/linux/batman_adv.h to uapi/linux/batadv_genl.h - requested by Willem de Bruijn <willemdebruijn.kernel@gmail.com> * removed naming fixes for enums/defines in uapi/linux/batadv_genl.h - requested by Willem de Bruijn <willemdebruijn.kernel@gmail.com> * renamed uapi/linux/batadv.h to uapi/linux/batadv_packet.h * moved batadv dissector functionality in own function - requested by Tom Herbert <tom@herbertland.com> * added support for flags FLOW_DISSECTOR_F_STOP_AT_ENCAP and FLOW_DIS_ENCAPSULATION - requested by Willem de Bruijn <willemdebruijn.kernel@gmail.com> 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/ Sven Eckelmann (4): 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 | 1 + .../packet.h => include/uapi/linux/batadv_packet.h | 31 ++++++------ 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 | 4 +- 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 +- net/core/flow_dissector.c | 57 ++++++++++++++++++++++ 27 files changed, 98 insertions(+), 43 deletions(-) rename net/batman-adv/packet.h => include/uapi/linux/batadv_packet.h (96%)