X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fnet%2Fhns3%2Fhns3_rss.h;h=df5bba6894dd89760edf84c7ec62c5b37b5b76d3;hb=8c7449779c4526d27205043560a21f0e2c2f622b;hp=7ffc151314264acc58cbe4a1c754213d9c36ccdf;hpb=c37ca66f2b27473b31de12d3dff66808753949ca;p=dpdk.git diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h index 7ffc151314..df5bba6894 100644 --- a/drivers/net/hns3/hns3_rss.h +++ b/drivers/net/hns3/hns3_rss.h @@ -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_ */