From 953324776d6d23eb81f5b825870027b9c069db29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= Date: Fri, 25 Jan 2013 11:12:40 +0100 Subject: batman-adv: network coding - buffer unicast packets before forward MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two be able to network code two packets, one packet must be buffered until the next is available. This is done in a "coding buffer", which is essentially a hash table with lists of packets. Each entry in the hash table corresponds to a specific src-dst pair, which has a linked list of packets that are buffered. This patch adds skbs to the buffer just before forwarding them. The buffer is traversed every 10 ms, where timed skbs are removed from the buffer and transmitted. To allow experiments with the network coding scheme, the timeout is tunable through a file in debugfs. Signed-off-by: Martin Hundebøll Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/network-coding.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'net/batman-adv/network-coding.h') diff --git a/net/batman-adv/network-coding.h b/net/batman-adv/network-coding.h index 4c56cd98d9de..c32602a3939a 100644 --- a/net/batman-adv/network-coding.h +++ b/net/batman-adv/network-coding.h @@ -35,6 +35,9 @@ void batadv_nc_purge_orig(struct batadv_priv *bat_priv, struct batadv_nc_node *)); void batadv_nc_init_bat_priv(struct batadv_priv *bat_priv); void batadv_nc_init_orig(struct batadv_orig_node *orig_node); +bool batadv_nc_skb_forward(struct sk_buff *skb, + struct batadv_neigh_node *neigh_node, + struct ethhdr *ethhdr); int batadv_nc_nodes_seq_print_text(struct seq_file *seq, void *offset); int batadv_nc_init_debugfs(struct batadv_priv *bat_priv); @@ -79,6 +82,13 @@ static inline void batadv_nc_init_orig(struct batadv_orig_node *orig_node) return; } +static inline bool batadv_nc_skb_forward(struct sk_buff *skb, + struct batadv_neigh_node *neigh_node, + struct ethhdr *ethhdr) +{ + return false; +} + static inline int batadv_nc_nodes_seq_print_text(struct seq_file *seq, void *offset) { -- cgit v1.2.2