src/dpdk/drivers/bus/vmbus/vmbus_bufring.c
static inline bool
vmbus_txbr_need_signal(const struct vmbus_bufring *vbr, uint32_t old_windex)
{
	rte_smp_mb();
	if (vbr->imask)
		return false;

	rte_smp_rmb();

	/*
	 * This is the only case we need to signal when the
	 * ring transitions from being empty to non-empty.
	 */
	return old_windex == vbr->rindex;
}
/*
 * When we write to the ring buffer, check if the host needs to be
 * signaled.
 *
 * The contract:
 * - The host guarantees that while it is draining the TX bufring,
 *   it will set the br_imask to indicate it does not need to be
 *   interrupted when new data are added.
 * - The host guarantees that it will completely drain the TX bufring
 *   before exiting the read loop.  Further, once the TX bufring is
 *   empty, it will clear the br_imask and re-check to see if new
 *   data have arrived.
 */
When we write to the ring buffer, check if the host needs to be
signaled.

The contract:
- The host guarantees that while it is draining the TX bufring,
it will set the br_imask to indicate it does not need to be
interrupted when new data are added.
- The host guarantees that it will completely drain the TX bufring
before exiting the read loop.  Further, once the TX bufring is
empty, it will clear the br_imask and re-check to see if new
data have arrived.
When we write to the ring buffer check if the host needs to be signaled . The contract : - The host guarantees that while it is draining the TX bufring it will set the br_imask to indicate it does not need to be interrupted when new data are added . - The host guarantees that it will completely drain the TX bufring before exiting the read loop . Further once the TX bufring is empty it will clear the br_imask and re - check to see if new data have arrived .
static inline bool
vmbus_txbr_need_signal(const struct vmbus_bufring *vbr, uint32_t old_windex)
{
	rte_smp_mb();
	if (vbr->imask)
		return false;
	rte_smp_rmb();
	return old_windex == vbr->rindex;
}
static inline bool vmbus_txbr_need_signal ( const struct vmbus_bufring * vbr , uint32_t old_windex ) { rte_smp_mb ( ) ; if ( vbr -> imask ) return false ; rte_smp_rmb ( ) ; return old_windex == vbr -> rindex ; }
When we write to the ring buffer, check if the host needs to be
 signaled.
When we write to the ring buffer check if the host needs to be signaled .
/*
	 * This is the only case we need to signal when the
	 * ring transitions from being empty to non-empty.
	 */