MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ice_hierarchy_commit

Function ice_hierarchy_commit

dpdk/drivers/net/ice/ice_tm.c:692–874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

690}
691
692static int ice_hierarchy_commit(struct rte_eth_dev *dev,
693 int clear_on_fail,
694 __rte_unused struct rte_tm_error *error)
695{
696 struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
697 struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
698 struct ice_tm_node_list *qgroup_list = &pf->tm_conf.qgroup_list;
699 struct ice_tm_node_list *queue_list = &pf->tm_conf.queue_list;
700 struct ice_tm_node *tm_node;
701 struct ice_sched_node *node;
702 struct ice_sched_node *vsi_node;
703 struct ice_sched_node *queue_node;
704 struct ice_tx_queue *txq;
705 struct ice_vsi *vsi;
706 int ret_val = ICE_SUCCESS;
707 uint64_t peak = 0;
708 uint64_t committed = 0;
709 uint8_t priority;
710 uint32_t i;
711 uint32_t idx_vsi_child;
712 uint32_t idx_qg;
713 uint32_t nb_vsi_child;
714 uint32_t nb_qg;
715 uint32_t qid;
716 uint32_t q_teid;
717 uint32_t vsi_layer;
718
719 for (i = 0; i < dev->data->nb_tx_queues; i++) {
720 ret_val = ice_tx_queue_stop(dev, i);
721 if (ret_val) {
722 error->type = RTE_TM_ERROR_TYPE_UNSPECIFIED;
723 PMD_DRV_LOG(ERR, "stop queue %u failed", i);
724 goto fail_clear;
725 }
726 }
727
728 node = hw->port_info->root;
729 vsi_layer = hw->num_tx_sched_layers - ICE_VSI_LAYER_OFFSET;
730 for (i = 0; i < vsi_layer; i++)
731 node = node->children[0];
732 vsi_node = node;
733 nb_vsi_child = vsi_node->num_children;
734 nb_qg = vsi_node->children[0]->num_children;
735
736 idx_vsi_child = 0;
737 idx_qg = 0;
738
739 TAILQ_FOREACH(tm_node, qgroup_list, node) {
740 struct ice_tm_node *tm_child_node;
741 struct ice_sched_node *qgroup_sched_node =
742 vsi_node->children[idx_vsi_child]->children[idx_qg];
743
744 for (i = 0; i < tm_node->reference_count; i++) {
745 tm_child_node = tm_node->children[i];
746 qid = tm_child_node->id;
747 ret_val = ice_tx_queue_start(dev, qid);
748 if (ret_val) {
749 error->type = RTE_TM_ERROR_TYPE_UNSPECIFIED;

Callers

nothing calls this directly

Calls 11

ice_tx_queue_stopFunction · 0.85
ice_tx_queue_startFunction · 0.85
ice_sched_get_nodeFunction · 0.85
ice_move_recfg_lan_txqFunction · 0.85
ice_cfg_q_bw_lmtFunction · 0.85
ice_cfg_vsi_q_priorityFunction · 0.85
ice_cfg_q_bw_allocFunction · 0.85
ice_tm_conf_uninitFunction · 0.85
ice_tm_conf_initFunction · 0.85

Tested by

no test coverage detected