aboutsummaryrefslogtreecommitdiff
path: root/lib/odp-util.c
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@nicira.com>2011-11-09 12:17:38 -0800
committerJustin Pettit <jpettit@nicira.com>2011-11-09 13:24:52 -0800
commit60258dcba68383473313cc214431fd212bdb1016 (patch)
tree197ba820a125eeda8594d6b4258ad5d70c532431 /lib/odp-util.c
parent7229a773ead96f891b621cd5f3e1219af5f24dd7 (diff)
datapath: Rename ipv6_tos to ipv6_tclass.
IPv6 uses the term "traffic class" for what IPv4 calls "type-of-service". This commit renames the the "ipv6_tos" field to "ipv6_tclass" in the "ovs-key_ipv6" struct to be more consistent with the IPv6 terminology. Suggested-by: Jesse Gross <jesse@nicira.com> Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'lib/odp-util.c')
-rw-r--r--lib/odp-util.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/odp-util.c b/lib/odp-util.c
index 445798ba..bda5861b 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -387,9 +387,9 @@ format_odp_key_attr(const struct nlattr *a, struct ds *ds)
inet_ntop(AF_INET6, ipv6_key->ipv6_dst, dst_str, sizeof dst_str);
ds_put_format(ds, "ipv6(src=%s,dst=%s,label=%#"PRIx32",proto=%"PRIu8
- ",tos=%#"PRIx8",hlimit=%"PRIu8",frag=%s)",
+ ",tclass=%#"PRIx8",hlimit=%"PRIu8",frag=%s)",
src_str, dst_str, ntohl(ipv6_key->ipv6_label),
- ipv6_key->ipv6_proto, ipv6_key->ipv6_tos,
+ ipv6_key->ipv6_proto, ipv6_key->ipv6_tclass,
ipv6_key->ipv6_hlimit,
ovs_frag_type_to_string(ipv6_key->ipv6_frag));
break;
@@ -638,16 +638,16 @@ parse_odp_key_attr(const char *s, struct ofpbuf *key)
char ipv6_dst_s[IPV6_SCAN_LEN + 1];
int ipv6_label;
int ipv6_proto;
- int ipv6_tos;
+ int ipv6_tclass;
int ipv6_hlimit;
char frag[8];
enum ovs_frag_type ipv6_frag;
int n = -1;
if (sscanf(s, "ipv6(src="IPV6_SCAN_FMT",dst="IPV6_SCAN_FMT","
- "label=%i,proto=%i,tos=%i,hlimit=%i,frag=%7[a-z])%n",
+ "label=%i,proto=%i,tclass=%i,hlimit=%i,frag=%7[a-z])%n",
ipv6_src_s, ipv6_dst_s, &ipv6_label,
- &ipv6_proto, &ipv6_tos, &ipv6_hlimit, frag, &n) > 0
+ &ipv6_proto, &ipv6_tclass, &ipv6_hlimit, frag, &n) > 0
&& n > 0
&& ovs_frag_type_from_string(frag, &ipv6_frag)) {
struct ovs_key_ipv6 ipv6_key;
@@ -658,7 +658,7 @@ parse_odp_key_attr(const char *s, struct ofpbuf *key)
}
ipv6_key.ipv6_label = htonl(ipv6_label);
ipv6_key.ipv6_proto = ipv6_proto;
- ipv6_key.ipv6_tos = ipv6_tos;
+ ipv6_key.ipv6_tclass = ipv6_tclass;
ipv6_key.ipv6_hlimit = ipv6_hlimit;
ipv6_key.ipv6_frag = ipv6_frag;
nl_msg_put_unspec(key, OVS_KEY_ATTR_IPV6,
@@ -891,7 +891,7 @@ odp_flow_key_from_flow(struct ofpbuf *buf, const struct flow *flow)
memcpy(ipv6_key->ipv6_dst, &flow->ipv6_dst, sizeof ipv6_key->ipv6_dst);
ipv6_key->ipv6_label = flow->ipv6_label;
ipv6_key->ipv6_proto = flow->nw_proto;
- ipv6_key->ipv6_tos = flow->tos;
+ ipv6_key->ipv6_tclass = flow->tos;
ipv6_key->ipv6_hlimit = flow->nw_ttl;
ipv6_key->ipv6_frag = ovs_to_odp_frag(flow->frag);
} else if (flow->dl_type == htons(ETH_TYPE_ARP)) {
@@ -1080,7 +1080,7 @@ odp_flow_key_to_flow(const struct nlattr *key, size_t key_len,
memcpy(&flow->ipv6_dst, ipv6_key->ipv6_dst, sizeof flow->ipv6_dst);
flow->ipv6_label = ipv6_key->ipv6_label;
flow->nw_proto = ipv6_key->ipv6_proto;
- flow->tos = ipv6_key->ipv6_tos;
+ flow->tos = ipv6_key->ipv6_tclass;
flow->nw_ttl = ipv6_key->ipv6_hlimit;
if (!odp_to_ovs_frag(ipv6_key->ipv6_frag, flow)) {
return EINVAL;