src/dpdk/drivers/net/ena/base/ena_eth_com.h
static inline bool ena_com_sq_have_enough_space(struct ena_com_io_sq *io_sq,
						u16 required_buffers)
{
	int temp;

	if (io_sq->mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_HOST)
		return ena_com_free_q_entries(io_sq) >= required_buffers;

	/* This calculation doesn't need to be 100% accurate. So to reduce
	 * the calculation overhead just Subtract 2 lines from the free descs
	 * (one for the header line and one to compensate the devision
	 * down calculation.
	 */
	temp = required_buffers / io_sq->llq_info.descs_per_entry + 2;

	return ena_com_free_q_entries(io_sq) > temp;
}
/* Check if the submission queue has enough space to hold required_buffers */
Check if the submission queue has enough space to hold required_buffers
Check if the submission queue has enough space to hold required_buffers
static inline bool ena_com_sq_have_enough_space(struct ena_com_io_sq *io_sq,
						u16 required_buffers)
{
	int temp;
	if (io_sq->mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_HOST)
		return ena_com_free_q_entries(io_sq) >= required_buffers;
	temp = required_buffers / io_sq->llq_info.descs_per_entry + 2;
	return ena_com_free_q_entries(io_sq) > temp;
}
static inline bool ena_com_sq_have_enough_space ( struct ena_com_io_sq * io_sq , u16 required_buffers ) { int temp ; if ( io_sq -> mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_HOST ) return ena_com_free_q_entries ( io_sq ) >= required_buffers ; temp = required_buffers / io_sq -> llq_info . descs_per_entry + 2 ; return ena_com_free_q_entries ( io_sq ) > temp ; }
Check if the submission queue has enough space to hold required_buffers
Check if the submission queue has enough space to hold required_buffers
/* This calculation doesn't need to be 100% accurate. So to reduce
	 * the calculation overhead just Subtract 2 lines from the free descs
	 * (one for the header line and one to compensate the devision
	 * down calculation.
	 */