diff options
author | Marek Lindner <lindner_marek@yahoo.de> | 2010-09-05 01:58:27 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-05 00:29:45 -0700 |
commit | 15cf5523d2e42f755b3b1d8ea0fa601ffcf8b9e7 (patch) | |
tree | 7ec59e81276bc8399e221186f7484da9ea26c932 /drivers/staging/batman-adv/types.h | |
parent | d52e90aeaf93d62cc1a7f9a8a9f3a6f68c475cf5 (diff) | |
download | op-kernel-dev-15cf5523d2e42f755b3b1d8ea0fa601ffcf8b9e7.zip op-kernel-dev-15cf5523d2e42f755b3b1d8ea0fa601ffcf8b9e7.tar.gz |
Staging: batman-adv: register the batman-adv packet type per interface
Batman-adv globally registered the batman-adv packet type and installed
a hook to batman_skb_recv(). Each interface receiving a packet with that
type would end up in this function which then had to loop through all
batman-adv internal interface structures to find the its meta data. The
more interfaces a system had the longer the loops might take. Each and
every packet goes through this function making it a performance critical
loop.
This patch installs the hook for each activated interface. The called
batman_skb_recv() can distinguish these calls, therefore avoiding the
loop through the interface structures.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/batman-adv/types.h')
-rw-r--r-- | drivers/staging/batman-adv/types.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/batman-adv/types.h b/drivers/staging/batman-adv/types.h index ac16575..2b06944 100644 --- a/drivers/staging/batman-adv/types.h +++ b/drivers/staging/batman-adv/types.h @@ -46,7 +46,7 @@ struct batman_if { int packet_len; struct kobject *hardif_obj; struct rcu_head rcu; - + struct packet_type batman_adv_ptype; }; /** |