X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fhns3%2Fhns3_tm.c;h=e1089b6bd0ceb8ee5e6e3e3136c1f97df4b454e3;hb=f5ed7d99cf45d550a69c1430b7c4a5623a9c774a;hp=db5ac786c736cbe5789f1399a841995c943a6554;hpb=5d5fde3d01c545695093187f49f38d6cd6c0a757;p=dpdk.git diff --git a/drivers/net/hns3/hns3_tm.c b/drivers/net/hns3/hns3_tm.c index db5ac786c7..e1089b6bd0 100644 --- a/drivers/net/hns3/hns3_tm.c +++ b/drivers/net/hns3/hns3_tm.c @@ -4,7 +4,7 @@ #include -#include "hns3_ethdev.h" +#include "hns3_common.h" #include "hns3_dcb.h" #include "hns3_logs.h" #include "hns3_tm.h" @@ -31,7 +31,7 @@ hns3_tm_conf_init(struct rte_eth_dev *dev) struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private); uint32_t max_tx_queues = hns3_tm_max_tx_queues_get(dev); - if (!hns3_dev_tm_supported(hw)) + if (!hns3_dev_get_support(hw, TM)) return; pf->tm_conf.nb_leaf_nodes_max = max_tx_queues; @@ -58,7 +58,7 @@ hns3_tm_conf_uninit(struct rte_eth_dev *dev) struct hns3_tm_shaper_profile *shaper_profile; struct hns3_tm_node *tm_node; - if (!hns3_dev_tm_supported(hw)) + if (!hns3_dev_get_support(hw, TM)) return; if (pf->tm_conf.nb_queue_node > 0) { @@ -1233,7 +1233,7 @@ hns3_tm_ops_get(struct rte_eth_dev *dev, void *arg) if (arg == NULL) return -EINVAL; - if (!hns3_dev_tm_supported(hw)) + if (!hns3_dev_get_support(hw, TM)) return -EOPNOTSUPP; *(const void **)arg = &hns3_tm_ops; @@ -1246,7 +1246,7 @@ hns3_tm_dev_start_proc(struct hns3_hw *hw) { struct hns3_pf *pf = HNS3_DEV_HW_TO_PF(hw); - if (!hns3_dev_tm_supported(hw)) + if (!hns3_dev_get_support(hw, TM)) return; if (pf->tm_conf.root && !pf->tm_conf.committed) @@ -1295,7 +1295,7 @@ hns3_tm_conf_update(struct hns3_hw *hw) struct hns3_pf *pf = HNS3_DEV_HW_TO_PF(hw); struct rte_tm_error error; - if (!hns3_dev_tm_supported(hw)) + if (!hns3_dev_get_support(hw, TM)) return 0; if (pf->tm_conf.root == NULL || !pf->tm_conf.committed)