From: Marek Lindner Date: Sat, 4 Sep 2010 23:58:27 +0000 (+0200) Subject: Staging: batman-adv: register the batman-adv packet type per interface X-Git-Tag: v2.6.37-rc1~60^2~3^2~696 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15cf5523d2e42f755b3b1d8ea0fa601ffcf8b9e7;p=pandora-kernel.git 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 [sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed