git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/hns3: extract common function to obtain revision ID
[dpdk.git]
/
drivers
/
net
/
hns3
/
hns3_dcb.c
diff --git
a/drivers/net/hns3/hns3_dcb.c
b/drivers/net/hns3/hns3_dcb.c
index
3d0159d
..
7369378
100644
(file)
--- a/
drivers/net/hns3/hns3_dcb.c
+++ b/
drivers/net/hns3/hns3_dcb.c
@@
-25,7
+25,7
@@
* IR(Mbps) = ------------------------- * CLOCK(1000Mbps)
* Tick * (2 ^ IR_s)
*
* IR(Mbps) = ------------------------- * CLOCK(1000Mbps)
* Tick * (2 ^ IR_s)
*
- * @return: 0: calculate sucessful, negative: fail
+ * @return: 0: calculate suc
c
essful, negative: fail
*/
static int
hns3_shaper_para_calc(struct hns3_hw *hw, uint32_t ir, uint8_t shaper_level,
*/
static int
hns3_shaper_para_calc(struct hns3_hw *hw, uint32_t ir, uint8_t shaper_level,
@@
-36,8
+36,8
@@
hns3_shaper_para_calc(struct hns3_hw *hw, uint32_t ir, uint8_t shaper_level,
#define DIVISOR_IR_B_126 (126 * DIVISOR_CLK)
const uint16_t tick_array[HNS3_SHAPER_LVL_CNT] = {
#define DIVISOR_IR_B_126 (126 * DIVISOR_CLK)
const uint16_t tick_array[HNS3_SHAPER_LVL_CNT] = {
- 6 * 256, /* Prioriy level */
- 6 * 32, /* Prioriy group level */
+ 6 * 256, /* Priori
t
y level */
+ 6 * 32, /* Priori
t
y group level */
6 * 8, /* Port level */
6 * 256 /* Qset level */
};
6 * 8, /* Port level */
6 * 256 /* Qset level */
};
@@
-750,19
+750,9
@@
static int
hns3_dcb_update_tc_queue_mapping(struct hns3_hw *hw, uint16_t nb_rx_q,
uint16_t nb_tx_q)
{
hns3_dcb_update_tc_queue_mapping(struct hns3_hw *hw, uint16_t nb_rx_q,
uint16_t nb_tx_q)
{
- struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
- struct hns3_pf *pf = &hns->pf;
- int ret;
-
hw->num_tc = hw->dcb_info.num_tc;
hw->num_tc = hw->dcb_info.num_tc;
- ret = hns3_queue_to_tc_mapping(hw, nb_rx_q, nb_tx_q);
- if (ret)
- return ret;
- if (!hns->is_vf)
- memcpy(pf->prio_tc, hw->dcb_info.prio_tc, HNS3_MAX_USER_PRIO);
-
- return 0;
+ return hns3_queue_to_tc_mapping(hw, nb_rx_q, nb_tx_q);
}
int
}
int
@@
-1532,7
+1522,7
@@
hns3_dcb_hw_configure(struct hns3_adapter *hns)
ret = hns3_dcb_schd_setup_hw(hw);
if (ret) {
ret = hns3_dcb_schd_setup_hw(hw);
if (ret) {
- hns3_err(hw, "dcb schdule configure failed! ret = %d", ret);
+ hns3_err(hw, "dcb sch
e
dule configure failed! ret = %d", ret);
return ret;
}
return ret;
}
@@
-1737,7
+1727,7
@@
hns3_get_fc_mode(struct hns3_hw *hw, enum rte_eth_fc_mode mode)
* hns3_dcb_pfc_enable - Enable priority flow control
* @dev: pointer to ethernet device
*
* hns3_dcb_pfc_enable - Enable priority flow control
* @dev: pointer to ethernet device
*
- * Configures the pfc settings for one p
or
ority.
+ * Configures the pfc settings for one p
ri
ority.
*/
int
hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
*/
int
hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)