Under low rate traffic conditions, there can be 2 issues.
(1) Packets potentially can get stuck in the intermediate queue.
(2) Latency of the packets can increase significantly due to
buffering in intermediate queue.
This commit handles the (1) issue by draining the tx port queues from
PMD processing loop. Also this commit addresses issue (2) by draining
the tx queues after every rxq port processing. This reduces the latency
with out impacting the forwarding throughput.
MASTER
--------
Pkt size min(ns) avg(ns) max(ns)
512 4,631 5,022 309,914
1024 5,545 5,749 104,294
1280 5,978 6,159 45,306
1518 6,419 6,774 946,850
MASTER + COMMIT
-----------------
Pkt size min(ns) avg(ns) max(ns)
512 4,711 5,064 182,477
1024 5,601 5,888 701,654
1280 6,018 6,491 533,037
1518 6,467 6,734 312,471
PMDs can be teared down and spawned at runtime and so the rxq and txq
mapping of the PMD threads can change. In few cases packets can get
stuck in the queue due to reconfiguration and this commit helps drain
the queues.
Suggested-by: Eelco Chaudron <[email protected]>
Reported-at:
https://mail.openvswitch.org/pipermail/ovs-dev/2017-April/331039.html
Signed-off-by: Bhanuprakash Bodireddy <[email protected]>
Signed-off-by: Antonio Fischetti <[email protected]>
Co-authored-by: Antonio Fischetti <[email protected]>
Signed-off-by: Markus Magnusson <[email protected]>
Co-authored-by: Markus Magnusson <[email protected]>
---
lib/dpif-netdev.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index e1c43fe..12f8477 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -3760,6 +3760,8 @@ reload:
for (i = 0; i < poll_cnt; i++) {
dp_netdev_process_rxq_port(pmd, poll_list[i].rx,
poll_list[i].port_no);
+
+ dp_netdev_drain_txq_ports(pmd);
}
if (lc++ > 1024) {
@@ -3780,6 +3782,9 @@ reload:
}
}
+ /* Drain the queues as part of reconfiguration logic. */
+ dp_netdev_drain_txq_ports(pmd);
+
poll_cnt = pmd_load_queues_and_ports(pmd, &poll_list);
exiting = latch_is_set(&pmd->exit_latch);
/* Signal here to make sure the pmd finishes
--
2.4.11
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev