2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-21 14:49:41 +00:00

byte-order: Make hton128() and ntoh128() behave like their counterparts.

Instead of taking the source and destination as arguments, make these
functions act like their short and long counterparts.

Signed-off-by: Justin Pettit <jpettit@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Justin Pettit
2015-10-31 03:12:38 -07:00
parent 184dfff00a
commit 32ea15f6f5
5 changed files with 29 additions and 39 deletions

View File

@@ -979,13 +979,11 @@ static void
format_ct_label_masked(struct ds *s, const ovs_u128 *key, const ovs_u128 *mask)
{
if (!ovs_u128_is_zero(mask)) {
ovs_be128 value;
hton128(key, &value);
ovs_be128 value = hton128(*key);
ds_put_format(s, "ct_label=");
ds_put_hex(s, &value, sizeof value);
if (!is_all_ones(mask, sizeof(*mask))) {
hton128(mask, &value);
value = hton128(*mask);
ds_put_char(s, '/');
ds_put_hex(s, &value, sizeof value);
}