This patch fixes the following compile error with CONFIG_BRIDGE=y and CONFIG_ATM_LANE=m: <-- snip --> ... LD .tmp_vmlinux1 net/built-in.o(.init.text+0x3ad1): In function `br_init': : undefined reference to `br_fdb_get_hook' net/built-in.o(.init.text+0x3adb): In function `br_init': : undefined reference to `br_fdb_put_hook' net/built-in.o(.exit.text+0xa2): In function `br_deinit': : undefined reference to `br_fdb_get_hook' net/built-in.o(.exit.text+0xac): In function `br_deinit': : undefined reference to `br_fdb_put_hook' make: *** [.tmp_vmlinux1] Error 1 <-- snip --> Signed-off-by: Adrian Bunk <bunk@stusta.de> --- net/bridge/br.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) --- linux-2.6.11-mm3-modular/net/bridge/br.c.old 2005-03-15 03:23:10.000000000 +0100 +++ linux-2.6.11-mm3-modular/net/bridge/br.c 2005-03-15 03:24:05.000000000 +0100 @@ -22,7 +22,7 @@ #include "br_private.h" -#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE) +#if defined(CONFIG_ATM_LANE) || (defined(CONFIG_ATM_LANE_MODULE) && defined(MODULE)) #include "../atm/lec.h" #endif @@ -39,7 +39,7 @@ brioctl_set(br_ioctl_deviceless_stub); br_handle_frame_hook = br_handle_frame; -#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE) +#if defined(CONFIG_ATM_LANE) || (defined(CONFIG_ATM_LANE_MODULE) && defined(MODULE)) br_fdb_get_hook = br_fdb_get; br_fdb_put_hook = br_fdb_put; #endif @@ -60,7 +60,7 @@ synchronize_net(); -#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE) +#if defined(CONFIG_ATM_LANE) || (defined(CONFIG_ATM_LANE_MODULE) && defined(MODULE)) br_fdb_get_hook = NULL; br_fdb_put_hook = NULL; #endif
Stephen Hemminger
2007-Apr-18 17:22 UTC
[Bridge] Re: [2.6 patch] fix bridge <-> ATM compile error
Given the #ifdef mess, perhaps bridge should have the hooks available independent of the configuration.
Adrian Bunk
2007-Apr-18 17:22 UTC
[Bridge] Re: [2.6 patch] fix bridge <-> ATM compile error
On Wed, Mar 16, 2005 at 11:11:29AM -0500, chas williams - CONTRACTOR wrote:> In message <20050315121930.GE3189@stusta.de>,Adrian Bunk writes: > >This patch fixes the following compile error with CONFIG_BRIDGE=y and > >CONFIG_ATM_LANE=m: > > isnt the problem more that CONFIG_ATM=m not CONFIG_ATM_LANE=m? > perhaps CONFIG_BRIDGE should be dependent on CONFIG_ATM. if > atm is a module then bridge cannot be a module (unless the > hooks are moved from atm to bridge)?The problem is currently CONFIG_ATM_LANE due to the #ifdef's in net/atm/common.c . Letting CONFIG_BRIDGE depend on CONFIG_ATM doesn't sound like a good idea, since I doubt all people using the Bridge code require ATM support. Moving the hooks to the bridge code will give you exactly the same problems the other way round. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed
chas williams - CONTRACTOR
2007-Apr-18 17:22 UTC
[Bridge] Re: [2.6 patch] fix bridge <-> ATM compile error
In message <20050315121930.GE3189@stusta.de>,Adrian Bunk writes:>This patch fixes the following compile error with CONFIG_BRIDGE=y and >CONFIG_ATM_LANE=m:isnt the problem more that CONFIG_ATM=m not CONFIG_ATM_LANE=m? perhaps CONFIG_BRIDGE should be dependent on CONFIG_ATM. if atm is a module then bridge cannot be a module (unless the hooks are moved from atm to bridge)?
Reasonably Related Threads
- [Bridge] [RFC PATCH 0/2] Allow full bridge configuration via sysfs
- bridge: flush br's address entry in fdb when remove the bridge dev
- [PATCH][BRIDGE] br.c depends on CONFIG_BRIDGE_NETFILTER, not CONFIG_NETFILTER
- [Bridge] [PATCH 2.4] bridge - eliminate br_ioctl_mutex
- [PATCH net] bridge: flush br's address entry in fdb when remove the bridge dev