2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

util: Pass 128-bit arguments directly instead of using pointers.

Commit f2d105b5 (ofproto-dpif-xlate: xlate ct_{mark, label} correctly.)
introduced the ovs_u128_and() function.  It directly takes ovs_u128
values as arguments instead of pointers to them.  As this is a bit more
direct way to deal with 128-bit values, modify the other utility
functions to do the same.

Signed-off-by: Justin Pettit <jpettit@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
This commit is contained in:
Justin Pettit
2016-05-03 18:20:51 -07:00
parent 20322d4b6e
commit 2ff8484bbf
12 changed files with 29 additions and 29 deletions

View File

@@ -1033,7 +1033,7 @@ format_flow_tunnel(struct ds *s, const struct match *match)
static void
format_ct_label_masked(struct ds *s, const ovs_u128 *key, const ovs_u128 *mask)
{
if (!ovs_u128_is_zero(mask)) {
if (!ovs_u128_is_zero(*mask)) {
ovs_be128 value = hton128(*key);
ds_put_format(s, "%sct_label=%s", colors.param, colors.end);
ds_put_hex(s, &value, sizeof value);
@@ -1118,7 +1118,7 @@ match_format(const struct match *match, struct ds *s, int priority)
format_uint32_masked(s, "ct_mark", f->ct_mark, wc->masks.ct_mark);
}
if (!ovs_u128_is_zero(&wc->masks.ct_label)) {
if (!ovs_u128_is_zero(wc->masks.ct_label)) {
format_ct_label_masked(s, &f->ct_label, &wc->masks.ct_label);
}