datapath: Use ETH_ALEN to define ethernet addresses
authorThomas Graf <tgraf@suug.ch>
Sat, 30 Mar 2013 01:30:34 +0000 (18:30 -0700)
committerJesse Gross <jesse@nicira.com>
Sat, 30 Mar 2013 01:47:25 +0000 (18:47 -0700)
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Jesse Gross <jesse@nicira.com>
include/linux/openvswitch.h

index 0dd3ee4..bd2f05f 100644 (file)
@@ -41,6 +41,7 @@
 #define _LINUX_OPENVSWITCH_H 1
 
 #include <linux/types.h>
+#include <linux/if_ether.h>
 
 /**
  * struct ovs_header - header for OVS Generic Netlink messages.
@@ -324,8 +325,8 @@ enum ovs_frag_type {
 #define OVS_FRAG_TYPE_MAX (__OVS_FRAG_TYPE_MAX - 1)
 
 struct ovs_key_ethernet {
-       __u8     eth_src[6];
-       __u8     eth_dst[6];
+       __u8     eth_src[ETH_ALEN];
+       __u8     eth_dst[ETH_ALEN];
 };
 
 struct ovs_key_mpls {
@@ -375,14 +376,14 @@ struct ovs_key_arp {
        __be32 arp_sip;
        __be32 arp_tip;
        __be16 arp_op;
-       __u8   arp_sha[6];
-       __u8   arp_tha[6];
+       __u8   arp_sha[ETH_ALEN];
+       __u8   arp_tha[ETH_ALEN];
 };
 
 struct ovs_key_nd {
        __u32 nd_target[4];
-       __u8  nd_sll[6];
-       __u8  nd_tll[6];
+       __u8  nd_sll[ETH_ALEN];
+       __u8  nd_tll[ETH_ALEN];
 };
 
 /**