Re: [B.A.T.M.A.N.] [PATCHv2 2/7] batman-adv: speed up dat by snooping received ip traffic

2016-02-26 Thread Sven Eckelmann
On Friday 26 February 2016 14:18:17 Andreas Pape wrote: > + if (vhdr->h_vlan_encapsulated_proto == ETH_P_IP) { Either you htons the ETH_P_IP or you have to ntohs the vhdr->h_vlan_encapsulated_proto. But one of them has to converted to the byte order of the other one. Kind

Re: [B.A.T.M.A.N.] [PATCHv2 2/7] batman-adv: speed up dat by snooping received ip traffic

2016-02-26 Thread Sven Eckelmann
On Friday 26 February 2016 14:18:17 Andreas Pape wrote: > + iphdr = (struct iphdr *)(vhdr + > + sizeof(struct vlan_ethhdr)); Forgot this one: sizeof(*vhdr) == 18. So you basically calculated (u8 *)vhdr + 18 * 18 But I

[B.A.T.M.A.N.] [PATCH] batman-adv: Check skb size before using encapsulated ETH+VLAN header

2016-02-26 Thread Sven Eckelmann
The encapsulated ethernet and VLAN header may be outside the received ethernet frame. Thus the skb buffer size has to be checked before it can be parsed to find out if it encapsulates another batman-adv packet. Fixes: 48628bb9419f ("batman-adv: softif bridge loop avoidance") Signed-off-by: Sven

Re: [B.A.T.M.A.N.] [Patchv2 0/7] batman-adv: Optimizations for setups running dat and bla

2016-02-26 Thread Sven Eckelmann
On Friday 26 February 2016 14:16:38 Andreas Pape wrote: > This patchset introduces optimizations for batman-adv in setups having > several gateways into a common (switched) Ethernet backbone network > especially if dat is additionally enabled. [...] See my other comments directly to the patches.

Re: [B.A.T.M.A.N.] [PATCHv2 6/7] batman-adv: bugfix for dat optimiziation patch

2016-02-26 Thread Sven Eckelmann
On Friday 26 February 2016 14:19:28 Andreas Pape wrote: > Make sure that claiming of devices due to dat handling is only done > for non-local mac addresses. As dat is handled after the normal bla > code this does not break the roaming client scenario for bla. > > Signed-off-by: Andreas Pape

Re: [B.A.T.M.A.N.] [PATCHv2 4/7] batman-adv: drop unicast packets from other backbone gw

2016-02-26 Thread Sven Eckelmann
On Friday 26 February 2016 14:18:54 Andreas Pape wrote: > @@ -896,6 +898,19 @@ int batadv_recv_unicast_packet(struct sk_buff *skb, > } > } > > + /* If this is a unicast packet from another backgone gw, > + * drop it. > + */

Re: [B.A.T.M.A.N.] [PATCHv2 3/7] batman-adv: prevent duplication of ARP replies when DAT is used

2016-02-26 Thread Sven Eckelmann
On Friday 26 February 2016 14:18:39 Andreas Pape wrote: > dat_entry = batadv_dat_entry_hash_find(bat_priv, ip_dst, vid); > - if (!dat_entry) > + if (!dat_entry) { > + /* Check if this is a 4addr unicast DAT_DHT_GET frame from > + * another backbone gw of the

Re: [B.A.T.M.A.N.] [PATCHv2 2/7] batman-adv: speed up dat by snooping received ip traffic

2016-02-26 Thread Sven Eckelmann
On Friday 26 February 2016 14:18:17 Andreas Pape wrote: > Speeding up dat address lookup is achieved by snooping all incoming ip > traffic. This especially increases the propability in bla setups that > a gateway into a common backbone network already has a fitting dat entry > to answer incoming

[B.A.T.M.A.N.] [PATCHv2 7/7] batman-adv: handle race condition for claims between gateways

2016-02-26 Thread Andreas Pape
Consider the following situation which has been found in a test setup: Gateway B has claimed client C and gateway A has the same backbone network as B. C sends a broad- or multicast to B and directly after this packet decides to send another packet to A due to a better TQ value. B will forward the

[B.A.T.M.A.N.] [PATCHv2 6/7] batman-adv: bugfix for dat optimiziation patch

2016-02-26 Thread Andreas Pape
Make sure that claiming of devices due to dat handling is only done for non-local mac addresses. As dat is handled after the normal bla code this does not break the roaming client scenario for bla. Signed-off-by: Andreas Pape --- net/batman-adv/bridge_loop_avoidance.c

[B.A.T.M.A.N.] [PATCHv2 5/7] batman-adv: changed debug messages for easier bla debugging

2016-02-26 Thread Andreas Pape
Some of the bla debug messages are extended and additional messages are added for easier bla debugging. Some debug messages introduced with the dat changes in prior patches of this patch series have been changed to be more compliant to other existing debug messages. Signed-off-by: Andreas Pape

[B.A.T.M.A.N.] [PATCHv2 2/7] batman-adv: speed up dat by snooping received ip traffic

2016-02-26 Thread Andreas Pape
Speeding up dat address lookup is achieved by snooping all incoming ip traffic. This especially increases the propability in bla setups that a gateway into a common backbone network already has a fitting dat entry to answer incoming ARP requests directly coming from the backbone network thus

[B.A.T.M.A.N.] [PATCHv2 4/7] batman-adv: drop unicast packets from other backbone gw

2016-02-26 Thread Andreas Pape
Additional dropping of unicast packets received from another backbone gw of the same backbone network before being forwarded to the same backbone again is necessary. It was observed in a test setup that in rare cases these frames lead to looping unicast traffic backbone->mesh->backbone.

[B.A.T.M.A.N.] [PATCHv2 3/7] batman-adv: prevent duplication of ARP replies when DAT is used

2016-02-26 Thread Andreas Pape
If none of the backbone gateways in a bla setup has already knowledge of the mac address searched for in an incoming ARP request from the backbone it must be prevented that multiple ARP replies are generated and returned to the backbone by the dat address resolution mechanism of other dat enabled

[B.A.T.M.A.N.] [PATCHv2 1/7] batman-adv: prevent multiple ARP replies sent by gateways if dat enabled

2016-02-26 Thread Andreas Pape
If dat is enabled it must be made sure that only the backbone gw which has claimed the remote destination for the ARP request answers the ARP request directly if the MAC address is known due to the local dat table. This prevents multiple ARP replies in a common backbone if more than one gateway

[B.A.T.M.A.N.] [Patchv2 0/7] batman-adv: Optimizations for setups running dat and bla

2016-02-26 Thread Andreas Pape
This patchset introduces optimizations for batman-adv in setups having several gateways into a common (switched) Ethernet backbone network especially if dat is additionally enabled. Using the current implementation with bla and dat enabled, several problems can be observed in a real setup: 1.

Re: [B.A.T.M.A.N.] [RFC 0/5] batman-adv: Throughput meter

2016-02-26 Thread Edo Monticelli
Hi Sven, thanks for your email and sorry for the late reply. I shifted my interests and I am currently working as front-end developer, I am afraid that my C skills could be a bit rusty :) In addition so much is going on both on the professional and personal life that I am afraid at least for the