* IR(Mbps) = ------------------------- * CLOCK(1000Mbps)
* Tick * (2 ^ IR_s)
*
- * @return: 0: calculate sucessful, negative: fail
+ * @return: 0: calculate successful, negative: fail
*/
static int
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] = {
- 6 * 256, /* Prioriy level */
- 6 * 32, /* Prioriy group level */
+ 6 * 256, /* Priority level */
+ 6 * 32, /* Priority group level */
6 * 8, /* Port level */
6 * 256 /* Qset level */
};
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;
- 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
ret = hns3_dcb_schd_setup_hw(hw);
if (ret) {
- hns3_err(hw, "dcb schdule configure failed! ret = %d", ret);
+ hns3_err(hw, "dcb schedule configure failed! ret = %d", ret);
return ret;
}
* hns3_dcb_pfc_enable - Enable priority flow control
* @dev: pointer to ethernet device
*
- * Configures the pfc settings for one porority.
+ * Configures the pfc settings for one priority.
*/
int
hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)