mirror of
https://github.com/openvswitch/ovs
synced 2025-09-02 15:25:22 +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:
committed by
Pravin B Shelar
parent
c6bf49f3fa
commit
7d08d53ed5
@@ -595,7 +595,9 @@ netdev_dpdk_rxq_recv(struct netdev_rxq *rxq_, struct ofpbuf **packets, int *c)
|
|||||||
dpdk_queue_flush(dev, rxq_->queue_id);
|
dpdk_queue_flush(dev, rxq_->queue_id);
|
||||||
|
|
||||||
nb_rx = rte_eth_rx_burst(rx->port_id, 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) {
|
if (!nb_rx) {
|
||||||
return EAGAIN;
|
return EAGAIN;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user