DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Su, Simei" <simei.su@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "Zhang, Qi Z" <qi.z.zhang@intel.com>,
	"Guo, Junfeng" <junfeng.guo@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Wu, Wenjun1" <wenjun1.wu@intel.com>
Subject: RE: [PATCH v3 2/2] net/igc: enable launch time offloading
Date: Fri, 3 Feb 2023 03:22:54 +0000	[thread overview]
Message-ID: <SA1PR11MB66130FB8D5744A5D6A1C5B5E9CD79@SA1PR11MB6613.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230202163032.5e83a648@hermes.local>

Hi Stephen,

> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Friday, February 3, 2023 8:31 AM
> To: Su, Simei <simei.su@intel.com>
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>; dev@dpdk.org; Wu, Wenjun1
> <wenjun1.wu@intel.com>
> Subject: Re: [PATCH v3 2/2] net/igc: enable launch time offloading
> 
> On Thu,  2 Feb 2023 15:18:01 +0800
> Simei Su <simei.su@intel.com> wrote:
> 
> >
> > +static uint32_t igc_tx_launchtime(uint64_t txtime, uint16_t port_id)
> > +{
> > +	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
> > +	struct igc_adapter *adapter = IGC_DEV_PRIVATE(dev);
> > +	uint64_t base_time = adapter->base_time;
> > +	uint64_t cycle_time = adapter->cycle_time;
> > +	uint32_t launchtime;
> > +
> > +	launchtime = (txtime - base_time) % cycle_time;
> > +
> > +	return rte_cpu_to_le_32(launchtime); }
> 
> 
> Divide in transmit path will slow things down.
> Better to use something like rte_reciprocal_divide_64() to avoid slow 64 bit
> divide.

Thanks for your comments.
The performance won't be affected if the launchtime function is turned off.
If the function is turned on, it indeed doesn't need high performance based on the function.

Thanks,
Simei

  reply	other threads:[~2023-02-03  3:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20  3:47 [PATCH 0/2] net/igc: support Tx timestamp offload Simei Su
2022-12-20  3:47 ` [PATCH 1/2] net/igc/base: " Simei Su
2022-12-20  3:47 ` [PATCH 2/2] net/igc: enable " Simei Su
2023-02-01  7:30 ` [PATCH v2 0/2] net/igc: support launch time offloading Simei Su
2023-02-01  7:30   ` [PATCH v2 1/2] net/igc/base: expose packet pacing registers Simei Su
2023-02-01  7:30   ` [PATCH v2 2/2] net/igc: enable launch time offloading Simei Su
2023-02-01  8:34     ` Zhang, Qi Z
2023-02-01  8:46   ` [PATCH v2 0/2] net/igc: support " Morten Brørup
2023-02-02  7:17   ` [PATCH v3 " Simei Su
2023-02-02  7:18     ` [PATCH v3 1/2] net/igc/base: expose packet pacing registers Simei Su
2023-02-02  7:18     ` [PATCH v3 2/2] net/igc: enable launch time offloading Simei Su
2023-02-03  0:30       ` Stephen Hemminger
2023-02-03  3:22         ` Su, Simei [this message]
2023-02-02  8:46     ` [PATCH v3 0/2] net/igc: support " Zhang, Qi Z

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=SA1PR11MB66130FB8D5744A5D6A1C5B5E9CD79@SA1PR11MB6613.namprd11.prod.outlook.com \
    --to=simei.su@intel.com \
    --cc=dev@dpdk.org \
    --cc=junfeng.guo@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=wenjun1.wu@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).