#include <rte_malloc.h>
-#include "hns3_ethdev.h"
+#include "hns3_common.h"
#include "hns3_dcb.h"
#include "hns3_logs.h"
#include "hns3_tm.h"
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;
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) {
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_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_wfq_n_children_per_group_max = 0;
- cap->sched_wfq_n_groups_max = 0;
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->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;
}
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;
{
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)
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)