src/dpdk/drivers/net/ionic/ionic_dev.c
int
ionic_adminq_post(struct ionic_lif *lif, struct ionic_admin_ctx *ctx)
{
	struct ionic_queue *adminq = &lif->adminqcq->q;
	struct ionic_admin_cmd *q_desc_base = adminq->base;
	struct ionic_admin_cmd *q_desc;
	int err = 0;

	rte_spinlock_lock(&lif->adminq_lock);

	if (ionic_q_space_avail(adminq) < 1) {
		err = -ENOSPC;
		goto err_out;
	}

	q_desc = &q_desc_base[adminq->head_idx];

	memcpy(q_desc, &ctx->cmd, sizeof(ctx->cmd));

	ionic_q_post(adminq, true, ionic_adminq_cb, ctx);

err_out:
	rte_spinlock_unlock(&lif->adminq_lock);

	return err;
}
/** ionic_adminq_post - Post an admin command.
 * @lif:		Handle to lif.
 * @cmd_ctx:		Api admin command context.
 *
 * Post the command to an admin queue in the ethernet driver.  If this command
 * succeeds, then the command has been posted, but that does not indicate a
 * completion.  If this command returns success, then the completion callback
 * will eventually be called.
 *
 * Return: zero or negative error status.
 */
Post an admin command.
@lif:                Handle to lif.
@cmd_ctx:            Api admin command context.

Post the command to an admin queue in the ethernet driver.  If this command
succeeds, then the command has been posted, but that does not indicate a
completion.  If this command returns success, then the completion callback
will eventually be called.

zero or negative error status.
Post an admin command . @lif : Handle to lif . @cmd_ctx : Api admin command context . Post the command to an admin queue in the ethernet driver . If this command succeeds then the command has been posted but that does not indicate a completion . If this command returns success then the completion callback will eventually be called . zero or negative error status .
int
ionic_adminq_post(struct ionic_lif *lif, struct ionic_admin_ctx *ctx)
{
	struct ionic_queue *adminq = &lif->adminqcq->q;
	struct ionic_admin_cmd *q_desc_base = adminq->base;
	struct ionic_admin_cmd *q_desc;
	int err = 0;
	rte_spinlock_lock(&lif->adminq_lock);
	if (ionic_q_space_avail(adminq) < 1) {
		err = -ENOSPC;
		goto err_out;
	}
	q_desc = &q_desc_base[adminq->head_idx];
	memcpy(q_desc, &ctx->cmd, sizeof(ctx->cmd));
	ionic_q_post(adminq, true, ionic_adminq_cb, ctx);
err_out:
	rte_spinlock_unlock(&lif->adminq_lock);
	return err;
}
int ionic_adminq_post ( struct ionic_lif * lif , struct ionic_admin_ctx * ctx ) { struct ionic_queue * adminq = & lif -> adminqcq -> q ; struct ionic_admin_cmd * q_desc_base = adminq -> base ; struct ionic_admin_cmd * q_desc ; int err = 0 ; rte_spinlock_lock ( & lif -> adminq_lock ) ; if ( ionic_q_space_avail ( adminq ) < 1 ) { err = - ENOSPC ; goto err_out ; } q_desc = & q_desc_base [ adminq -> head_idx ] ; memcpy ( q_desc , & ctx -> cmd , sizeof ( ctx -> cmd ) ) ; ionic_q_post ( adminq , true , ionic_adminq_cb , ctx ) ; err_out : rte_spinlock_unlock ( & lif -> adminq_lock ) ; return err ; }
ionic_adminq_post - Post an admin command.
ionic_adminq_post - Post an admin command .