X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fflow.h;h=9a6e9378110fd77a206395b2acb57f5fa7217669;hb=f9c0c3eccdb8e14dc8fbf572e515dbef1eb7b2ee;hp=a0209377358f3eb7ba58ca80039c84f18a940888;hpb=7894e7daad4bc780dc3386bf2c28cafdc0692016;p=sliver-openvswitch.git diff --git a/lib/flow.h b/lib/flow.h index a02093773..9a6e93781 100644 --- a/lib/flow.h +++ b/lib/flow.h @@ -213,6 +213,18 @@ u32_to_ofp11(uint32_t port) return OFP11_PORT_C(port); } +static inline uint32_t +hash_ofp_port(ofp_port_t ofp_port) +{ + return hash_int(ofp_to_u16(ofp_port), 0); +} + +static inline uint32_t +hash_odp_port(odp_port_t odp_port) +{ + return hash_int(odp_to_u32(odp_port), 0); +} + uint32_t flow_hash_in_minimask(const struct flow *, const struct minimask *, uint32_t basis);