On Mon, Nov 19, 2012 at 02:22:00PM +0100, Martin Hundebøll wrote: [...]
diff --git a/network-coding.c b/network-coding.c index 8d930e7..29f7744 100644 --- a/network-coding.c +++ b/network-coding.c @@ -17,8 +17,12 @@
- 02110-1301, USA
*/
+#include <linux/debugfs.h>
Ok, I don't want to make you feel a cavy :) but it is better to correct this stuff when we can: kernel-includes (<..h>) should follow project-includes ("..h")
#include "main.h" #include "network-coding.h" +#include "originator.h" +#include "hard-interface.h"
/** @@ -68,11 +218,197 @@ static void batadv_nc_worker(struct work_struct *work) priv_nc = container_of(delayed_work, struct batadv_priv_nc, work); bat_priv = container_of(priv_nc, struct batadv_priv, nc);
- batadv_nc_purge_orig_hash(bat_priv);
ah, now this function makes sense (with respect to what I said in reply to 1/6). Would it be better to add the worker here instead of adding it in 1/6?
/* Schedule a new check */ batadv_nc_start_timer(bat_priv); }
[...]
@@ -268,9 +274,12 @@ struct batadv_priv_dat { /**
- struct batadv_priv_nc - per mesh interface network coding private data
- @work: work queue callback item for cleanup
*/
- @min_tq: only consider neighbors for encoding if neigh_tq > min_tq
struct batadv_priv_nc { struct delayed_work work;
- struct dentry *debug_dir;
- u8 min_tq;
If I am not mistaken min_tq is never modified. Why do we need to store it in a bat_priv field? And being a constant is it worth a define? In this way it an be easily found and tuned like the other constant params.
Cheers,