Add help function match_set_tun_tp_dst(). Will be used in the nxt commit. This patch doesn't change any functionality.
Signed-off-by: Roi Dayan <r...@mellanox.com> --- include/openvswitch/match.h | 2 ++ lib/match.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/include/openvswitch/match.h b/include/openvswitch/match.h index 9e15da2..70da928 100644 --- a/include/openvswitch/match.h +++ b/include/openvswitch/match.h @@ -86,6 +86,8 @@ void match_set_tun_tos(struct match *match, uint8_t tos); void match_set_tun_tos_masked(struct match *match, uint8_t tos, uint8_t mask); void match_set_tun_flags(struct match *match, uint16_t flags); void match_set_tun_flags_masked(struct match *match, uint16_t flags, uint16_t mask); +void match_set_tun_tp_dst(struct match *match, ovs_be16 tp_dst); +void match_set_tun_tp_dst_masked(struct match *match, ovs_be16 port, ovs_be16 mask); void match_set_tun_gbp_id_masked(struct match *match, ovs_be16 gbp_id, ovs_be16 mask); void match_set_tun_gbp_id(struct match *match, ovs_be16 gbp_id); void match_set_tun_gbp_flags_masked(struct match *match, uint8_t flags, uint8_t mask); diff --git a/lib/match.c b/lib/match.c index ebcdb29..9aa0d88 100644 --- a/lib/match.c +++ b/lib/match.c @@ -279,6 +279,19 @@ match_set_tun_flags_masked(struct match *match, uint16_t flags, uint16_t mask) } void +match_set_tun_tp_dst(struct match *match, ovs_be16 tp_dst) +{ + match_set_tun_tp_dst_masked(match, tp_dst, OVS_BE16_MAX); +} + +void +match_set_tun_tp_dst_masked(struct match *match, ovs_be16 port, ovs_be16 mask) +{ + match->wc.masks.tunnel.tp_dst = mask; + match->flow.tunnel.tp_dst = port & mask; +} + +void match_set_tun_gbp_id_masked(struct match *match, ovs_be16 gbp_id, ovs_be16 mask) { match->wc.masks.tunnel.gbp_id = mask; -- 2.7.4 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev