X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fopenvswitch%2Fdatapath-protocol.h;h=e5bbc6ac2fe15282ff0cddbabaa13f1d1f587565;hb=9d9a0a0452a957472b0f3a9c132aea19cfb4e568;hp=1fb0bf99139143a8c3009af779685e3d49fc18dc;hpb=7aec165dbc4690c8c2c703d142e2f017bb851d31;p=openvswitch diff --git a/include/openvswitch/datapath-protocol.h b/include/openvswitch/datapath-protocol.h index 1fb0bf99..e5bbc6ac 100644 --- a/include/openvswitch/datapath-protocol.h +++ b/include/openvswitch/datapath-protocol.h @@ -37,19 +37,9 @@ * ---------------------------------------------------------------------- */ -/* 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 types indicate that an object is in big-endian, not - * native-endian, byte order. They are otherwise equivalent to uint_t. - * The Linux kernel already has __be 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 #include @@ -61,12 +51,6 @@ #include #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 #include @@ -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,10 +347,23 @@ 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; ovs_be16 arp_op; + uint8_t arp_sha[6]; + uint8_t arp_tha[6]; +}; + +struct odp_key_nd { + uint32_t nd_target[4]; + uint8_t nd_sll[6]; + uint8_t nd_tll[6]; }; /**