OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 0/5] Diet struct net_device a bit
Re: [PATCH 1/5] Cut off br_port fied from net_device [message #22149 is a reply to message #22144] Mon, 22 October 2007 12:49 Go to previous messageGo to previous message
Alexey Dobriyan is currently offline  Alexey Dobriyan
Messages: 195
Registered: August 2006
Senior Member
On Mon, Oct 22, 2007 at 04:33:33PM +0400, Pavel Emelyanov wrote:
> And add the forward declaration for br_handle_frame_hook in
> include/linux/if_bridge.h

> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -699,8 +699,10 @@ struct net_device
>  	/* Network namespace this network device is inside */
>  	struct net		*nd_net;
>  
> +#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
>  	/* bridge stuff */
>  	struct net_bridge_port	*br_port;
> +#endif

Such ifdefs are troublesome, because one can compile kernel with
CONFIG_BRIDGE=n and later decide he needs BRIDGE=m and go boom.

IPv6 -- the biggest violator of this rule should not be taken as
example. :^)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH] nf_sockopts list head cleanup
Next Topic: Re: LSM and Containers (was: LSM conversion to static interface)
Goto Forum:
  


Current Time: Mon Oct 27 19:27:32 GMT 2025

Total time taken to generate the page: 0.25781 seconds