summaryrefslogtreecommitdiff
path: root/lib/netdev.h
diff options
context:
space:
mode:
authorJan Scheurich <jan.scheurich@ericsson.com>2018-04-19 19:40:44 +0200
committerIan Stokes <ian.stokes@intel.com>2018-05-11 08:08:24 +0100
commit8492adc270fd9b1774683064764cdf56df995b99 (patch)
tree903ac545e94ff87e3457b9953b9473e70a60a77c /lib/netdev.h
parent65a87968f4cfd9cf7a433a3156d98118078f9e4e (diff)
downloadopenvswitch-8492adc270fd9b1774683064764cdf56df995b99.tar.gz
netdev: Add optional qfill output parameter to rxq_recv()
If the caller provides a non-NULL qfill pointer and the netdev implemementation supports reading the rx queue fill level, the rxq_recv() function returns the remaining number of packets in the rx queue after reception of the packet burst to the caller. If the implementation does not support this, it returns -ENOTSUP instead. Reading the remaining queue fill level should not substantilly slow down the recv() operation. A first implementation is provided for ethernet and vhostuser DPDK ports in netdev-dpdk.c. This output parameter will be used in the upcoming commit for PMD performance metrics to supervise the rx queue fill level for DPDK vhostuser ports. Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com> Acked-by: Billy O'Mahony <billy.o.mahony@intel.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Diffstat (limited to 'lib/netdev.h')
-rw-r--r--lib/netdev.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/netdev.h b/lib/netdev.h
index 441e53dae..bd6f45abb 100644
--- a/lib/netdev.h
+++ b/lib/netdev.h
@@ -175,7 +175,8 @@ void netdev_rxq_close(struct netdev_rxq *);
const char *netdev_rxq_get_name(const struct netdev_rxq *);
int netdev_rxq_get_queue_id(const struct netdev_rxq *);
-int netdev_rxq_recv(struct netdev_rxq *rx, struct dp_packet_batch *);
+int netdev_rxq_recv(struct netdev_rxq *rx, struct dp_packet_batch *,
+ int *qfill);
void netdev_rxq_wait(struct netdev_rxq *);
int netdev_rxq_drain(struct netdev_rxq *);