This function is both trivial and on the packet processing fast path, so
expand it inline.
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);
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 *);
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 */