From: Ben Pfaff <blp@nicira.com>
Date: Fri, 23 Jul 2010 20:05:25 +0000 (-0700)
Subject: datapath: Inline flow_cast().
X-Git-Tag: v1.1.0pre1~123
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9d2094938de6e6d6503a3d0777f64cff945321c3;p=sliver-openvswitch.git

datapath: Inline flow_cast().

This function is both trivial and on the packet processing fast path, so
expand it inline.
---

diff --git a/datapath/flow.c b/datapath/flow.c
index 7b3be47c9..8b736c883 100644
--- a/datapath/flow.c
+++ b/datapath/flow.c
@@ -319,11 +319,6 @@ int flow_extract(struct sk_buff *skb, u16 in_port, struct odp_flow_key *key)
 	return retval;
 }
 
-struct sw_flow *flow_cast(const struct tbl_node *node)
-{
-	return container_of(node, struct sw_flow, tbl_node);
-}
-
 u32 flow_hash(const struct odp_flow_key *key)
 {
 	return jhash2((u32*)key, sizeof *key / sizeof(u32), hash_seed);
diff --git a/datapath/flow.h b/datapath/flow.h
index f0e769757..534c7af24 100644
--- a/datapath/flow.h
+++ b/datapath/flow.h
@@ -50,7 +50,6 @@ void flow_deferred_free_acts(struct sw_flow_actions *);
 int flow_extract(struct sk_buff *, u16 in_port, struct odp_flow_key *);
 void flow_used(struct sw_flow *, struct sk_buff *);
 
-struct sw_flow *flow_cast(const struct tbl_node *);
 u32 flow_hash(const struct odp_flow_key *key);
 int flow_cmp(const struct tbl_node *, void *target);
 void flow_free_tbl(struct tbl_node *);
@@ -58,4 +57,9 @@ void flow_free_tbl(struct tbl_node *);
 int flow_init(void);
 void flow_exit(void);
 
+static inline struct sw_flow *flow_cast(const struct tbl_node *node)
+{
+	return container_of(node, struct sw_flow, tbl_node);
+}
+
 #endif /* flow.h */