DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>
To: Conor Walsh <conor.walsh@intel.com>,
	thomas@monjalon.net, konstantin.ananyev@intel.com,
	kathleen.capella@arm.com, honnappa.nagarahalli@arm.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] examples/l3fwd: fib skip tx queue drain on first iteration
Date: Wed, 21 Apr 2021 18:11:16 +0300	[thread overview]
Message-ID: <cc14f4f5-f1e0-f554-1a83-af9e325320be@intel.com> (raw)
In-Reply-To: <20210421124842.1550979-1-conor.walsh@intel.com>



On 21/04/2021 15:48, Conor Walsh wrote:
> 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;
> 

Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

-- 
Regards,
Vladimir

  parent reply	other threads:[~2021-04-21 15:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 12:48 Conor Walsh
2021-04-21 13:01 ` Ananyev, Konstantin
2021-04-21 15:11 ` Medvedkin, Vladimir [this message]
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=cc14f4f5-f1e0-f554-1a83-af9e325320be@intel.com \
    --to=vladimir.medvedkin@intel.com \
    --cc=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 \
    /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).