net/ice/base: support tunnel packets
[dpdk.git] / drivers / net / ice / base / ice_fdir.h
index 2ecb147..9e7e220 100644 (file)
@@ -58,7 +58,8 @@ enum ice_status ice_clear_pf_fd_table(struct ice_hw *hw);
 #define ICE_IP_PROTO_IP                        0
 #define ICE_IP_PROTO_ESP               50
 
-#define ICE_FDIR_MAX_RAW_PKT_SIZE      512
+#define ICE_FDIR_TUN_PKT_OFF           50
+#define ICE_FDIR_MAX_RAW_PKT_SIZE      (512 + ICE_FDIR_TUN_PKT_OFF)
 #define ICE_FDIR_BUF_FULL_MARGIN       10
 #define ICE_FDIR_BUF_HEAD_ROOM         32
 
@@ -163,9 +164,6 @@ struct ice_fdir_fltr {
 
        /* filter control */
        u16 q_index;
-#ifdef ADQ_SUPPORT
-       u16 orig_q_index;
-#endif /* ADQ_SUPPORT */
        u16 dest_vsi;
        u8 dest_ctl;
        u8 fltr_status;
@@ -173,18 +171,22 @@ struct ice_fdir_fltr {
        u32 fltr_id;
 };
 
-
 /* Dummy packet filter definition structure. */
 struct ice_fdir_base_pkt {
        enum ice_fltr_ptype flow;
        u16 pkt_len;
        const u8 *pkt;
+       u16 tun_pkt_len;
+       const u8 *tun_pkt;
 };
 
 void
 ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
                       struct ice_fltr_desc *fdesc, bool add);
 enum ice_status
+ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
+                         u8 *pkt, bool frag, bool tun);
+enum ice_status
 ice_fdir_get_prgm_pkt(struct ice_fdir_fltr *input, u8 *pkt, bool frag);
 enum ice_status
 ice_add_del_fdir(struct ice_hw *hw, struct ice_fdir_fltr *input, bool add);