+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_cmp(const struct tbl_node *node, void *key2_)
+{
+ const struct odp_flow_key *key1 = &flow_cast(node)->key;
+ const struct odp_flow_key *key2 = key2_;
+
+ return !memcmp(key1, key2, sizeof(struct odp_flow_key));
+}
+