X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fopenvswitch%2Fdatapath-protocol.h;h=e7708ef17bf8a3564ce2f52cf2934f24d18a5024;hb=bf16ba4a9b1b4a38c867349e70e39d551b406b32;hp=fdd225db606ac72f3038d84acd36a2816ff81355;hpb=bad68a9965215511b305c59d7f1830344ec2241f;p=openvswitch diff --git a/include/openvswitch/datapath-protocol.h b/include/openvswitch/datapath-protocol.h index fdd225db..e7708ef1 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,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 @@ -416,7 +422,6 @@ enum odp_action_type { ODP_ACTION_ATTR_SET_TUNNEL, /* Set the encapsulating tunnel ID. */ ODP_ACTION_ATTR_SET_PRIORITY, /* Set skb->priority. */ ODP_ACTION_ATTR_POP_PRIORITY, /* Restore original skb->priority. */ - ODP_ACTION_ATTR_DROP_SPOOFED_ARP, /* Drop ARPs with spoofed source MAC. */ __ODP_ACTION_ATTR_MAX };