net/ice/base: add profile validation on switch filter
[dpdk.git] / drivers / net / ice / base / ice_flow.h
index 371d960..f941ce4 100644 (file)
 #define ICE_FLOW_HASH_NAT_T_ESP_IPV6_SPI \
        (ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_NAT_T_ESP_SPI)
 
+#define ICE_FLOW_FIELD_IPV4_SRC_OFFSET 12
+#define ICE_FLOW_FIELD_IPV4_DST_OFFSET 16
+#define ICE_FLOW_FIELD_IPV6_SRC_OFFSET 8
+#define ICE_FLOW_FIELD_IPV6_DST_OFFSET 24
+#define ICE_FLOW_FIELD_SRC_PORT_OFFSET 0
+#define ICE_FLOW_FIELD_DST_PORT_OFFSET 2
+
 /* Protocol header fields within a packet segment. A segment consists of one or
  * more protocol headers that make up a logical group of protocol headers. Each
  * logical group of protocol headers encapsulates or is encapsulated using/by
@@ -493,11 +500,18 @@ struct ice_flow_prof {
        struct ice_flow_action *acts;
 };
 
+struct ice_rss_raw_cfg {
+       struct ice_parser_profile prof;
+       bool raw_ena;
+       bool symm;
+};
+
 struct ice_rss_cfg {
        struct LIST_ENTRY_TYPE l_entry;
        /* bitmap of VSIs added to the RSS entry */
        ice_declare_bitmap(vsis, ICE_MAX_VSI);
        struct ice_rss_hash_cfg hash;
+       struct ice_rss_raw_cfg raw;
 };
 
 enum ice_flow_action_type {
@@ -548,6 +562,10 @@ enum ice_status
 ice_flow_assoc_vsig_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi_handle,
                        u16 vsig);
 enum ice_status
+ice_flow_set_hw_prof(struct ice_hw *hw, u16 dest_vsi_handle,
+                    u16 fdir_vsi_handle, struct ice_parser_profile *prof,
+                    enum ice_block blk);
+enum ice_status
 ice_flow_get_hw_prof(struct ice_hw *hw, enum ice_block blk, u64 prof_id,
                     u8 *hw_prof);
 
@@ -581,5 +599,7 @@ ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle,
 enum ice_status
 ice_rem_rss_cfg(struct ice_hw *hw, u16 vsi_handle,
                const struct ice_rss_hash_cfg *cfg);
+void ice_rss_update_raw_symm(struct ice_hw *hw,
+                            struct ice_rss_raw_cfg *cfg, u64 id);
 u64 ice_get_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u32 hdrs);
 #endif /* _ICE_FLOW_H_ */