X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fflow.h;h=7606cb3d92c1d5fcd08cebbe2d02d4f98b4fb1ba;hb=431d6a6acf6da61ecfeb433cb1fb10e1b39e9773;hp=3421d4fde349bc6ab27eff1134cb42dd9d703566;hpb=2486e66ab570c261ba931c8333f1488f8eba5903;p=openvswitch diff --git a/lib/flow.h b/lib/flow.h index 3421d4fd..7606cb3d 100644 --- a/lib/flow.h +++ b/lib/flow.h @@ -96,14 +96,17 @@ void flow_zero_wildcards(struct flow *, const struct flow_wildcards *); char *flow_to_string(const struct flow *); void flow_format(struct ds *, const struct flow *); void flow_print(FILE *, const struct flow *); -static inline int flow_compare(const struct flow *, const struct flow *); +static inline int flow_compare_3way(const struct flow *, const struct flow *); static inline bool flow_equal(const struct flow *, const struct flow *); static inline size_t flow_hash(const struct flow *, uint32_t basis); +void flow_set_vlan_vid(struct flow *, ovs_be16 vid); +void flow_set_vlan_pcp(struct flow *, uint8_t pcp); + void flow_compose(struct ofpbuf *, const struct flow *); static inline int -flow_compare(const struct flow *a, const struct flow *b) +flow_compare_3way(const struct flow *a, const struct flow *b) { return memcmp(a, b, FLOW_SIG_SIZE); } @@ -111,7 +114,7 @@ flow_compare(const struct flow *a, const struct flow *b) static inline bool flow_equal(const struct flow *a, const struct flow *b) { - return !flow_compare(a, b); + return !flow_compare_3way(a, b); } static inline size_t