__sync_or_and_fetch(addr, mask);
}
-static inline void
-vmbus_send_interrupt(const struct rte_vmbus_device *dev, uint32_t relid)
-{
- uint32_t *int_addr;
- uint32_t int_mask;
-
- int_addr = dev->int_page + relid / 32;
- int_mask = 1u << (relid % 32);
-
- vmbus_sync_set_bit(int_addr, int_mask);
-}
-
static inline void
vmbus_set_monitor(const struct rte_vmbus_device *dev, uint32_t monitor_id)
{
vmbus_set_event(const struct rte_vmbus_device *dev,
const struct vmbus_channel *chan)
{
- vmbus_send_interrupt(dev, chan->relid);
vmbus_set_monitor(dev, chan->monitor_id);
}
{
const struct vmbus_br *br = &channel->rxbr;
+ rte_smp_rmb();
return br->vbr->rindex == br->vbr->windex;
}
return;
/* Make sure reading of pending happens after new read index */
- rte_mb();
+ rte_smp_mb();
pending_sz = rbr->vbr->pending_send;
if (!pending_sz)
err = vmbus_chan_create(device, device->relid, 0,
device->monitor_id, new_chan);
- if (!err) {
+ if (!err)
device->primary = *new_chan;
- uio_res->primary = *new_chan;
- }
return err;
}