From: Jesse Gross Date: Wed, 30 Nov 2011 18:46:54 +0000 (-0800) Subject: datapath: Don't use ipv6_addr_copy(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=858d102657ff1b306f307aac8b4bf609b1271360;p=openvswitch datapath: Don't use ipv6_addr_copy(). It was dropped upstream in favor of direct structure assignment. Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- diff --git a/datapath/flow.c b/datapath/flow.c index 78f737ab..c6f591af 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -212,8 +212,8 @@ static int parse_ipv6hdr(struct sk_buff *skb, struct sw_flow_key *key, key->ip.tos = ipv6_get_dsfield(nh); key->ip.ttl = nh->hop_limit; key->ipv6.label = *(__be32 *)nh & htonl(IPV6_FLOWINFO_FLOWLABEL); - ipv6_addr_copy(&key->ipv6.addr.src, &nh->saddr); - ipv6_addr_copy(&key->ipv6.addr.dst, &nh->daddr); + key->ipv6.addr.src = nh->saddr; + key->ipv6.addr.dst = nh->daddr; payload_ofs = skip_exthdr(skb, payload_ofs, &nexthdr, &key->ip.frag); if (unlikely(payload_ofs < 0)) @@ -572,7 +572,7 @@ static int parse_icmpv6(struct sk_buff *skb, struct sw_flow_key *key, } nd = (struct nd_msg *)skb_transport_header(skb); - ipv6_addr_copy(&key->ipv6.nd.target, &nd->target); + key->ipv6.nd.target = nd->target; key_len = SW_FLOW_KEY_OFFSET(ipv6.nd); icmp_len -= sizeof(*nd); diff --git a/datapath/tunnel.c b/datapath/tunnel.c index 41907b95..4ce830ff 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -587,8 +587,8 @@ static void ipv6_build_icmp(struct sk_buff *skb, struct sk_buff *nskb, + payload_length); ipv6h->nexthdr = NEXTHDR_ICMP; ipv6h->hop_limit = IPV6_DEFAULT_HOPLIMIT; - ipv6_addr_copy(&ipv6h->daddr, &old_ipv6h->saddr); - ipv6_addr_copy(&ipv6h->saddr, &old_ipv6h->daddr); + ipv6h->daddr = old_ipv6h->saddr; + ipv6h->saddr = old_ipv6h->daddr; /* ICMPv6 */ icmp6h->icmp6_type = ICMPV6_PKT_TOOBIG;