As per netdev-provider interface, netdev_dpdk_rxq_recv should receive at most
NETDEV_MAX_RX_BATCH.

Signed-off-by: Daniele Di Proietto <ddiproie...@vmware.com>
---
 lib/netdev-dpdk.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index ba41d2e..7a78c34 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -595,7 +595,9 @@ netdev_dpdk_rxq_recv(struct netdev_rxq *rxq_, struct ofpbuf 
**packets, int *c)
     dpdk_queue_flush(dev, rxq_->queue_id);
 
     nb_rx = rte_eth_rx_burst(rx->port_id, rxq_->queue_id,
-                             (struct rte_mbuf **) packets, MAX_RX_QUEUE_LEN);
+                             (struct rte_mbuf **) packets,
+                             MIN((int)NETDEV_MAX_RX_BATCH,
+                                 (int)MAX_RX_QUEUE_LEN));
     if (!nb_rx) {
         return EAGAIN;
     }
-- 
2.0.0.rc2

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to