diff options
author | Joe Perches <joe@perches.com> | 2014-02-18 14:15:45 -0500 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2014-05-16 16:40:29 -0400 |
commit | 8c63ff09bddf944ab0033fea97aacfadfffa76de (patch) | |
tree | 1edb3de3a1752b4b6b7c368728db550cc8edbd5c /net/openvswitch/flow_netlink.c | |
parent | 2235ad1c3ac545bd8fc2c026be5be16d98b9a891 (diff) |
openvswitch: Use ether_addr_copy
It's slightly smaller/faster for some architectures.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch/flow_netlink.c')
-rw-r--r-- | net/openvswitch/flow_netlink.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c index 7bd09b75ebaa..5511ad18be51 100644 --- a/net/openvswitch/flow_netlink.c +++ b/net/openvswitch/flow_netlink.c | |||
@@ -986,8 +986,8 @@ int ovs_nla_put_flow(const struct sw_flow_key *swkey, | |||
986 | goto nla_put_failure; | 986 | goto nla_put_failure; |
987 | 987 | ||
988 | eth_key = nla_data(nla); | 988 | eth_key = nla_data(nla); |
989 | memcpy(eth_key->eth_src, output->eth.src, ETH_ALEN); | 989 | ether_addr_copy(eth_key->eth_src, output->eth.src); |
990 | memcpy(eth_key->eth_dst, output->eth.dst, ETH_ALEN); | 990 | ether_addr_copy(eth_key->eth_dst, output->eth.dst); |
991 | 991 | ||
992 | if (swkey->eth.tci || swkey->eth.type == htons(ETH_P_8021Q)) { | 992 | if (swkey->eth.tci || swkey->eth.type == htons(ETH_P_8021Q)) { |
993 | __be16 eth_type; | 993 | __be16 eth_type; |
@@ -1059,8 +1059,8 @@ int ovs_nla_put_flow(const struct sw_flow_key *swkey, | |||
1059 | arp_key->arp_sip = output->ipv4.addr.src; | 1059 | arp_key->arp_sip = output->ipv4.addr.src; |
1060 | arp_key->arp_tip = output->ipv4.addr.dst; | 1060 | arp_key->arp_tip = output->ipv4.addr.dst; |
1061 | arp_key->arp_op = htons(output->ip.proto); | 1061 | arp_key->arp_op = htons(output->ip.proto); |
1062 | memcpy(arp_key->arp_sha, output->ipv4.arp.sha, ETH_ALEN); | 1062 | ether_addr_copy(arp_key->arp_sha, output->ipv4.arp.sha); |
1063 | memcpy(arp_key->arp_tha, output->ipv4.arp.tha, ETH_ALEN); | 1063 | ether_addr_copy(arp_key->arp_tha, output->ipv4.arp.tha); |
1064 | } | 1064 | } |
1065 | 1065 | ||
1066 | if ((swkey->eth.type == htons(ETH_P_IP) || | 1066 | if ((swkey->eth.type == htons(ETH_P_IP) || |
@@ -1147,8 +1147,8 @@ int ovs_nla_put_flow(const struct sw_flow_key *swkey, | |||
1147 | nd_key = nla_data(nla); | 1147 | nd_key = nla_data(nla); |
1148 | memcpy(nd_key->nd_target, &output->ipv6.nd.target, | 1148 | memcpy(nd_key->nd_target, &output->ipv6.nd.target, |
1149 | sizeof(nd_key->nd_target)); | 1149 | sizeof(nd_key->nd_target)); |
1150 | memcpy(nd_key->nd_sll, output->ipv6.nd.sll, ETH_ALEN); | 1150 | ether_addr_copy(nd_key->nd_sll, output->ipv6.nd.sll); |
1151 | memcpy(nd_key->nd_tll, output->ipv6.nd.tll, ETH_ALEN); | 1151 | ether_addr_copy(nd_key->nd_tll, output->ipv6.nd.tll); |
1152 | } | 1152 | } |
1153 | } | 1153 | } |
1154 | } | 1154 | } |