Staging: batman-adv: bonding and interface alternating
PATCH 1/1 Staging: batman-adv: bonding and interface alternating
This patch adds interface alternating to the new bonding feature.
Instead of only sending in a round robin fashion on the usable interfaces, we can also attempt to use a different interface for sending than for receiving (interface alternating). This should reduce problems of the half-duplex nature of WiFi Hardware and thus increase performance. The bonding modes are now enhanced from two modes (disabled/enabled) to the following 4 modes:
* 0 - bonding off
* 1 - round robin (as before)
* 2 - interface alternating
* 3 - smart bonding (round robin + interface alternating)
This is an experimental patch and targeted for upcoming experiments at Wireless Battle Mesh v3 in Bracciano/Italy.
Feedback, comments and reviews appreciated!
---
batman-adv-kernelland/types.h +1 -1
@@ -119,7 +119,7 @@struct bat_priv {struct net_device_stats stats;atomic_t aggregation_enabled; -atomic_t bonding_enabled; +atomic_t bonding_mode;atomic_t vis_mode;atomic_t gw_mode;atomic_t gw_class;
batman-adv-kernelland/soft-interface.c +1 -1
@@ -250,7 +250,7 @@if (!orig_node) orig_node =transtable_search (ethhdr->h_dest); - router =find_router (orig_node); + router =find_router (orig_node,NULL );if (!router) goto unlock;
batman-adv-kernelland/hard-interface.c +1 -1
@@ -514,7 +514,7 @@/* unicast packet */ case BAT_UNICAST : - ret =recv_unicast_packet (skb); + ret =recv_unicast_packet (skb, batman_if);break ;/* broadcast packet */
batman-adv-kernelland/routing.c +50 -16
126 lines not on this page · raw message
batman-adv-kernelland/main.h +4 -0
@@ -63,6 +63,10 @@* to be considered as bonding candidates */ #define BONDING_TQ_THRESHOLD 50 +#define BONDING_NONE 0 +#define BONDING_ROUNDROBIN 1 +#define BONDING_ALTERNATE 2 +#define BONDING_SMART 3#define MAX_AGGREGATION_BYTES 512/* should not be bigger than 512 bytes or * change the size of
batman-adv-kernelland/routing.h +3 -2
@@ -32,11 +32,12 @@struct neigh_node *neigh_node, unsigned char *hna_buff, int hna_buff_len);int recv_icmp_packet (struct sk_buff *skb); -int recv_unicast_packet (struct sk_buff *skb); +int recv_unicast_packet (struct sk_buff *skb,struct batman_if *recv_if);int recv_bcast_packet (struct sk_buff *skb);int recv_vis_packet (struct sk_buff *skb);int recv_bat_packet (struct sk_buff *skb,struct batman_if *batman_if); -struct neigh_node *find_router (struct orig_node *orig_node); +struct neigh_node *find_router (struct orig_node *orig_node, +struct batman_if *recv_if);void update_bonding_candidates (struct bat_priv *bat_priv,struct orig_node *orig_node);
batman-adv-kernelland/bat_sysfs.c +24 -19
74 lines not on this page · raw message
Only some non-technical comments about the patch for now:
I thought we decided that the "Staging: " part in the title will be appended when the stuff will be send to Greg and should be omitted inside our source trees. Also your patch wouldn't apply in linux-next because the bonding stuff is in master and not in maint (only maint will be send to the kernel folks).
Quoted 4 lines
This is an experimental patch and targeted for upcoming experiments at Wireless Battle Mesh v3 in Bracciano/Italy.
Feedback, comments and reviews appreciated!
That part is quite interesting for the mailinglist but should not be part of the commit message, or am I wrong? In that situation such information should be appended after the "---". git-am or similar tools should automatically ignore that parts, but the receiver can still read that comment.
batman-adv-kernelland/main.h line 67
Quoted 10 lines
Index:
a/batman-adv-kernelland/main.h
===================================================================batman-adv-kernelland/main.h +2
-0@@ -63,6 +63,10 @@* to be considered as bonding candidates */ #define BONDING_TQ_THRESHOLD 50 +#define BONDING_NONE 0 +#define BONDING_ROUNDROBIN 1
You've wrote something like "space""tab""1" here. Can you please remove the space before the tab.
Have you already painted some nice graphics or wrote some text to explain the modes further (yes, code is the best documentation, but a bad specification)?
The rest looks like it should be tested in italy :)
Best regards,
Sven
Hey,
i've checked in a changed and fixed up version of this patch in r1686.
This version has the interface alternating enabled by default, so we don't need to change the "bonding_enabled" to "bonding_mode" anymore. We have decided here in Bracciano to have alternating as default as it appears to be beneficial most of the times, but we couldn't really think of a scenario where this might be a problem.
I've also added some documentation at
http://www.open-mesh.net/wiki/bonding-alternating
and i'm looking for comments and proofreading and comments. ;)
I've also followed your other comments (hopefully correctly), so thank you very much for the review.
best regards
Simon
Quoted 38 lines · Sven Eckelmann
Only some non-technical comments about the patch for now:
I thought we decided that the "Staging: " part in the title will be appended when the stuff will be send to Greg and should be omitted inside our source trees. Also your patch wouldn't apply in linux-next because the bonding stuff is in master and not in maint (only maint will be send to the kernel folks).
Quoted 4 lines
This is an experimental patch and targeted for upcoming experiments at Wireless Battle Mesh v3 in Bracciano/Italy.
Feedback, comments and reviews appreciated!
That part is quite interesting for the mailinglist but should not be part of the commit message, or am I wrong? In that situation such information should be appended after the "---". git-am or similar tools should automatically ignore that parts, but the receiver can still read that comment.
batman-adv-kernelland/main.h line 67
Quoted 10 lines
Index:
a/batman-adv-kernelland/main.h
===================================================================batman-adv-kernelland/main.h +2
-0@@ -63,6 +63,10 @@* to be considered as bonding candidates */ #define BONDING_TQ_THRESHOLD 50 +#define BONDING_NONE 0 +#define BONDING_ROUNDROBIN 1You've wrote something like "space""tab""1" here. Can you please remove the space before the tab.
Have you already painted some nice graphics or wrote some text to explain the modes further (yes, code is the best documentation, but a bad specification)?
The rest looks like it should be tested in italy :)
Best regards,
Sven
Quoted 2 lines · Simon Wunderlich
I've also followed your other comments (hopefully correctly), so thank you very much for the review.
[...]
Quoted 10 lines
Quoted 10 lines
Quoted 4 lines
This is an experimental patch and targeted for upcoming experiments at Wireless Battle Mesh v3 in Bracciano/Italy.
Feedback, comments and reviews appreciated!
That part is quite interesting for the mailinglist but should not be part of the commit message, or am I wrong? In that situation such information should be appended after the "---". git-am or similar tools should automatically ignore that parts, but the receiver can still read that comment.
That "---" part was actually meant for the mail and not for the svn commit messages. It will not be stripped from commit messages by git-svn - so it remains in the git master branch. I have removed it manually from my rebase branch - please tell me if that wasn't what you wanted and I will re-add it.
I noticed the "The patch also includes a bug fix...". What exactly do you mean here? I would guess that it is only this part:
Review
Quoted 6 lines
(quoted diff) +6
-0+ /* we only care if the other candidate is even + * considered as candidate. */ + if (tmp_neigh_node2->next_bond_candidate == NULL) + continue; + +
But nice to see that the testing resulted in an even more compact patch which is better readable. :)
Best regards,
Sven
Hey Sven,
Quoted 15 lines · Sven Eckelmann
Quoted 2 lines · Simon Wunderlich
I've also followed your other comments (hopefully correctly), so thank you very much for the review.
[...]
Quoted 10 lines
Quoted 10 lines
Quoted 4 lines
This is an experimental patch and targeted for upcoming experiments at Wireless Battle Mesh v3 in Bracciano/Italy.
Feedback, comments and reviews appreciated!
That part is quite interesting for the mailinglist but should not be part of the commit message, or am I wrong? In that situation such information should be appended after the "---". git-am or similar tools should automatically ignore that parts, but the receiver can still read that comment.
Quoted 4 lines
That "---" part was actually meant for the mail and not for the svn commit messages. It will not be stripped from commit messages by git-svn - so it remains in the git master branch. I have removed it manually from my rebase branch - please tell me if that wasn't what you wanted and I will re-add it.
Oh, okay. We don't actually need it in the commit message, this was more an internal notice, so it is fine to keep it out.
Quoted 10 lines
I noticed the "The patch also includes a bug fix...". What exactly do you mean here? I would guess that it is only this part:
Review
Quoted 6 lines
(quoted diff) +6
-0+ /* we only care if the other candidate is even + * considered as candidate. */ + if (tmp_neigh_node2->next_bond_candidate == NULL) + continue; + +
Yep, that is the bug fix. ;)
Quoted 3 lines
But nice to see that the testing resulted in an even more compact patch which is better readable. :)
thank you. I'm also happier with this version. ;)
best regards,
Simon