Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756713AbdLOWwC (ORCPT ); Fri, 15 Dec 2017 17:52:02 -0500 Received: from mail-oi0-f54.google.com ([209.85.218.54]:39793 "EHLO mail-oi0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755868AbdLOWwA (ORCPT ); Fri, 15 Dec 2017 17:52:00 -0500 X-Google-Smtp-Source: ACJfBoswB/yce+U4N9z5WdUziXYvYshC+qD6mEmU+vdLU3fh163+S4aPGaKmQ4vjmVPrKOEANW48+NB8bXSDX5Q7iaw= MIME-Version: 1.0 In-Reply-To: <20171215182313.15767-1-sven.eckelmann@openmesh.com> References: <20171215182313.15767-1-sven.eckelmann@openmesh.com> From: Willem de Bruijn Date: Fri, 15 Dec 2017 17:51:19 -0500 Message-ID: Subject: Re: [RFC v3 0/4] flow_dissector: Provide basic batman-adv unicast handling To: Sven Eckelmann Cc: Network Development , b.a.t.m.a.n@lists.open-mesh.org, Eric Dumazet , LKML , Jiri Pirko , "David S . Miller" , Tom Herbert Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2340 Lines: 56 On Fri, Dec 15, 2017 at 1:23 PM, Sven Eckelmann wrote: > 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 > * 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 Thanks for making these changes. The flow dissection looks good to me. One possible issue is that this exposes kernel fixed width types u8/u16/.. to userspace. For posix compatibility reasons, uapi headers use the variant with underscores.