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: fix mailbox wait time
[dpdk.git]
/
drivers
/
net
/
hns3
/
hns3_tm.c
diff --git
a/drivers/net/hns3/hns3_tm.c
b/drivers/net/hns3/hns3_tm.c
index
7fd9818
..
e1089b6
100644
(file)
--- a/
drivers/net/hns3/hns3_tm.c
+++ b/
drivers/net/hns3/hns3_tm.c
@@
-4,7
+4,7
@@
#include <rte_malloc.h>
#include <rte_malloc.h>
-#include "hns3_
ethdev
.h"
+#include "hns3_
common
.h"
#include "hns3_dcb.h"
#include "hns3_logs.h"
#include "hns3_tm.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);
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;
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;
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) {
return;
if (pf->tm_conf.nb_queue_node > 0) {
@@
-134,33
+134,15
@@
hns3_tm_capabilities_get(struct rte_eth_dev *dev,
cap->leaf_nodes_identical = 1;
cap->shaper_n_max = 1 + HNS3_MAX_TC_NUM;
cap->shaper_private_n_max = 1 + HNS3_MAX_TC_NUM;
cap->leaf_nodes_identical = 1;
cap->shaper_n_max = 1 + HNS3_MAX_TC_NUM;
cap->shaper_private_n_max = 1 + HNS3_MAX_TC_NUM;
- cap->shaper_private_dual_rate_n_max = 0;
- cap->shaper_private_rate_min = 0;
cap->shaper_private_rate_max =
hns3_tm_rate_convert_firmware2tm(hw->max_tm_rate);
cap->shaper_private_rate_max =
hns3_tm_rate_convert_firmware2tm(hw->max_tm_rate);
- cap->shaper_shared_n_max = 0;
- cap->shaper_shared_n_nodes_per_shaper_max = 0;
- cap->shaper_shared_n_shapers_per_node_max = 0;
- cap->shaper_shared_dual_rate_n_max = 0;
- cap->shaper_shared_rate_min = 0;
- cap->shaper_shared_rate_max = 0;
cap->sched_n_children_max = max_tx_queues;
cap->sched_sp_n_priorities_max = 1;
cap->sched_n_children_max = max_tx_queues;
cap->sched_sp_n_priorities_max = 1;
- cap->sched_wfq_n_children_per_group_max = 0;
- cap->sched_wfq_n_groups_max = 0;
cap->sched_wfq_weight_max = 1;
cap->sched_wfq_weight_max = 1;
- cap->cman_head_drop_supported = 0;
- cap->dynamic_update_mask = 0;
cap->shaper_pkt_length_adjust_min = RTE_TM_ETH_FRAMING_OVERHEAD;
cap->shaper_pkt_length_adjust_max = RTE_TM_ETH_FRAMING_OVERHEAD_FCS;
cap->shaper_pkt_length_adjust_min = RTE_TM_ETH_FRAMING_OVERHEAD;
cap->shaper_pkt_length_adjust_max = RTE_TM_ETH_FRAMING_OVERHEAD_FCS;
- cap->cman_wred_context_n_max = 0;
- cap->cman_wred_context_private_n_max = 0;
- cap->cman_wred_context_shared_n_max = 0;
- cap->cman_wred_context_shared_n_nodes_per_context_max = 0;
- cap->cman_wred_context_shared_n_contexts_per_node_max = 0;
- cap->stats_mask = 0;
return 0;
}
return 0;
}
@@
-1251,7
+1233,7
@@
hns3_tm_ops_get(struct rte_eth_dev *dev, void *arg)
if (arg == NULL)
return -EINVAL;
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;
return -EOPNOTSUPP;
*(const void **)arg = &hns3_tm_ops;
@@
-1264,7
+1246,7
@@
hns3_tm_dev_start_proc(struct hns3_hw *hw)
{
struct hns3_pf *pf = HNS3_DEV_HW_TO_PF(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)
return;
if (pf->tm_conf.root && !pf->tm_conf.committed)
@@
-1313,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;
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)
return 0;
if (pf->tm_conf.root == NULL || !pf->tm_conf.committed)