From: Conor Walsh <conor.walsh@intel.com>
To: thomas@monjalon.net, konstantin.ananyev@intel.com,
vladimir.medvedkin@intel.com, kathleen.capella@arm.com,
honnappa.nagarahalli@arm.com
Cc: dev@dpdk.org, Conor Walsh <conor.walsh@intel.com>
Subject: [dpdk-dev] [PATCH] examples/l3fwd: fib skip tx queue drain on first iteration
Date: Wed, 21 Apr 2021 12:48:42 +0000 [thread overview]
Message-ID: <20210421124842.1550979-1-conor.walsh@intel.com> (raw)
The commit a8f8b672d575 ("examples/l3fwd: skip Tx queue drain on first
iteration") implemented a change to the em and lpm lookup methods to
prevent the TX queue drain running in the first iteration of their
packet processing loops. This patch introduces this change into the
fib lookup method, this was done to keep the fib code aligned with
the em and lpm code.
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
---
examples/l3fwd/l3fwd_fib.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/examples/l3fwd/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c
index c7d7689a94..1787229942 100644
--- a/examples/l3fwd/l3fwd_fib.c
+++ b/examples/l3fwd/l3fwd_fib.c
@@ -179,8 +179,6 @@ fib_main_loop(__rte_unused void *dummy)
const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /
US_PER_S * BURST_TX_DRAIN_US;
- prev_tsc = 0;
-
lcore_id = rte_lcore_id();
qconf = &lcore_conf[lcore_id];
@@ -200,9 +198,10 @@ fib_main_loop(__rte_unused void *dummy)
lcore_id, portid, queueid);
}
- while (!force_quit) {
+ cur_tsc = rte_rdtsc();
+ prev_tsc = cur_tsc;
- cur_tsc = rte_rdtsc();
+ while (!force_quit) {
/* TX burst queue drain. */
diff_tsc = cur_tsc - prev_tsc;
@@ -233,6 +232,8 @@ fib_main_loop(__rte_unused void *dummy)
/* Use fib to lookup port IDs and transmit them. */
fib_send_packets(nb_rx, pkts_burst, portid, qconf);
}
+
+ cur_tsc = rte_rdtsc();
}
return 0;
--
2.25.1
next reply other threads:[~2021-04-21 12:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 12:48 Conor Walsh [this message]
2021-04-21 13:01 ` Ananyev, Konstantin
2021-04-21 15:11 ` Medvedkin, Vladimir
2021-04-21 18:45 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210421124842.1550979-1-conor.walsh@intel.com \
--to=conor.walsh@intel.com \
--cc=dev@dpdk.org \
--cc=honnappa.nagarahalli@arm.com \
--cc=kathleen.capella@arm.com \
--cc=konstantin.ananyev@intel.com \
--cc=thomas@monjalon.net \
--cc=vladimir.medvedkin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).