2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-02 07:15:17 +00:00

netdev-dpdk: receive up to NETDEV_MAX_RX_BATCH

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

Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
This commit is contained in:
Daniele Di Proietto
2014-06-03 17:10:52 -07:00
committed by Pravin B Shelar
parent c6bf49f3fa
commit 7d08d53ed5

View File

@@ -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;
}