Skip to content

Commit

Permalink
netdev-dpdk: Do not flush tx queue which is shared among CPUs since i…
Browse files Browse the repository at this point in the history
…t is always flushed

When tx queue is shared among CPUS,the pkts always be flush
in 'netdev_dpdk_eth_send'. So it is unnecessarily for flushing
in netdev_dpdk_rxq_recv Otherwise tx will be accessed without
locking.

Signed-off-by: Wei li <liw@dtdream.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
  • Loading branch information
Wei li authored and Pravin B Shelar committed Jun 25, 2015
1 parent 9ad11db commit dc6ba5d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/netdev-dpdk.c
Expand Up @@ -928,8 +928,11 @@ netdev_dpdk_rxq_recv(struct netdev_rxq *rxq_, struct dp_packet **packets,
int nb_rx;

/* There is only one tx queue for this core. Do not flush other
* queueus. */
if (rxq_->queue_id == rte_lcore_id()) {
* queues.
* Do not flush tx queue which is shared among CPUs
* since it is always flushed */
if (rxq_->queue_id == rte_lcore_id() &&
OVS_LIKELY(!dev->txq_needs_locking)) {
dpdk_queue_flush(dev, rxq_->queue_id);
}

Expand Down

0 comments on commit dc6ba5d

Please sign in to comment.