netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bridge: make br_parse_ip_options  static
@ 2010-10-19  0:03 Stephen Hemminger
  2010-10-19 11:22 ` Bandan Das
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2010-10-19  0:03 UTC (permalink / raw)
  To: David Miller; +Cc: netdev


Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/net/bridge/br_netfilter.c	2010-10-18 17:01:36.903364885 -0700
+++ b/net/bridge/br_netfilter.c	2010-10-18 17:01:48.106569141 -0700
@@ -213,7 +213,7 @@ static inline void nf_bridge_update_prot
  * expected format
  */
 
-int br_parse_ip_options(struct sk_buff *skb)
+static int br_parse_ip_options(struct sk_buff *skb)
 {
 	struct ip_options *opt;
 	struct iphdr *iph;


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bridge: make br_parse_ip_options  static
  2010-10-19  0:03 [PATCH] bridge: make br_parse_ip_options static Stephen Hemminger
@ 2010-10-19 11:22 ` Bandan Das
  2010-10-19 14:55   ` Stephen Hemminger
  2010-10-21 10:12   ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Bandan Das @ 2010-10-19 11:22 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On  0, Stephen Hemminger <shemminger@vyatta.com> wrote:
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> 
> --- a/net/bridge/br_netfilter.c	2010-10-18 17:01:36.903364885 -0700
> +++ b/net/bridge/br_netfilter.c	2010-10-18 17:01:48.106569141 -0700
> @@ -213,7 +213,7 @@ static inline void nf_bridge_update_prot
>   * expected format
>   */
>  
> -int br_parse_ip_options(struct sk_buff *skb)
> +static int br_parse_ip_options(struct sk_buff *skb)
>  {
>  	struct ip_options *opt;
>  	struct iphdr *iph;
> 

My main motivation behind not making this static was that
there would be possibly other places in the bridge code 
(besides br_netfilter.c) where we enter the IP stack and might 
want to call this. Not sure if it's indeed the case though..

-- 
Bandan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bridge: make br_parse_ip_options  static
  2010-10-19 11:22 ` Bandan Das
@ 2010-10-19 14:55   ` Stephen Hemminger
  2010-10-19 16:03     ` Bandan Das
  2010-10-21 10:12   ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2010-10-19 14:55 UTC (permalink / raw)
  To: Bandan Das; +Cc: David Miller, netdev

On Tue, 19 Oct 2010 07:22:34 -0400
Bandan Das <bandan.das@stratus.com> wrote:

> On  0, Stephen Hemminger <shemminger@vyatta.com> wrote:
> > 
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> > 
> > --- a/net/bridge/br_netfilter.c	2010-10-18 17:01:36.903364885 -0700
> > +++ b/net/bridge/br_netfilter.c	2010-10-18 17:01:48.106569141 -0700
> > @@ -213,7 +213,7 @@ static inline void nf_bridge_update_prot
> >   * expected format
> >   */
> >  
> > -int br_parse_ip_options(struct sk_buff *skb)
> > +static int br_parse_ip_options(struct sk_buff *skb)
> >  {
> >  	struct ip_options *opt;
> >  	struct iphdr *iph;
> > 
> 
> My main motivation behind not making this static was that
> there would be possibly other places in the bridge code 
> (besides br_netfilter.c) where we enter the IP stack and might 
> want to call this. Not sure if it's indeed the case though..
> 

I checked by doing make allmodconfig as well as looking by
git grep 'br_parse_ip_options'

-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bridge: make br_parse_ip_options  static
  2010-10-19 14:55   ` Stephen Hemminger
@ 2010-10-19 16:03     ` Bandan Das
  0 siblings, 0 replies; 5+ messages in thread
From: Bandan Das @ 2010-10-19 16:03 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

> > 
> > My main motivation behind not making this static was that
> > there would be possibly other places in the bridge code 
> > (besides br_netfilter.c) where we enter the IP stack and might 
> > want to call this. Not sure if it's indeed the case though..
> > 
> 
> I checked by doing make allmodconfig as well as looking by
> git grep 'br_parse_ip_options'
> 
> -- 
Sorry, my wording was misleading :) What I meant was at this time,
it's only used in br_netfilter.c but may be sometime in the future,
it could possible be used in some other places where we enter the IP
stack from the bridge code.

But, I completely agree with you. It makes more sense to make it static
as of now.

Bandan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bridge: make br_parse_ip_options static
  2010-10-19 11:22 ` Bandan Das
  2010-10-19 14:55   ` Stephen Hemminger
@ 2010-10-21 10:12   ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2010-10-21 10:12 UTC (permalink / raw)
  To: bandan.das; +Cc: shemminger, netdev

From: Bandan Das <bandan.das@stratus.com>
Date: Tue, 19 Oct 2010 07:22:34 -0400

> On  0, Stephen Hemminger <shemminger@vyatta.com> wrote:
>> 
>> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>> 
>> --- a/net/bridge/br_netfilter.c	2010-10-18 17:01:36.903364885 -0700
>> +++ b/net/bridge/br_netfilter.c	2010-10-18 17:01:48.106569141 -0700
>> @@ -213,7 +213,7 @@ static inline void nf_bridge_update_prot
>>   * expected format
>>   */
>>  
>> -int br_parse_ip_options(struct sk_buff *skb)
>> +static int br_parse_ip_options(struct sk_buff *skb)
>>  {
>>  	struct ip_options *opt;
>>  	struct iphdr *iph;
>> 
> 
> My main motivation behind not making this static was that
> there would be possibly other places in the bridge code 
> (besides br_netfilter.c) where we enter the IP stack and might 
> want to call this. Not sure if it's indeed the case though..

You can un-static it when the use is added.

Patch applied, thanks Stephen.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-21 10:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-19  0:03 [PATCH] bridge: make br_parse_ip_options static Stephen Hemminger
2010-10-19 11:22 ` Bandan Das
2010-10-19 14:55   ` Stephen Hemminger
2010-10-19 16:03     ` Bandan Das
2010-10-21 10:12   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).