DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "Walsh, Conor" <conor.walsh@intel.com>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>,
	"kathleen.capella@arm.com" <kathleen.capella@arm.com>,
	"honnappa.nagarahalli@arm.com" <honnappa.nagarahalli@arm.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] examples/l3fwd: fib skip tx queue drain on first iteration
Date: Wed, 21 Apr 2021 13:01:59 +0000	[thread overview]
Message-ID: <DM6PR11MB44911B5201C10C8DF89243BE9A479@DM6PR11MB4491.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210421124842.1550979-1-conor.walsh@intel.com>

> 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: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.25.1


  reply	other threads:[~2021-04-21 13:02 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 [this message]
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=DM6PR11MB44911B5201C10C8DF89243BE9A479@DM6PR11MB4491.namprd11.prod.outlook.com \
    --to=konstantin.ananyev@intel.com \
    --cc=conor.walsh@intel.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=kathleen.capella@arm.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).