b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven.eckelmann@openmesh.com>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: netdev@vger.kernel.org,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	Tom Herbert <tom@herbertland.com>, Jiri Pirko <jiri@mellanox.com>,
	linux-kernel@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
	Sven Eckelmann <sven.eckelmann@openmesh.com>
Subject: [B.A.T.M.A.N.] [PATCH v4 0/5] flow_dissector: Provide basic batman-adv unicast handling
Date: Thu, 21 Dec 2017 10:17:37 +0100	[thread overview]
Message-ID: <20171221091742.8020-1-sven.eckelmann@openmesh.com> (raw)

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 <willemdebruijn.kernel@gmail.com>

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

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%)

-- 
2.11.0


             reply	other threads:[~2017-12-21  9:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-21  9:17 Sven Eckelmann [this message]
2017-12-21  9:17 ` [B.A.T.M.A.N.] [PATCH v4 1/5] batman-adv: Let packet.h include its headers directly Sven Eckelmann
2017-12-21  9:17 ` [B.A.T.M.A.N.] [PATCH v4 2/5] batman-adv: Remove usage of BIT(x) in packet.h Sven Eckelmann
2017-12-21  9:17 ` [B.A.T.M.A.N.] [PATCH v4 3/5] batman-adv: Remove kernel fixed width types " Sven Eckelmann
2017-12-21  9:17 ` [B.A.T.M.A.N.] [PATCH v4 4/5] batman-adv: Convert packet.h to uapi header Sven Eckelmann
2017-12-21  9:17 ` [B.A.T.M.A.N.] [PATCH v4 5/5] flow_dissector: Parse batman-adv unicast headers Sven Eckelmann
2017-12-21 12:24   ` Jiri Pirko
2017-12-21 16:58     ` Willem de Bruijn
2017-12-21 20:40 ` [B.A.T.M.A.N.] [PATCH v4 0/5] flow_dissector: Provide basic batman-adv unicast handling David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171221091742.8020-1-sven.eckelmann@openmesh.com \
    --to=sven.eckelmann@openmesh.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=edumazet@google.com \
    --cc=jiri@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.com \
    --cc=willemdebruijn.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).