MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vhost_async_channel_register

Function vhost_async_channel_register

dpdk/examples/vhost/main.c:1677–1695  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1675}
1676
1677static inline int
1678vhost_async_channel_register(int vid)
1679{
1680 int rx_ret = 0, tx_ret = 0;
1681
1682 if (dma_bind[vid2socketid[vid]].dmas[VIRTIO_RXQ].dev_id != INVALID_DMA_ID) {
1683 rx_ret = rte_vhost_async_channel_register(vid, VIRTIO_RXQ);
1684 if (rx_ret == 0)
1685 dma_bind[vid2socketid[vid]].dmas[VIRTIO_RXQ].async_enabled = true;
1686 }
1687
1688 if (dma_bind[vid2socketid[vid]].dmas[VIRTIO_TXQ].dev_id != INVALID_DMA_ID) {
1689 tx_ret = rte_vhost_async_channel_register(vid, VIRTIO_TXQ);
1690 if (tx_ret == 0)
1691 dma_bind[vid2socketid[vid]].dmas[VIRTIO_TXQ].async_enabled = true;
1692 }
1693
1694 return rx_ret | tx_ret;
1695}
1696
1697
1698

Callers 1

new_deviceFunction · 0.85

Calls 1

Tested by

no test coverage detected