net/hns3: decrease non-nearby memory access in Rx
[dpdk.git] / drivers / net / hns3 / hns3_rss.h
index 7ffc151..df5bba6 100644 (file)
@@ -27,7 +27,7 @@
 
 #define HNS3_RSS_HASH_ALGO_TOEPLITZ    0
 #define HNS3_RSS_HASH_ALGO_SIMPLE      1
-#define HNS3_RSS_HASH_ALGO_SYMMETRIC   2
+#define HNS3_RSS_HASH_ALGO_SYMMETRIC_TOEP 2
 #define HNS3_RSS_HASH_ALGO_MASK                0xf
 
 #define HNS3_RSS_INPUT_TUPLE_OTHER     GENMASK(3, 0)
@@ -50,21 +50,13 @@ struct hns3_rss_tuple_cfg {
 struct hns3_rss_conf {
        /* RSS parameters :algorithm, flow_types,  key, queue */
        struct rte_flow_action_rss conf;
+       uint8_t hash_algo; /* hash function type definited by hardware */
        uint8_t key[HNS3_RSS_KEY_SIZE];  /* Hash key */
        struct hns3_rss_tuple_cfg rss_tuple_sets;
        uint8_t rss_indirection_tbl[HNS3_RSS_IND_TBL_SIZE]; /* Shadow table */
        uint16_t queue[HNS3_RSS_QUEUES_BUFFER_NUM]; /* Queues indices to use */
 };
 
-/* Bit 8 ~Bit 15 */
-#define HNS3_INSET_IPV4_SRC        0x00000100UL
-#define HNS3_INSET_IPV4_DST        0x00000200UL
-#define HNS3_INSET_IPV6_SRC        0x00000400UL
-#define HNS3_INSET_IPV6_DST        0x00000800UL
-#define HNS3_INSET_SRC_PORT        0x00001000UL
-#define HNS3_INSET_DST_PORT        0x00002000UL
-#define HNS3_INSET_SCTP_VT         0x00004000UL
-
 #ifndef ilog2
 static inline int rss_ilog2(uint32_t x)
 {
@@ -119,6 +111,7 @@ void hns3_rss_uninit(struct hns3_adapter *hns);
 int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw,
                                 struct hns3_rss_tuple_cfg *tuple,
                                 uint64_t rss_hf);
-int hns3_set_rss_algo_key(struct hns3_hw *hw, uint8_t hash_algo,
-                         const uint8_t *key);
+int hns3_set_rss_algo_key(struct hns3_hw *hw, const uint8_t *key);
+int hns3_restore_rss_filter(struct rte_eth_dev *dev);
+
 #endif /* _HNS3_RSS_H_ */