X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fice%2Fbase%2Fice_protocol_type.h;h=c6caa85628990660804190ca84e063c3d9cd64eb;hb=34c672476522006441bf9af5810fdb5babdbc0a8;hp=e572dd320ea034d736f480b15fa45c20010d93c6;hpb=6e1db8a61d1de33e04a2e6d0ea24538e40c5c2de;p=dpdk.git diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h index e572dd320e..c6caa85628 100644 --- a/drivers/net/ice/base/ice_protocol_type.h +++ b/drivers/net/ice/base/ice_protocol_type.h @@ -30,22 +30,28 @@ enum ice_protocol_type { ICE_MAC_OFOS = 0, ICE_MAC_IL, + ICE_ETYPE_OL, + ICE_VLAN_OFOS, ICE_IPV4_OFOS, ICE_IPV4_IL, - ICE_IPV6_IL, ICE_IPV6_OFOS, + ICE_IPV6_IL, ICE_TCP_IL, + ICE_UDP_OF, ICE_UDP_ILOS, ICE_SCTP_IL, ICE_VXLAN, ICE_GENEVE, ICE_VXLAN_GPE, ICE_NVGRE, + ICE_GTP, + ICE_PPPOE, ICE_PROTOCOL_LAST }; enum ice_sw_tunnel_type { - ICE_NON_TUN, + ICE_NON_TUN = 0, + ICE_SW_TUN_AND_NON_TUN, ICE_SW_TUN_VXLAN_GPE, ICE_SW_TUN_GENEVE, ICE_SW_TUN_VXLAN, @@ -53,6 +59,8 @@ enum ice_sw_tunnel_type { ICE_SW_TUN_UDP, /* This means all "UDP" tunnel types: VXLAN-GPE, VXLAN * and GENEVE */ + ICE_SW_TUN_GTP, + ICE_SW_TUN_PPPOE, ICE_ALL_TUNNELS /* All tunnel types including NVGRE */ }; @@ -95,6 +103,7 @@ enum ice_prot_id { ICE_PROT_ICMPV6_IL = 100, ICE_PROT_VRRP_F = 101, ICE_PROT_OSPF = 102, + ICE_PROT_PPPOE = 103, ICE_PROT_ATAOE_OF = 114, ICE_PROT_CTRL_OF = 116, ICE_PROT_LLDP_OF = 117, @@ -104,9 +113,12 @@ enum ice_prot_id { ICE_PROT_INVALID = 255 /* when offset == 0xFF */ }; +#define ICE_VNI_OFFSET 12 /* offset of VNI from ICE_PROT_UDP_OF */ #define ICE_MAC_OFOS_HW 1 #define ICE_MAC_IL_HW 4 +#define ICE_ETYPE_OL_HW 9 +#define ICE_VLAN_OL_HW 16 #define ICE_IPV4_OFOS_HW 32 #define ICE_IPV4_IL_HW 33 #define ICE_IPV6_OFOS_HW 40 @@ -114,6 +126,7 @@ enum ice_prot_id { #define ICE_TCP_IL_HW 49 #define ICE_UDP_ILOS_HW 53 #define ICE_SCTP_IL_HW 96 +#define ICE_PPPOE_HW 103 /* ICE_UDP_OF is used to identify all 3 tunnel types * VXLAN, GENEVE and VXLAN_GPE. To differentiate further @@ -123,6 +136,8 @@ enum ice_prot_id { #define ICE_GRE_OF_HW 64 /* NVGRE */ #define ICE_META_DATA_ID_HW 255 /* this is used for tunnel type */ +#define ICE_MDID_SIZE 2 +#define ICE_TUN_FLAG_MDID 21 #define ICE_TUN_FLAG_MASK 0xFF #define ICE_TUN_FLAG_FV_IND 2 @@ -134,10 +149,12 @@ struct ice_protocol_entry { u8 protocol_id; }; - struct ice_ether_hdr { u8 dst_addr[ETH_ALEN]; u8 src_addr[ETH_ALEN]; +}; + +struct ice_ethtype_hdr { u16 ethtype_id; }; @@ -147,6 +164,11 @@ struct ice_ether_vlan_hdr { u32 vlan_id; }; +struct ice_vlan_hdr { + u16 vlan; + u16 type; +}; + struct ice_ipv4_hdr { u8 version; u8 tos; @@ -188,22 +210,51 @@ struct ice_l4_hdr { struct ice_udp_tnl_hdr { u16 field; u16 proto_type; - u16 vni; + u32 vni; /* only use lower 24-bits */ +}; + +#pragma pack(1) +struct ice_udp_gtp_hdr { + u8 flags; + u8 msg_type; + u16 rsrvd_len; + u32 teid; + u16 rsrvd_seq_nbr; + u8 rsrvd_n_pdu_nbr; + u8 rsrvd_next_ext; + u8 rsvrd_ext_len; + u8 pdu_type; + u8 qfi; + u8 rsvrd; +}; + +struct ice_pppoe_hdr { + u8 rsrvd_ver_type; + u8 rsrved_code; + u16 session_id; + u16 length; + u16 ppp_prot_id; /* control and data only */ }; +#pragma pack() struct ice_nvgre { - u16 tni; - u16 flow_id; + u16 flags; + u16 protocol; + u32 tni_flow; }; union ice_prot_hdr { - struct ice_ether_hdr eth_hdr; - struct ice_ipv4_hdr ipv4_hdr; - struct ice_ipv6_hdr ice_ipv6_ofos_hdr; - struct ice_l4_hdr l4_hdr; - struct ice_sctp_hdr sctp_hdr; - struct ice_udp_tnl_hdr tnl_hdr; - struct ice_nvgre nvgre_hdr; + struct ice_ether_hdr eth_hdr; + struct ice_ethtype_hdr ethertype; + struct ice_vlan_hdr vlan_hdr; + struct ice_ipv4_hdr ipv4_hdr; + struct ice_ipv6_hdr ipv6_hdr; + struct ice_l4_hdr l4_hdr; + struct ice_sctp_hdr sctp_hdr; + struct ice_udp_tnl_hdr tnl_hdr; + struct ice_nvgre nvgre_hdr; + struct ice_udp_gtp_hdr gtp_hdr; + struct ice_pppoe_hdr pppoe_hdr; }; /* This is mapping table entry that maps every word within a given protocol @@ -224,6 +275,7 @@ struct ice_prot_lkup_ext { u8 n_val_words; /* create a buffer to hold max words per recipe */ u16 field_off[ICE_MAX_CHAIN_WORDS]; + u16 field_mask[ICE_MAX_CHAIN_WORDS]; struct ice_fv_word fv_words[ICE_MAX_CHAIN_WORDS]; @@ -234,6 +286,7 @@ struct ice_prot_lkup_ext { struct ice_pref_recipe_group { u8 n_val_pairs; /* Number of valid pairs */ struct ice_fv_word pairs[ICE_NUM_WORDS_RECIPE]; + u16 mask[ICE_NUM_WORDS_RECIPE]; }; struct ice_recp_grp_entry { @@ -243,6 +296,7 @@ struct ice_recp_grp_entry { u16 rid; u8 chain_idx; u16 fv_idx[ICE_NUM_WORDS_RECIPE]; + u16 fv_mask[ICE_NUM_WORDS_RECIPE]; struct ice_pref_recipe_group r_group; }; #endif /* _ICE_PROTOCOL_TYPE_H_ */