diff options
author | Yuanhan Liu <yuanhan.liu@linux.intel.com> | 2016-05-11 06:46:24 +0800 |
---|---|---|
committer | Yuanhan Liu <yuanhan.liu@linux.intel.com> | 2016-06-22 09:02:58 +0200 |
commit | a67f286a6596e6269bb3b83e01f9b42bb5544b46 (patch) | |
tree | 2a39b66b6f4ae5d246fd7d19fabffcf54bc97228 /examples | |
parent | f6d1bd536567daf177d1d25b2d68464af5370ccd (diff) | |
download | dpdk-a67f286a6596e6269bb3b83e01f9b42bb5544b46.zip dpdk-a67f286a6596e6269bb3b83e01f9b42bb5544b46.tar.gz dpdk-a67f286a6596e6269bb3b83e01f9b42bb5544b46.tar.xz |
vhost: export queue free entries
The new API rte_vhost_avail_entries() is actually a rename of
rte_vring_available_entries(), with the "vring" to "vhost" name
change to keep the consistency of other vhost exported APIs.
This change could let us avoid the dependency of "virtio_net"
struct, to prepare for the ABI refactoring.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Tested-by: Rich Lane <rich.lane@bigswitch.com>
Acked-by: Rich Lane <rich.lane@bigswitch.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/tep_termination/main.c | 4 | ||||
-rw-r--r-- | examples/vhost/main.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index f843f36..fb0c7fc 100644 --- a/examples/tep_termination/main.c +++ b/examples/tep_termination/main.c @@ -709,11 +709,11 @@ switch_worker(__rte_unused void *arg) * must be less than virtio queue size */ if (enable_retry && unlikely(rx_count > - rte_vring_available_entries(dev, VIRTIO_RXQ))) { + rte_vhost_avail_entries(dev->vid, VIRTIO_RXQ))) { for (retry = 0; retry < burst_rx_retry_num; retry++) { rte_delay_us(burst_rx_delay_time); - if (rx_count <= rte_vring_available_entries(dev, VIRTIO_RXQ)) + if (rx_count <= rte_vhost_avail_entries(dev->vid, VIRTIO_RXQ)) break; } } diff --git a/examples/vhost/main.c b/examples/vhost/main.c index c886d8a..4e26a8b 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1055,13 +1055,13 @@ drain_eth_rx(struct vhost_dev *vdev) * to diminish packet loss. */ if (enable_retry && - unlikely(rx_count > rte_vring_available_entries(dev, + unlikely(rx_count > rte_vhost_avail_entries(dev->vid, VIRTIO_RXQ))) { uint32_t retry; for (retry = 0; retry < burst_rx_retry_num; retry++) { rte_delay_us(burst_rx_delay_time); - if (rx_count <= rte_vring_available_entries(dev, + if (rx_count <= rte_vhost_avail_entries(dev->vid, VIRTIO_RXQ)) break; } |