From patchwork Thu Dec 21 09:17:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17240 Return-Path: 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 4BE2F80A33; Thu, 21 Dec 2017 10:20:06 +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="KtVvVKV8"; dkim-atps=neutral Received-SPF: None (mailfrom) identity=mailfrom; client-ip=2a00:1450:400c:c09::22c; helo=mail-wm0-x22c.google.com; envelope-from=sven.eckelmann@openmesh.com; receiver= Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) by open-mesh.org (Postfix) with ESMTPS id 094DE80999 for ; Thu, 21 Dec 2017 10:20:01 +0100 (CET) Received: by mail-wm0-x22c.google.com with SMTP id y82so19209253wmg.1 for ; Thu, 21 Dec 2017 01:20:01 -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=aI/HwqF2rpckgnBUwGwX90tHMRwYKgWNeb1PORiwkC0=; b=KtVvVKV8K3bMrCkq+iQ3gAT7RFhHErqrcvSvapMSINGUbC+EzT8aSrOkV0CSDbpxdY Qh5AslPqUtAEx9rl+dUb40oKUCxwQj41y9PHz3hQfX2fFqAlTJuvWkXAvgAhY4bEvWQ4 nWXsfDOScOpaZqIa/JErJgyvqNYvhmtsI0o312AHba789sTT3Tc970rpSw+sKKwG0NK2 IB/VNpaP2HPjddq4FTxE4ZGOCk2hBcbMNh8ohKmJWJpvOFgPNmh50aMWcYR5PzaJPYkg +kG7wlQRnZZjNwPHkGpCNueRLWlaE11r6nmGS2MVrrU2ydkFsbzzIPeFTWH4qJFBhZ0i wyYA== 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=aI/HwqF2rpckgnBUwGwX90tHMRwYKgWNeb1PORiwkC0=; b=qJkZdJUrh5L/bRMi1XmYUeEmf0p5jv/r4FTE5ByXPlM+kILxf5e6z6Mow9moZllytG k9bJ0vCGybjSmVURWEjcMFbasUPD+Yl8y7Ys6V5mmIY9zSjPw7z1eDVZ6HnoQs1eurul M/XJJz3Bbo9xG+exlV3aewG61GMzp9ZrfNWs+NyhFh/PUAkgp37mpy+hI52rRf8vqw+0 p64fqw6bYn2YlqTyskLUc95VohsEs/mFWg42DFdB4VpwPxxYKrnTwXmWeRzwFesooGvD WpIuKAp1luWUIA6UcrHKJdL8S5QpwlVkMSGE2IGLdmQyWBp/UeggsiBX7fCfZnzNtfvH gnCA== X-Gm-Message-State: AKGB3mIRm63cEgk3pxy5ihUYDEd8PUd7IBV4EfigTocszTcpAjUpWfcT SIcrGfHVm8A+abkUduUfe6pGliwe X-Google-Smtp-Source: ACJfBovuBh1MjacvFZ35Nks28Kar9KJwyPOmGua5Z8m3dWhPSWEaaLOvMv3VCkwQRMVT5O6oest4fw== X-Received: by 10.28.96.195 with SMTP id u186mr8583680wmb.121.1513848000894; Thu, 21 Dec 2017 01:20:00 -0800 (PST) Received: from sven-desktop.home.narfation.org (p2003007C6F508A00A5003EEAB9F6E50C.dip0.t-ipconnect.de. [2003:7c:6f50:8a00:a500:3eea:b9f6:e50c]) by smtp.gmail.com with ESMTPSA id d71sm7835550wma.7.2017.12.21.01.19.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Dec 2017 01:19:52 -0800 (PST) From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Thu, 21 Dec 2017 10:17:37 +0100 Message-Id: <20171221091742.8020-1-sven.eckelmann@openmesh.com> X-Mailer: git-send-email 2.11.0 Subject: [B.A.T.M.A.N.] [PATCH v4 0/5] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Cc: Willem de Bruijn , netdev@vger.kernel.org, Sven Eckelmann , Jiri Pirko , linux-kernel@vger.kernel.org, Eric Dumazet , Tom Herbert Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" 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. So I am now just using the names from RFC v3 The discussion of the RFC v3 can be found in the related patches of https://patchwork.ozlabs.org/cover/849345/ The discussion of the RFC v2 can be found in the related patches of https://patchwork.ozlabs.org/cover/844783/ Changes in v4: ============== * added patch to change the u8/u16 to __u8/__u16 in include/uapi/linux/batadv_packet.h - requested by Willem de Bruijn Changes in v3: ============== * removed change of uapi/linux/batman_adv.h to uapi/linux/batadv_genl.h - requested by Willem de Bruijn * removed naming fixes for enums/defines in uapi/linux/batadv_genl.h - requested by Willem de Bruijn * renamed uapi/linux/batadv.h to uapi/linux/batadv_packet.h * moved batadv dissector functionality in own function - requested by Tom Herbert * added support for flags FLOW_DISSECTOR_F_STOP_AT_ENCAP and FLOW_DIS_ENCAPSULATION - requested by Willem de Bruijn 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 Sven Eckelmann (5): batman-adv: Let packet.h include its headers directly batman-adv: Remove usage of BIT(x) in packet.h batman-adv: Remove kernel fixed width types 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 | 245 +++++++++++---------- 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, 205 insertions(+), 150 deletions(-) rename net/batman-adv/packet.h => include/uapi/linux/batadv_packet.h (85%)