Skip to contentSkip to conversation

bridge: make br_parse_ip_options static

PATCH In review Stephen Hemminger 3 participants 5 messages Oct 19, 2010 – Oct 21, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bridge: make br_parse_ip_options static

net/bridge/br_netfilter.c +1 -1
@@ -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;
#1 lore raw
Quoted 7 lines · Stephen Hemminger

net/bridge/br_netfilter.c static inline void nf_bridge_update_prot · line 219

Quoted 8 lines
net/bridge/br_netfilter.c +1 -1
@@ -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..

Signature · 1 line
Bandan
#2 lore raw
Quoted 10 lines · On Tue, 19 Oct 2010 07:22:34 -0400 Bandan Das <[email protected]> wrote:
Quoted 9 lines · Stephen Hemminger
net/bridge/br_netfilter.c +0 -0
@@ -213,7 +213,7 @@ static inline void nf_bridge_update_prot
  * expected format
  */
 
Quoted 12 lines

net/bridge/br_netfilter.c static inline void nf_bridge_update_prot · line 219

Quoted 6 lines
net/bridge/br_netfilter.c +1 -1
-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'

#3 lore raw
Quoted 11 lines
Quoted 6 lines

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

maintainer
#4 lore raw
In reply to Bandan Das

From: Bandan Das <[email protected]>
Date: Tue, 19 Oct 2010 07:22:34 -0400

Quoted 10 lines · Stephen Hemminger
Quoted 9 lines
net/bridge/br_netfilter.c +0 -0
@@ -213,7 +213,7 @@ static inline void nf_bridge_update_prot
  * expected format
  */
 
Quoted 11 lines

net/bridge/br_netfilter.c static inline void nf_bridge_update_prot · line 219

Quoted 6 lines
net/bridge/br_netfilter.c +1 -1
-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.