src/dpdk/drivers/net/hns3/hns3_rxtx.c
int
hns3_init_queues(struct hns3_adapter *hns, bool reset_queue)
{
	struct hns3_hw *hw = &hns->hw;
	int ret;

	if (reset_queue) {
		ret = hns3_reset_all_tqps(hns);
		if (ret) {
			hns3_err(hw, "failed to reset all queues, ret = %d.",
				 ret);
			return ret;
		}
	}

	ret = hns3_init_rx_queues(hns);
	if (ret) {
		hns3_err(hw, "failed to init rx queues, ret = %d.", ret);
		return ret;
	}

	ret = hns3_init_tx_queues(hns);
	if (ret) {
		hns3_dev_release_mbufs(hns);
		hns3_err(hw, "failed to init tx queues, ret = %d.", ret);
	}

	return ret;
}
/*
 * Init all queues.
 * Note: just init and setup queues, and don't enable tqps.
 */
Init all queues.
Note: just init and setup queues, and don't enable tqps.
Init all queues . Note : just init and setup queues and don ' t enable tqps .
int
hns3_init_queues(struct hns3_adapter *hns, bool reset_queue)
{
	struct hns3_hw *hw = &hns->hw;
	int ret;
	if (reset_queue) {
		ret = hns3_reset_all_tqps(hns);
		if (ret) {
			hns3_err(hw, "failed to reset all queues, ret = %d.",
				 ret);
			return ret;
		}
	}
	ret = hns3_init_rx_queues(hns);
	if (ret) {
		hns3_err(hw, "failed to init rx queues, ret = %d.", ret);
		return ret;
	}
	ret = hns3_init_tx_queues(hns);
	if (ret) {
		hns3_dev_release_mbufs(hns);
		hns3_err(hw, "failed to init tx queues, ret = %d.", ret);
	}
	return ret;
}
int hns3_init_queues ( struct hns3_adapter * hns , bool reset_queue ) { struct hns3_hw * hw = & hns -> hw ; int ret ; if ( reset_queue ) { ret = hns3_reset_all_tqps ( hns ) ; if ( ret ) { hns3_err ( hw , " " , ret ) ; return ret ; } } ret = hns3_init_rx_queues ( hns ) ; if ( ret ) { hns3_err ( hw , " " , ret ) ; return ret ; } ret = hns3_init_tx_queues ( hns ) ; if ( ret ) { hns3_dev_release_mbufs ( hns ) ; hns3_err ( hw , " " , ret ) ; } return ret ; }
Init all queues.
Init all queues .