return -EIO;
}
+ if (hw->tm_conf.root && !hw->tm_conf.committed) {
+ PMD_DRV_LOG(ERR,
+ "please call hierarchy_commit() before starting the port");
+ return -EIO;
+ }
+
ad->pf.adapter_stopped = 0;
hw->num_queue_pairs = RTE_MAX(dev->data->nb_rx_queues,
struct ice_dcf_adapter *dcf_ad = dev->data->dev_private;
struct rte_intr_handle *intr_handle = dev->intr_handle;
struct ice_adapter *ad = &dcf_ad->parent;
+ struct ice_dcf_hw *hw = &dcf_ad->real_hw;
if (ad->pf.adapter_stopped == 1) {
PMD_DRV_LOG(DEBUG, "Port is already stopped");
ice_dcf_add_del_all_mac_addr(&dcf_ad->real_hw, false);
dev->data->dev_link.link_status = ETH_LINK_DOWN;
ad->pf.adapter_stopped = 1;
+ hw->tm_conf.committed = false;
return 0;
}
uint8_t num_elem = 0;
int i, ret_val;
+ /* check if port is stopped */
+ if (!adapter->parent.pf.adapter_stopped) {
+ PMD_DRV_LOG(ERR, "Please stop port first");
+ ret_val = ICE_ERR_NOT_READY;
+ goto err;
+ }
+
ret_val = ice_dcf_commit_check(hw);
if (ret_val)
goto fail_clear;
ice_dcf_tm_conf_uninit(dev);
ice_dcf_tm_conf_init(dev);
}
+err:
return ret_val;
}