From: Lijun Ou Date: Fri, 22 Jan 2021 10:18:48 +0000 (+0800) Subject: net/hns3: rename RSS functions X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a39e67ffa05bec4605d888a6577489c80c1ff633;p=dpdk.git net/hns3: rename RSS functions Rename some function about RSS implement functions in order to make the functions naming style more reasonable and consistency. Signed-off-by: Lijun Ou --- diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 58d4f27530..d9dd8e1622 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -4685,7 +4685,7 @@ hns3_init_pf(struct rte_eth_dev *eth_dev) goto err_fdir; } - hns3_set_default_rss_args(hw); + hns3_rss_set_default_args(hw); ret = hns3_enable_hw_error_intr(hns, true); if (ret) { diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index 5bf8c2e8fd..0ee06bf6ed 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -1832,7 +1832,7 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev) if (ret) goto err_set_tc_queue; - hns3_set_default_rss_args(hw); + hns3_rss_set_default_args(hw); return 0; diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 9b161f440a..8a5179d6e0 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1469,7 +1469,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) if (ret) return ret; - ret = hns3_set_rss_algo_key(hw, rss_config->key); + ret = hns3_rss_set_algo_key(hw, rss_config->key); if (ret) return ret; diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index b5df374cc0..7d1a29782a 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -193,7 +193,7 @@ static const struct { * Used to set algorithm, key_offset and hash key of rss. */ int -hns3_set_rss_algo_key(struct hns3_hw *hw, const uint8_t *key) +hns3_rss_set_algo_key(struct hns3_hw *hw, const uint8_t *key) { #define HNS3_KEY_OFFSET_MAX 3 #define HNS3_SET_HASH_KEY_BYTE_FOUR 2 @@ -245,7 +245,7 @@ hns3_set_rss_algo_key(struct hns3_hw *hw, const uint8_t *key) * Used to configure the tuple selection for RSS hash input. */ static int -hns3_set_rss_input_tuple(struct hns3_hw *hw) +hns3_rss_set_input_tuple(struct hns3_hw *hw) { struct hns3_rss_conf *rss_config = &hw->rss_info; struct hns3_rss_input_tuple_cmd *req; @@ -443,7 +443,7 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev, ret = -EINVAL; goto conf_err; } - ret = hns3_set_rss_algo_key(hw, key); + ret = hns3_rss_set_algo_key(hw, key); if (ret) goto conf_err; } @@ -649,7 +649,7 @@ hns3_rss_tuple_uninit(struct hns3_hw *hw) * Set the default rss configuration in the init of driver. */ void -hns3_set_default_rss_args(struct hns3_hw *hw) +hns3_rss_set_default_args(struct hns3_hw *hw) { struct hns3_rss_conf *rss_cfg = &hw->rss_info; uint16_t queue_num = hw->alloc_rss_size; @@ -696,12 +696,12 @@ hns3_config_rss(struct hns3_adapter *hns) hns3_rss_uninit(hns); /* Configure RSS hash algorithm and hash key offset */ - ret = hns3_set_rss_algo_key(hw, hash_key); + ret = hns3_rss_set_algo_key(hw, hash_key); if (ret) return ret; /* Configure the tuple selection for RSS hash input */ - ret = hns3_set_rss_input_tuple(hw); + ret = hns3_rss_set_input_tuple(hw); if (ret) return ret; diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h index 6d1d25f227..05d5c2642b 100644 --- a/drivers/net/hns3/hns3_rss.h +++ b/drivers/net/hns3/hns3_rss.h @@ -102,7 +102,7 @@ int hns3_dev_rss_reta_update(struct rte_eth_dev *dev, int hns3_dev_rss_reta_query(struct rte_eth_dev *dev, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size); -void hns3_set_default_rss_args(struct hns3_hw *hw); +void hns3_rss_set_default_args(struct hns3_hw *hw); int hns3_set_rss_indir_table(struct hns3_hw *hw, uint16_t *indir, uint16_t size); int hns3_rss_reset_indir_table(struct hns3_hw *hw); @@ -111,7 +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, const uint8_t *key); +int hns3_rss_set_algo_key(struct hns3_hw *hw, const uint8_t *key); int hns3_restore_rss_filter(struct rte_eth_dev *dev); #endif /* _HNS3_RSS_H_ */