X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fodp-util.c;h=67d1b3ee7951eaeb9d7710fbb050606f13c87893;hb=fb0d597fb64308c60001e3afc9b31eb295dedb6b;hp=21bc9a51644dd54d4bb5f0c84dd406d9bb5b912b;hpb=34e63086edddcae06d7c1a4fa84fec0861e50758;p=openvswitch diff --git a/lib/odp-util.c b/lib/odp-util.c index 21bc9a51..67d1b3ee 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nicira Networks. + * Copyright (c) 2009, 2010 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,6 +55,9 @@ format_odp_action(struct ds *ds, const union odp_action *a) case ODPAT_CONTROLLER: ds_put_format(ds, "ctl(%"PRIu32")", a->controller.arg); break; + case ODPAT_SET_TUNNEL: + ds_put_format(ds, "set_tunnel(0x%08"PRIx32")", ntohl(a->tunnel.tun_id)); + break; case ODPAT_SET_VLAN_VID: ds_put_format(ds, "set_vlan(%"PRIu16")", ntohs(a->vlan_vid.vlan_vid)); break; @@ -80,6 +83,9 @@ format_odp_action(struct ds *ds, const union odp_action *a) ds_put_format(ds, "set_nw_dst("IP_FMT")", IP_ARGS(&a->nw_addr.nw_addr)); break; + case ODPAT_SET_NW_TOS: + ds_put_format(ds, "set_nw_tos(%"PRIu8")", a->nw_tos.nw_tos); + break; case ODPAT_SET_TP_SRC: ds_put_format(ds, "set_tp_src(%"PRIu16")", ntohs(a->tp_port.tp_port)); break; @@ -87,7 +93,7 @@ format_odp_action(struct ds *ds, const union odp_action *a) ds_put_format(ds, "set_tp_dst(%"PRIu16")", ntohs(a->tp_port.tp_port)); break; default: - ds_put_format(ds, "***bad action %"PRIu16"***", a->type); + ds_put_format(ds, "***bad action 0x%"PRIx16"***", a->type); break; } } @@ -111,8 +117,9 @@ format_odp_actions(struct ds *ds, const union odp_action *actions, void format_odp_flow_stats(struct ds *ds, const struct odp_flow_stats *s) { - ds_put_format(ds, "packets:%"PRIu64", bytes:%"PRIu64", used:", - s->n_packets, s->n_bytes); + ds_put_format(ds, "packets:%llu, bytes:%llu, used:", + (unsigned long long int) s->n_packets, + (unsigned long long int) s->n_bytes); if (s->used_sec) { long long int used = s->used_sec * 1000 + s->used_nsec / 1000000; ds_put_format(ds, "%.3fs", (time_msec() - used) / 1000.0);