Merge 'master' into 'next'.
[sliver-openvswitch.git] / include / openvswitch / datapath-protocol.h
index fdd225d..e5bbc6a 100644 (file)
  * ----------------------------------------------------------------------
  */
 
-/* Protocol between userspace and kernel datapath.
- *
- * Be sure to update datapath/odp-compat.h if you change any of the structures
- * in here. */
-
 #ifndef OPENVSWITCH_DATAPATH_PROTOCOL_H
 #define OPENVSWITCH_DATAPATH_PROTOCOL_H 1
 
-/* The ovs_be<N> types indicate that an object is in big-endian, not
- * native-endian, byte order.  They are otherwise equivalent to uint<N>_t.
- * The Linux kernel already has __be<N> types for this, which take on
- * additional semantics when the "sparse" static checker is used, so we use
- * those types when compiling the kernel. */
 #ifdef __KERNEL__
 #include <linux/types.h>
 #include <linux/socket.h>
 #include <sys/socket.h>
 #endif
 
-#ifndef __aligned_u64
-#define __aligned_u64 __u64 __attribute__((aligned(8)))
-#define __aligned_be64 __be64 __attribute__((aligned(8)))
-#define __aligned_le64 __le64 __attribute__((aligned(8)))
-#endif
-
 #include <linux/if_link.h>
 #include <linux/netlink.h>
 \f
@@ -237,7 +221,8 @@ enum odp_vport_cmd {
  * @ODP_VPORT_ATTR_STATS: A &struct rtnl_link_stats64 giving statistics for
  * packets sent or received through the vport.
  * @ODP_VPORT_ATTR_ADDRESS: A 6-byte Ethernet address for the vport.
- * @ODP_VPORT_ATTR_MTU: MTU for the vport.
+ * @ODP_VPORT_ATTR_MTU: MTU for the vport.  Omitted if the vport does not have
+ * an MTU as, e.g., some tunnels do not.
  * @ODP_VPORT_ATTR_IFINDEX: ifindex of the underlying network device, if any.
  * @ODP_VPORT_ATTR_IFLINK: ifindex of the device on which packets are sent (for
  * tunnels), if any.
@@ -311,10 +296,13 @@ enum odp_key_type {
        ODP_KEY_ATTR_8021Q,     /* struct odp_key_8021q */
        ODP_KEY_ATTR_ETHERTYPE, /* 16-bit Ethernet type */
        ODP_KEY_ATTR_IPV4,      /* struct odp_key_ipv4 */
+       ODP_KEY_ATTR_IPV6,      /* struct odp_key_ipv6 */
        ODP_KEY_ATTR_TCP,       /* struct odp_key_tcp */
        ODP_KEY_ATTR_UDP,       /* struct odp_key_udp */
        ODP_KEY_ATTR_ICMP,      /* struct odp_key_icmp */
+       ODP_KEY_ATTR_ICMPV6,    /* struct odp_key_icmpv6 */
        ODP_KEY_ATTR_ARP,       /* struct odp_key_arp */
+       ODP_KEY_ATTR_ND,        /* struct odp_key_nd */
        __ODP_KEY_ATTR_MAX
 };
 
@@ -337,6 +325,13 @@ struct odp_key_ipv4 {
        uint8_t  ipv4_tos;
 };
 
+struct odp_key_ipv6 {
+       ovs_be32 ipv6_src[4];
+       ovs_be32 ipv6_dst[4];
+       uint8_t  ipv6_proto;
+       uint8_t  ipv6_tos;
+};
+
 struct odp_key_tcp {
        ovs_be16 tcp_src;
        ovs_be16 tcp_dst;
@@ -352,6 +347,11 @@ struct odp_key_icmp {
        uint8_t icmp_code;
 };
 
+struct odp_key_icmpv6 {
+       uint8_t icmpv6_type;
+       uint8_t icmpv6_code;
+};
+
 struct odp_key_arp {
        ovs_be32 arp_sip;
        ovs_be32 arp_tip;
@@ -360,6 +360,12 @@ struct odp_key_arp {
        uint8_t  arp_tha[6];
 };
 
+struct odp_key_nd {
+       uint32_t nd_target[4];
+       uint8_t  nd_sll[6];
+       uint8_t  nd_tll[6];
+};
+
 /**
  * enum odp_flow_attr - attributes for %ODP_FLOW_* commands.
  * @ODP_FLOW_ATTR_KEY: Nested %ODP_KEY_ATTR_* attributes specifying the flow