X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fodp-util.c;h=dd6b6295b5d5c590a2c0980e63ed3febfb7e9f02;hb=c052da844bdf7fc2f87500f76fca529c4e3dc598;hp=2ed551d2af9c7a911c07a12e0a0870ae0edbb5c9;hpb=cdee00fd635d1e0f1eeb5d9c009daeb59abd4777;p=openvswitch diff --git a/lib/odp-util.c b/lib/odp-util.c index 2ed551d2..dd6b6295 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -31,8 +31,8 @@ void format_odp_flow_key(struct ds *ds, const struct odp_flow_key *key) { - ds_put_format(ds, "tun_id%#"PRIx32" in_port%d tci(", - ntohl(key->tun_id), key->in_port); + ds_put_format(ds, "tun_id%#"PRIx64" in_port%d tci(", + ntohll(key->tun_id), key->in_port); if (key->dl_tci) { ds_put_format(ds, "vlan%"PRIu16",pcp%d", vlan_tci_to_vid(key->dl_tci), @@ -57,7 +57,7 @@ odp_action_len(uint16_t type) switch ((enum odp_action_type) type) { case ODPAT_OUTPUT: return 4; - case ODPAT_CONTROLLER: return 4; + case ODPAT_CONTROLLER: return 8; case ODPAT_SET_DL_TCI: return 2; case ODPAT_STRIP_VLAN: return 0; case ODPAT_SET_DL_SRC: return ETH_ADDR_LEN; @@ -67,7 +67,7 @@ odp_action_len(uint16_t type) case ODPAT_SET_NW_TOS: return 1; case ODPAT_SET_TP_SRC: return 2; case ODPAT_SET_TP_DST: return 2; - case ODPAT_SET_TUNNEL: return 4; + case ODPAT_SET_TUNNEL: return 8; case ODPAT_SET_PRIORITY: return 4; case ODPAT_POP_PRIORITY: return 0; case ODPAT_DROP_SPOOFED_ARP: return 0; @@ -115,11 +115,11 @@ format_odp_action(struct ds *ds, const struct nlattr *a) ds_put_format(ds, "%"PRIu16, nl_attr_get_u32(a)); break; case ODPAT_CONTROLLER: - ds_put_format(ds, "ctl(%"PRIu32")", nl_attr_get_u32(a)); + ds_put_format(ds, "ctl(%"PRIu64")", nl_attr_get_u64(a)); break; case ODPAT_SET_TUNNEL: - ds_put_format(ds, "set_tunnel(%#"PRIx32")", - ntohl(nl_attr_get_be32(a))); + ds_put_format(ds, "set_tunnel(%#"PRIx64")", + ntohll(nl_attr_get_be64(a))); break; case ODPAT_SET_DL_TCI: ds_put_format(ds, "set_tci(vid=%"PRIu16",pcp=%d)",