src/dpdk/drivers/bus/vmbus/vmbus_bufring.c
int
vmbus_rxbr_peek(const struct vmbus_br *rbr, void *data, size_t dlen)
{
	uint32_t avail;

	/*
	 * The requested data and the 64bits channel packet
	 * offset should be there at least.
	 */
	avail = vmbus_br_availread(rbr);
	if (avail < dlen + sizeof(uint64_t))
		return -EAGAIN;

	vmbus_rxbr_copyfrom(rbr, rbr->vbr->rindex, data, dlen);
	return 0;
}
/* Copy data from receive ring but don't change index */
Copy data from receive ring but don't change index
Copy data from receive ring but don ' t change index
int
vmbus_rxbr_peek(const struct vmbus_br *rbr, void *data, size_t dlen)
{
	uint32_t avail;
	avail = vmbus_br_availread(rbr);
	if (avail < dlen + sizeof(uint64_t))
		return -EAGAIN;
	vmbus_rxbr_copyfrom(rbr, rbr->vbr->rindex, data, dlen);
	return 0;
}
int vmbus_rxbr_peek ( const struct vmbus_br * rbr , void * data , size_t dlen ) { uint32_t avail ; avail = vmbus_br_availread ( rbr ) ; if ( avail < dlen + sizeof ( uint64_t ) ) return - EAGAIN ; vmbus_rxbr_copyfrom ( rbr , rbr -> vbr -> rindex , data , dlen ) ; return 0 ; }
Copy data from receive ring but don't change index
Copy data from receive ring but don ' t change index
/*
	 * The requested data and the 64bits channel packet
	 * offset should be there at least.
	 */