-/*
- * The datapath protocol adopts the Linux convention for TCI fields: if an
- * 802.1Q header is present then its TCI value is used verbatim except that the
- * CFI bit (0x1000) is always set to 1, and all-bits-zero indicates no 802.1Q
- * header.
- */
-#define ODP_TCI_PRESENT 0x1000 /* CFI bit */
-
-struct odp_flow_key {
- ovs_be64 tun_id; /* Encapsulating tunnel ID. */
- ovs_be32 nw_src; /* IP source address. */
- ovs_be32 nw_dst; /* IP destination address. */
- uint16_t in_port; /* Input switch port. */
- ovs_be16 dl_tci; /* All zeros if 802.1Q header absent,
- * ODP_TCI_PRESENT set if present. */
- ovs_be16 dl_type; /* Ethernet frame type. */
- ovs_be16 tp_src; /* TCP/UDP source port. */
- ovs_be16 tp_dst; /* TCP/UDP destination port. */
- uint8_t dl_src[6]; /* Ethernet source address. */
- uint8_t dl_dst[6]; /* Ethernet destination address. */
- uint8_t nw_proto; /* IP protocol or lower 8 bits of
- ARP opcode. */
- uint8_t nw_tos; /* IP ToS (DSCP field, 6 bits). */
+enum odp_key_type {
+ ODP_KEY_ATTR_UNSPEC,
+ ODP_KEY_ATTR_TUN_ID, /* 64-bit tunnel ID */
+ ODP_KEY_ATTR_IN_PORT, /* 32-bit ODP port number */
+ ODP_KEY_ATTR_ETHERNET, /* struct odp_key_ethernet */
+ 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_TCP, /* struct odp_key_tcp */
+ ODP_KEY_ATTR_UDP, /* struct odp_key_udp */
+ ODP_KEY_ATTR_ICMP, /* struct odp_key_icmp */
+ ODP_KEY_ATTR_ARP, /* struct odp_key_arp */
+ __ODP_KEY_ATTR_MAX