This patchset contains the remaining two debugfs patches for the network
wide multi interface optimization. There are some small changes to
the previous patchset as suggested by Marek:
* omit the hardif directory and move hardif folders directly under $debugs/batman-adv,
as there should be no conflict with the soft interfaces anyway
* rename *multiif* functions to *hardif*
* fix some outdated kerneldoc.
Thanks for all the comments on this patchset, everyone!
Simon
Simon Wunderlich (2):
batman-adv: add debugfs structure for information per interface
batman-adv: add debugfs support to view multiif tables
bat_iv_ogm.c | 12 ++++----
debugfs.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
debugfs.h | 2 ++
hard-interface.c | 9 ++++++
originator.c | 48 +++++++++++++++++++++++++++++-
originator.h | 1 +
types.h | 5 +++-
7 files changed, 156 insertions(+), 7 deletions(-)
--
1.7.10.4
This patchset adds the network wide multi interface optimization as
proposed in our wiki [1] for BATMAN IV. The main purpose is to do
interface alternating and bonding by considering multi interface
capabilities globally and not just for the (next) link, otherwise
non-optimal links may be chosen.
This patchset needs to change a lot of core data structures and
routing, please review it carefully. A local development branch
exists on the public git repo [2].
Changes from PATCHv2 (thanks Linus and Marek for suggestions) are:
* fix many rcu,reference and kerneldoc issues
* remove some TODOs which are fixed in the series
* rename debugfs file hardif/$IF/originators_multiif -> hardif/$IF/originators
* rebase on Antonios extended isolation patches
* ... check for more in the changelog of the individual patches
I've tested the patchset in my VMs to confirm that bonding and alternating
works as expected. Patches should be checkpatch and sparse clean.
As always, any comments are appreciated!
Thanks,
Simon
[1] http://www.open-mesh.org/projects/batman-adv/wiki/network-wide-multi-link-o…
[2] http://git.open-mesh.org/batman-adv.git/shortlog/refs/heads/simon/network-w…
Simon Wunderlich (8):
batman-adv: remove bonding and interface alternating
batman-adv: split tq information in neigh_node struct
batman-adv: split out router from orig_node
batman-adv: add WiFi penalty
batman-adv: consider outgoing interface in OGM sending
batman-adv: add bonding again
batman-adv: add debugfs structure for information per interface
batman-adv: add debugfs support to view multiif tables
bat_iv_ogm.c | 871 +++++++++++++++++++++++++++++++----------------
compat.c | 8 -
compat.h | 1 -
debugfs.c | 94 +++++
debugfs.h | 3 +
distributed-arp-table.c | 3 +-
gateway_client.c | 86 ++++-
hard-interface.c | 9 +
hard-interface.h | 18 +
icmp_socket.c | 3 +-
main.h | 5 +
network-coding.c | 9 +-
originator.c | 529 +++++++++++++++++++++++++---
originator.h | 20 +-
routing.c | 429 ++++++++---------------
routing.h | 12 +-
send.c | 19 +-
soft-interface.c | 2 +-
translation-table.c | 6 +-
types.h | 130 ++++---
20 files changed, 1553 insertions(+), 704 deletions(-)
--
1.7.10.4
Hello Ladies and Gentlemen,
This might be a question better suited to the OpenWRT list, but I
figure it would've been solved better here.
I've got a two-node mesh set up and working well. Config files are
below. I have some minor woes though. Each time one of the nodes boots
up I must:
brctl addif br-lan bat0
ifconfig bat0 up
...before traffic starts to flow between clients connected to the
wlan0 radios of each node. What's the best way of having this happen
automatically? I assume there's a better way than having an init
script run those commands at boot.
Please note that I'm somewhat of a networking novice, so if anything
below seems super dumb, please say so.
Thanks,
Travis.
radio0 is 2.4GHz, for connecting to clients.
radio1 is 5GHz, for the mesh interconnects.
wireless:
config wifi-device radio0
option type mac80211
option channel 11
option hwmode 11ng
option path 'platform/ar934x_wmac'
option htmode HT20
list ht_capab LDPC
list ht_capab SHORT-GI-20
list ht_capab SHORT-GI-40
list ht_capab TX-STBC
list ht_capab RX-STBC1
list ht_capab DSSS_CCK-40
# REMOVE THIS LINE TO ENABLE WIFI:
# option disabled 1
config wifi-iface
option device radio0
option channel 10
option network lan
option mode ap
option ssid HWMesh2-Clients-10
option encryption psk2
option key 3141592653
config wifi-device radio1
option type mac80211
option channel 36
option hwmode 11na
option path 'pci0000:00/0000:00:00.0'
option htmode HT20
list ht_capab LDPC
list ht_capab SHORT-GI-20
list ht_capab SHORT-GI-40
list ht_capab TX-STBC
list ht_capab RX-STBC1
list ht_capab DSSS_CCK-40
# REMOVE THIS LINE TO ENABLE WIFI:
# option disabled 1
config wifi-iface wmesh
option device radio1
option ifname adhoc0
option network mesh
option mode adhoc
option ssid HWMesh2-Backbone
option encryption psk2
option key 3141592653
network:
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd87:bd28:e37e::/48'
config interface 'lan'
option ifname 'eth0.1'
#option ifname 'bat0'
#option ifname 'wlan0'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'
config interface 'wan6'
option ifname '@wan'
option proto 'dhcpv6'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0t 2 3 4 5'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0t 1'
config interface 'mesh'
option ifname adhoc0
option mtu 1528
option proto batadv
option mesh bat0
batman-adv:
config 'mesh' 'bat0'
option 'aggregated_ogms'
option 'ap_isolation'
option 'bonding'
option 'fragmentation'
option 'gw_bandwidth'
option 'gw_mode'
option 'gw_sel_class'
option 'log_level'
option 'orig_interval'
option 'vis_mode'
option 'bridge_loop_avoidance'
option 'distributed_arp_table'
option 'network_coding'
option 'hop_penalty'
# yet another batX instance
# config 'mesh' 'bat5'
# option 'interfaces' 'second_mesh'
Hello list,
this is the third version of this patchset.
Kudos to Marek for his feedback :-)
Changes from v2:
- add sysfs documentation for the new isolation_mark attribute
- revert order of show and store functions for isolation_mark (sysfs.c)
- fix a couple of typ0s in sysfs.c kerneldoc
- add missing kerneldoc for mark argument in tt_local_add()
- improve the way 'mask' is initialised in store_isolation_mark()
Changes from v1 are:
- Introduction of patch 5/6: it adds an helper function to avoid code
duplication - function is called batadv_vlan_ap_isola_get() and it is used to
get the current AP isolation status on a given vlan
- patch 1/6 has been changed to allow the user to enter a mark value without
specifying any bitmask - 0xFFFFFFFF will be used as default
- patch 6/6 has been changed so that broadcasts packets are marked on the
receiver node only if AP isolation is enabled. In this way, if AP isolation
is not ON packets are not altered at all neither on the sender nor on the
receiver.
- the patchset has been rebased on top of current master (dependency from the
patch altering the table headers has been removed)
Description:
=========================
This feature is an extension of the already existing "AP isolation" which aims
to generalise the latter.
The idea is based on considering a particular subset of non-mesh clients as
"ISOLATED" and then apply the same policy that batman-adv already applies for
WiFi clients.
To decide which client belongs to this subset batman-adv uses the skb->mark
field which value can be altered by several components in the kernel (e.g.
netfilter). When an skb hits the soft-interface (e.g. bat0) the skb->mark
is compared to a preconfigured value and the source client is classified as
"ISOLATED" only in case of match.
The pre-configured mark (and its mask) is a user choice and can be set through
a new sysfs interface that is added within this patchset.
"ISOLATED" clients won't be able to talk to each other (batman-adv will drop
any packet originated by an isolated client and directed to another isolated
client) like it now happens for WiFi ones (when AP isolation is on).
Moreover broadcast packets sent by ISOLATED clients are marked on the
receiving node with the same mark that the user configured through the sysfs.
In this way netfilter (or any other program) can make decisions about
these packets on the receiver side (e.g. a rule could be "broadcast packets
created by ISOLATED clients cannot be forwarded over any port of the bridge X")
A draft of the documentation (with an example of how to use tc to mark/filter
packets) is available here[1] and will be improved as soon as the feature is
released.
Cheers,
[1] http://www.open-mesh.org/projects/batman-adv/wiki/Extended-isolation
*** BLURB HERE ***
Antonio Quartulli (6):
batman-adv: add isolation_mark sysfs attribute
batman-adv: mark a local client as isolated when needed
batman-adv: print the new BATADV_TT_CLIENT_ISOLA flag
batman-adv: extend the ap_isolation mechanism
batman-adv: create helper function to get AP isolation status
batman-adv: set the isolation mark in the skb if needed
main.c | 26 +++++++++++++++++++
main.h | 3 +++
packet.h | 1 +
soft-interface.c | 27 ++++++++++++++++----
sysfs-class-net-mesh | 8 ++++++
sysfs.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++
translation-table.c | 72 +++++++++++++++++++++++++++++++++++++++-------------
translation-table.h | 4 ++-
types.h | 2 ++
9 files changed, 191 insertions(+), 23 deletions(-)
--
1.8.4.3
Hello list,
this is the second version of this patchset.
Changes from v1 are:
- Introduction of patch 5/6: it adds an helper function to avoid code
duplication - function is called batadv_vlan_ap_isola_get() and it is used to
get the current AP isolation status on a given vlan
- patch 1/6 has been changed to allow the user to enter a mark value without
specifying any bitmask - 0xFFFFFFFF will be used as default
- patch 6/6 has been changed so that broadcasts packets are marked on the
receiver node only if AP isolation is enabled. In this way, if AP isolation
is not ON packets are not altered at all neither on the sender nor on the
receiver.
- the patchset has been rebased on top of current master (dependency from the
patch altering the table headers has been removed)
Description:
=========================
This feature is an extension of the already existing "AP isolation" which aims
to generalise the latter.
The idea is based on considering a particular subset of non-mesh clients as
"ISOLATED" and then apply the same policy that batman-adv already applies for
WiFi clients.
To decide which client belongs to this subset batman-adv uses the skb->mark
field which value can be altered by several components in the kernel (e.g.
netfilter). When an skb hits the soft-interface (e.g. bat0) the skb->mark
is compared to a preconfigured value and the source client is classified as
"ISOLATED" only in case of match.
The pre-configured mark (and its mask) is a user choice and can be set through
a new sysfs interface that is added within this patchset.
"ISOLATED" clients won't be able to talk to each other (batman-adv will drop
any packet originated by an isolated client and directed to another isolated
client) like it now happens for WiFi ones (when AP isolation is on).
Moreover broadcast packets sent by ISOLATED clients are marked on the
receiving node with the same mark that the user configured through the sysfs.
In this way netfilter (or any other program) can make decisions about
these packets on the receiver side (e.g. a rule could be "broadcast packets
created by ISOLATED clients cannot be forwarded over any port of the bridge X")
A draft of the documentation (with an example of how to use tc to mark/filter
packets) is available here[1] and will be improved as soon as the feature is
released.
Cheers,
[1] http://www.open-mesh.org/projects/batman-adv/wiki/Extended-isolation
Antonio Quartulli (6):
batman-adv: add isolation_mark sysfs attribute
batman-adv: mark a local client as isolated when needed
batman-adv: print the new BATADV_TT_CLIENT_ISOLA flag
batman-adv: extend the ap_isolation mechanism
batman-adv: create helper function to get AP isolation status
batman-adv: set the isolation mark in the skb if needed
main.c | 26 ++++++++++++++++++++
main.h | 3 +++
packet.h | 1 +
soft-interface.c | 27 +++++++++++++++++----
sysfs.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++
translation-table.c | 70 ++++++++++++++++++++++++++++++++++++++++-------------
translation-table.h | 4 ++-
types.h | 2 ++
8 files changed, 178 insertions(+), 23 deletions(-)
--
1.8.4.3
Hi,
in our Freifunk network we are experiencing some kind of strange behaviour if
two routers can see each other by wire and wireless at the same time. Then the
link quality in the originator table drops from normally >250 to somewhat
around 130 or less on both interfaces.
Because we have no idea why this happens but think this is kind of unwanted
behaviour I´m asking here if we did something wrong or if we missed some
configuration in this case.
We are using B.A.T.M.A.N. adv 2013.4.0.
Kind Regards
Clemens John
--
#Clemens John <clemens-john(a)gmx.de>
#GnuPG:
Identifier: 0xD92F6BA5
Fingerprint: 1D6D 3EC6 C80F C1D4 CE1F 1133 6607 476C 0DB6 96A3