src/dpdk/drivers/net/ice/base/ice_common.c
enum ice_status
ice_aq_add_lan_txq(struct ice_hw *hw, u8 num_qgrps,
		   struct ice_aqc_add_tx_qgrp *qg_list, u16 buf_size,
		   struct ice_sq_cd *cd)
{
	struct ice_aqc_add_tx_qgrp *list;
	struct ice_aqc_add_txqs *cmd;
	struct ice_aq_desc desc;
	u16 i, sum_size = 0;

	ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__);

	cmd = &desc.params.add_txqs;

	ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_add_txqs);

	if (!qg_list)
		return ICE_ERR_PARAM;

	if (num_qgrps > ICE_LAN_TXQ_MAX_QGRPS)
		return ICE_ERR_PARAM;

	for (i = 0, list = qg_list; i < num_qgrps; i++) {
		sum_size += ice_struct_size(list, txqs, list->num_txqs);
		list = (struct ice_aqc_add_tx_qgrp *)(list->txqs +
						      list->num_txqs);
	}

	if (buf_size != sum_size)
		return ICE_ERR_PARAM;

	desc.flags |= CPU_TO_LE16(ICE_AQ_FLAG_RD);

	cmd->num_qgrps = num_qgrps;

	return ice_aq_send_cmd(hw, &desc, qg_list, buf_size, cd);
}
/**
 * ice_aq_add_lan_txq
 * @hw: pointer to the hardware structure
 * @num_qgrps: Number of added queue groups
 * @qg_list: list of queue groups to be added
 * @buf_size: size of buffer for indirect command
 * @cd: pointer to command details structure or NULL
 *
 * Add Tx LAN queue (0x0C30)
 *
 * NOTE:
 * Prior to calling add Tx LAN queue:
 * Initialize the following as part of the Tx queue context:
 * Completion queue ID if the queue uses Completion queue, Quanta profile,
 * Cache profile and Packet shaper profile.
 *
 * After add Tx LAN queue AQ command is completed:
 * Interrupts should be associated with specific queues,
 * Association of Tx queue to Doorbell queue is not part of Add LAN Tx queue
 * flow.
 */


Add Tx LAN queue (0x0C30)

Prior to calling add Tx LAN queue:
Initialize the following as part of the Tx queue context:
Completion queue ID if the queue uses Completion queue, Quanta profile,
Cache profile and Packet shaper profile.

After add Tx LAN queue AQ command is completed:
Interrupts should be associated with specific queues,
Association of Tx queue to Doorbell queue is not part of Add LAN Tx queue
flow.
Add Tx LAN queue ( 0x0C30 ) Prior to calling add Tx LAN queue : Initialize the following as part of the Tx queue context : Completion queue ID if the queue uses Completion queue Quanta profile Cache profile and Packet shaper profile . After add Tx LAN queue AQ command is completed : Interrupts should be associated with specific queues Association of Tx queue to Doorbell queue is not part of Add LAN Tx queue flow .
enum ice_status
ice_aq_add_lan_txq(struct ice_hw *hw, u8 num_qgrps,
		   struct ice_aqc_add_tx_qgrp *qg_list, u16 buf_size,
		   struct ice_sq_cd *cd)
{
	struct ice_aqc_add_tx_qgrp *list;
	struct ice_aqc_add_txqs *cmd;
	struct ice_aq_desc desc;
	u16 i, sum_size = 0;
	ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__);
	cmd = &desc.params.add_txqs;
	ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_add_txqs);
	if (!qg_list)
		return ICE_ERR_PARAM;
	if (num_qgrps > ICE_LAN_TXQ_MAX_QGRPS)
		return ICE_ERR_PARAM;
	for (i = 0, list = qg_list; i < num_qgrps; i++) {
		sum_size += ice_struct_size(list, txqs, list->num_txqs);
		list = (struct ice_aqc_add_tx_qgrp *)(list->txqs +
						      list->num_txqs);
	}
	if (buf_size != sum_size)
		return ICE_ERR_PARAM;
	desc.flags |= CPU_TO_LE16(ICE_AQ_FLAG_RD);
	cmd->num_qgrps = num_qgrps;
	return ice_aq_send_cmd(hw, &desc, qg_list, buf_size, cd);
}
enum ice_status ice_aq_add_lan_txq ( struct ice_hw * hw , u8 num_qgrps , struct ice_aqc_add_tx_qgrp * qg_list , u16 buf_size , struct ice_sq_cd * cd ) { struct ice_aqc_add_tx_qgrp * list ; struct ice_aqc_add_txqs * cmd ; struct ice_aq_desc desc ; u16 i , sum_size = 0 ; ice_debug ( hw , ICE_DBG_TRACE , " \n " , __func__ ) ; cmd = & desc . params . add_txqs ; ice_fill_dflt_direct_cmd_desc ( & desc , ice_aqc_opc_add_txqs ) ; if ( ! qg_list ) return ICE_ERR_PARAM ; if ( num_qgrps > ICE_LAN_TXQ_MAX_QGRPS ) return ICE_ERR_PARAM ; for ( i = 0 , list = qg_list ; i < num_qgrps ; i ++ ) { sum_size += ice_struct_size ( list , txqs , list -> num_txqs ) ; list = ( struct ice_aqc_add_tx_qgrp * ) ( list -> txqs + list -> num_txqs ) ; } if ( buf_size != sum_size ) return ICE_ERR_PARAM ; desc . flags |= CPU_TO_LE16 ( ICE_AQ_FLAG_RD ) ; cmd -> num_qgrps = num_qgrps ; return ice_aq_send_cmd ( hw , & desc , qg_list , buf_size , cd ) ; }
ice_aq_add_lan_txq
 @hw: pointer to the hardware structure
 @num_qgrps: Number of added queue groups
 @qg_list: list of queue groups to be added
 @buf_size: size of buffer for indirect command
 @cd: pointer to command details structure or NULL
ice_aq_add_lan_txq @hw : pointer to the hardware structure @num_qgrps : Number of added queue groups @qg_list : list of queue groups to be added @buf_size : size of buffer for indirect command @cd : pointer to command details structure or NULL