X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fhns3%2Fhns3_dcb.c;h=73693786d15bc00098c78ae0daee40205d0f6943;hb=f5ed7d99cf45d550a69c1430b7c4a5623a9c774a;hp=3d0159d787787ca8af477e52c31e87bd5ff685aa;hpb=295968d1740760337e16b0d7914875c5cac52850;p=dpdk.git diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c index 3d0159d787..73693786d1 100644 --- 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) * - * @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, @@ -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] = { - 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 */ }; @@ -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) { - 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 @@ -1532,7 +1522,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns) 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; } @@ -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 * - * 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)