Three new features have been added:
1) generic uevent support
2) uevent triggering for gw state changes
3) gw propagation for clients
Patch summary:
- 1/3: a wrapper function that permits to trigger uevents has been added.
The function takes a "type", an "action" and a "data" as parameters which
will be used as uevent attributes. In particular they will respectively be
BATTYPE, BATACTION and BATDATA in the uevent environment.
The "type" and the "action" field are managed using two enum definitions and
two char arrais. Currently the supported "type" is 'gw' only and the supported
"actions" are 'add', 'change' and 'del'. The "data" parameter is a free field
which can be filled by the programmer to send any useful data to the userspace.
Uevents can be seen in userspace with the following command:
"$ udevadm monitor --property"
- 2/3: on a gateway add/change/del event a corresponding uevent of type 'gw' is
triggered. In particular, in case of setting up a gw for the first time a
uevent with action 'add' is triggered. In case of changing the best gateway a
uevent with action 'change' is triggered. In case of deselection of any gateway
a uevent with action DEL is triggered.
- 3/3: a gw propagation feature for clients has been provided. The main target
of this patch is to make clients able to change L3 gateway as soon as the mesh
node currently serving them changes its default one at the batman layer.
For this target a passive approach has been followed: whenever a unicast
DHCPREQUEST for renewal is sent from a client, the node will inspect it and
check if it is directed to the current default gateway or not. If it is not
the case then the packet is dropped. In this way the client will get a
timeout and a new DHCPREQUEST for discover will be sent giving the possibility
to the node to select the best gw to forward this packet to (current gw
selection mode).
Hi,
I would like to propose following patches for net-next-2.6/3.1 [1]. It
is not really based on your net-next-2.6 tree, but directly on v3.0-rc1.
I hope that this is ok - thought that you will merge that version
anyway. Just wanted to get these patches out before doing the really
work (reducing the amount of patches you get in a single pull request).
Most patches are only cleanup patches - nothing really interesting.
Antonio also moved the protocol specific seq_before/seq_after function
to main.h like you told us [2]. Now he can use it in his translation
table query patches (they are still moving, so he needs to hunt them
down before I can submit them).
thanks,
Sven
[1] wow, that sounds creepy
[2] https://lkml.org/lkml/2011/5/19/88
The following changes since commit 55922c9d1b84b89cb946c777fddccb3247e7df2c:
Linux 3.0-rc1 (2011-05-29 17:43:36 -0700)
are available in the git repository at:
git://git.open-mesh.org/ecsv/linux-merge.git batman-adv/next
Antonio Quartulli (4):
batman-adv: move neigh_node->if_incoming->if_status check in find_router()
batman-adv: move smallest_signed_int(), seq_before() and seq_after() into main.h
batman-adv: use is_broadcast_ether_addr() instead of compare_eth(.., brd_addr)
batman-adv: a multiline comment should precede the variable it is describing
Sven Eckelmann (13):
batman-adv: Use kzalloc rather than kmalloc followed by memset with 0
batman-adv: Annotate functions with format strings
batman-adv: Print jiffies as unsigned long
batman-adv: Remove comparising < 0 for unsigned type
batman-adv: Don't do pointer arithmetic with void*
batman-adv: Add const type qualifier for pointers
batman-adv: Only use int up and down gw representation
batman-adv: Remove explicit casts cast from void* for store
batman-adv: Remove casts from type x to type x
batman-adv: Calculate sizeof using variable insead of types
batman-adv: Use rcu_dereference_protected by update-side
batman-adv: Check type of x and y in seq_(before|after)
batman-adv: Ensure that we really have route changes in update_route
net/batman-adv/aggregation.c | 23 +++++----
net/batman-adv/aggregation.h | 5 +-
net/batman-adv/bat_debugfs.c | 11 ++--
net/batman-adv/bat_sysfs.c | 15 +++---
net/batman-adv/bitarray.c | 6 +-
net/batman-adv/bitarray.h | 6 +-
net/batman-adv/gateway_client.c | 19 ++++----
net/batman-adv/gateway_common.c | 19 ++++----
net/batman-adv/hard-interface.c | 25 +++++-----
net/batman-adv/hard-interface.h | 6 ++-
net/batman-adv/hash.c | 7 ++-
net/batman-adv/hash.h | 6 +-
net/batman-adv/icmp_socket.c | 4 +-
net/batman-adv/main.c | 4 +-
net/batman-adv/main.h | 30 ++++++++++--
net/batman-adv/originator.c | 12 ++--
net/batman-adv/originator.h | 14 +++---
net/batman-adv/ring_buffer.c | 4 +-
net/batman-adv/ring_buffer.h | 2 +-
net/batman-adv/routing.c | 54 +++++++++++-----------
net/batman-adv/routing.h | 12 ++--
net/batman-adv/send.c | 44 +++++++++---------
net/batman-adv/send.h | 12 ++--
net/batman-adv/soft-interface.c | 22 ++++-----
net/batman-adv/soft-interface.h | 4 +-
net/batman-adv/translation-table.c | 44 +++++++++--------
net/batman-adv/translation-table.h | 13 +++--
net/batman-adv/types.h | 8 ++--
net/batman-adv/unicast.c | 30 +++++-------
net/batman-adv/unicast.h | 8 ++--
net/batman-adv/vis.c | 91 +++++++++++++++---------------------
31 files changed, 284 insertions(+), 276 deletions(-)
This patchset wants to introduce a new client announcement mechanism (previously
called HNA) which totally revises the old one.
B.A.T.M.A.N.-advanced manages clients by the means of two translation tables:
a local table and a global table. The first one stores all the clients directly
connected to the node itself while the second one stores all the clients which
are announced by other nodes in the mesh network.
In the current implementation the whole local table is sent within each OGM
causing a big protocol overhead.
The core of the new implementation, instead, consists in avoiding this part
and replace this procedure by sending only the local table _changes_ which
happened in the last OGM interval. In this way, every node will update its
global table applying the changes it finds in the OGM.
A roaming improvement is also provided exploiting the newly implemented
announcement mechanism.
Moreover the global and local translation table are now lock free and rcu
protected :-)
Patchset description:
1) Rename all the variables/functions/constants from *hna* to *tt*
2) Implement the new announcement mechanism
3) Implement the roaming optimisation
4) Protect by RCU the local and global table
** Patch 2/4 also introduces a dependency on the crc16 module since the new
mechanism uses the crc16 computation function provided by this module. **
For more details, please refer to the commit message of each patch.
Regards,
Antonio Quartulli
Move the ttl field to the third position of unicast_packet and
unicast_frag_packet. In this way it possible to give them a better shape for
later usage
Signed-off-by: Antonio Quartulli <ordex(a)autistici.org>
---
packet.h | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/packet.h b/packet.h
index eda9965..e464ceb 100644
--- a/packet.h
+++ b/packet.h
@@ -32,7 +32,7 @@
#define BAT_UNICAST_FRAG 0x06
/* this file is included by batctl which needs these defines */
-#define COMPAT_VERSION 12
+#define COMPAT_VERSION 14
#define DIRECTLINK 0x40
#define VIS_SERVER 0x20
#define PRIMARIES_FIRST_HOP 0x10
@@ -99,16 +99,19 @@ struct icmp_packet_rr {
struct unicast_packet {
uint8_t packet_type;
uint8_t version; /* batman version field */
- uint8_t dest[6];
uint8_t ttl;
+ uint8_t align;
+ uint8_t dest[6];
} __packed;
struct unicast_frag_packet {
uint8_t packet_type;
uint8_t version; /* batman version field */
- uint8_t dest[6];
uint8_t ttl;
+ uint8_t align;
+ uint8_t dest[6];
uint8_t flags;
+ uint8_t align;
uint8_t orig[6];
uint16_t seqno;
} __packed;
--
1.7.3.4