Re: [B.A.T.M.A.N.] [PATCHv2 2/6] batman-adv: add build check macros for packet member offset

2013-04-20 Thread Marek Lindner
On Saturday, April 20, 2013 03:52:25 Simon Wunderlich wrote: Since we removed the __packed from most of the packets, we should make sure that the offset generated by the compile are correct for sent/received data. Small typo: by the compileR Cheers, Marek

Re: [B.A.T.M.A.N.] [PATCHv2 3/6] batman-adv: reorder packet types

2013-04-20 Thread Marek Lindner
On Saturday, April 20, 2013 03:52:26 Simon Wunderlich wrote: @@ -892,6 +892,25 @@ static int batadv_check_unicast_ttvn(struct batadv_priv *bat_priv, return 1; } +int batadv_recv_unhandled_unicast_packet(struct sk_buff *skb, +struct batadv_hard_iface

Re: [B.A.T.M.A.N.] [PATCHv2 4/6] batman-adv: remove packed from batadv_ogm_packet

2013-04-20 Thread Marek Lindner
On Saturday, April 20, 2013 03:52:27 Simon Wunderlich wrote: As we decreased the struct size from 26 to 24 byte, we can remove __packed as the compile will not add any more padding. Same typo as before: compileR Cheers, Marek

Re: [B.A.T.M.A.N.] [PATCHv2 5/6] batman-adv: reorder batadv_iv_flags

2013-04-20 Thread Marek Lindner
On Saturday, April 20, 2013 03:52:28 Simon Wunderlich wrote: @@ -70,10 +70,9 @@ enum batadv_subtype { #define BATADV_COMPAT_VERSION 14 enum batadv_iv_flags { - BATADV_NOT_BEST_NEXT_HOP = BIT(3), - BATADV_PRIMARIES_FIRST_HOP = BIT(4), - BATADV_VIS_SERVER =

[B.A.T.M.A.N.] [PATCHv3 4/6] batman-adv: remove packed from batadv_ogm_packet

2013-04-20 Thread Simon Wunderlich
As we decreased the struct size from 26 to 24 byte, we can remove __packed as the compiler will not add any more padding. Signed-off-by: Simon Wunderlich s...@hrz.tu-chemnitz.de --- packet.h |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packet.h b/packet.h index

[B.A.T.M.A.N.] [PATCHv3 2/6] batman-adv: add build check macros for packet member offset

2013-04-20 Thread Simon Wunderlich
Since we removed the __packed from most of the packets, we should make sure that the offset generated by the compiler are correct for sent/received data. Signed-off-by: Simon Wunderlich s...@hrz.tu-chemnitz.de --- main.c |8 1 file changed, 8 insertions(+) diff --git a/main.c

[B.A.T.M.A.N.] [PATCHv3 5/6] batman-adv: reorder batadv_iv_flags

2013-04-20 Thread Simon Wunderlich
The vis flag is not needed anymore, and since we do a compat bump we can start with the first bit again Signed-off-by: Simon Wunderlich s...@hrz.tu-chemnitz.de --- packet.h | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/packet.h b/packet.h index

[B.A.T.M.A.N.] [PATCHv3 3/6] batman-adv: reorder packet types

2013-04-20 Thread Simon Wunderlich
Reordering the packet type numbers allows us to handle unicast packets in a general way - even if we don't know the specific packet type, we can still forward it. There was already code handling this for a couple of unicast packets, and this is the more generalized version to do that.

[B.A.T.M.A.N.] [PATCHv3 6/6] batman-adv: only add recordroute information to icmp request/reply

2013-04-20 Thread Simon Wunderlich
Adding host information for record route is only required for ICMP requests and replys, and should not be added to just any (future?) packet type. Signed-off-by: Simon Wunderlich s...@hrz.tu-chemnitz.de --- routing.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[B.A.T.M.A.N.] [PATCHv3 0/6] compat bum work

2013-04-20 Thread Simon Wunderlich
Changes to v2: * add some kernel doc * fix typos in commit messages Simon Wunderlich (6): batman-adv: remove vis functionality batman-adv: add build check macros for packet member offset batman-adv: reorder packet types batman-adv: remove packed from batadv_ogm_packet batman-adv:

[B.A.T.M.A.N.] [PATCHv3 1/6] batman-adv: remove vis functionality

2013-04-20 Thread Simon Wunderlich
This is replaced by a userspace program, we don't need this functionality to bloat the kernel. Signed-off-by: Simon Wunderlich s...@hrz.tu-chemnitz.de --- Makefile.kbuild |1 - bat_iv_ogm.c |7 - debugfs.c|9 - hard-interface.c |9 - main.c | 11 -

[B.A.T.M.A.N.] [PATCHv5] batman-adv: Move call to batadv_nc_skb_forward() from routing.c to send.c

2013-04-20 Thread Martin Hundebøll
The call to batadv_nc_skb_forward() fits better in batadv_send_skb_to_orig(), as this is where the actual next hop is looked up. To let the caller of batadv_send_skb_to_orig() know wether the skb is transmitted, buffered or failed, the return value is changed from boolean to int. Signed-off-by:

Re: [B.A.T.M.A.N.] [RFCv3] batman-adv: Modified DAT structures and functions in order to support both IPv4 and IPv6

2013-04-20 Thread Antonio Quartulli
On Fri, Apr 19, 2013 at 09:39:17 +0300, Mihail Costea wrote: On 19 April 2013 15:38, Antonio Quartulli or...@autistici.org wrote: I think this define is pretty overkill..What about creating a function which only takes care of converting a generic DHT data in a string. Later you can invoke

[B.A.T.M.A.N.] [PATCH] batman-adv: switch to a new packet compatibility version

2013-04-20 Thread Antonio Quartulli
With this change batman-adv is breaking compatibility with older versions and it is moving to compat-version 15. Signed-off-by: Simon Wunderlich s...@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Martin Hundebøll mar...@hundeboll.net Signed-off-by: Antonio

Re: [B.A.T.M.A.N.] [PATCHv4] batman-adv: Move call to batadv_nc_skb_forward() from routing.c to send.c

2013-04-20 Thread Martin Hundebøll
On 2013-04-19 14:16, Martin Hundebøll wrote: The call to batadv_nc_skb_forward() fits better in batadv_send_skb_to_orig(), as this is where the actual next hop is looked up. Signed-off-by: Martin Hundebøll mar...@hundeboll.net --- v2: I should make random defines lowercase :) v3: Do git add

Re: [B.A.T.M.A.N.] [PATCHv5] batman-adv: Move call to batadv_nc_skb_forward() from routing.c to send.c

2013-04-20 Thread Marek Lindner
On Saturday, April 20, 2013 19:54:39 Martin Hundebøll wrote: The call to batadv_nc_skb_forward() fits better in batadv_send_skb_to_orig(), as this is where the actual next hop is looked up. To let the caller of batadv_send_skb_to_orig() know wether the skb is transmitted, buffered or

Re: [B.A.T.M.A.N.] [PATCH maint] batman-adv: use the proper header len when checking the TTVN

2013-04-20 Thread Marek Lindner
On Wednesday, April 03, 2013 16:14:20 Antonio Quartulli wrote: From: Antonio Quartulli anto...@open-mesh.com Unicast packet might be of type either UNICAST or UNICAST4ADDR. In the two cases the header size is different, but the mechanism checking the TTVN field was assuming it to be always

[B.A.T.M.A.N.] [PATCH 0/3] Fragmentation version 2

2013-04-20 Thread Martin Hundebøll
These are a few patches to remove the current fragmentation code and replace it with a new version that supports more packet types and more fragments per packet, thus allowing bigger payloads. The patches are based on simon bigbump repo and are meant for the next big bump in compat number.

[B.A.T.M.A.N.] [PATCH 3/3] batman-adv: Fragment and send skbs larger than mtu

2013-04-20 Thread Martin Hundebøll
Non-broadcast packets larger than MTU are fragmented and sent with an encapsulating header. Up to 16 fragments are supported, which are sent in reverse order on the wire. Signed-off-by: Martin Hundebøll mar...@hundeboll.net --- fragmentation.c | 121

[B.A.T.M.A.N.] [PATCH 2/3] batman-adv: Receive fragmented packets and merge

2013-04-20 Thread Martin Hundebøll
Fragments arriving at their destination are buffered for later merge. Merged packets are passed to the main receive function as had they never been fragmented. Fragments are forwarded without merging if the MTU of the outgoing interface is smaller than the size of the merged packet.

Re: [B.A.T.M.A.N.] [RFCv3] batman-adv: Modified DAT structures and functions in order to support both IPv4 and IPv6

2013-04-20 Thread Mihail Costea
On 20 April 2013 16:56, Antonio Quartulli or...@autistici.org wrote: On Fri, Apr 19, 2013 at 09:39:17 +0300, Mihail Costea wrote: On 19 April 2013 15:38, Antonio Quartulli or...@autistici.org wrote: I think this define is pretty overkill..What about creating a function which only takes