DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Sun, Chenmin" <chenmin.sun@intel.com>
To: "Wang, Haiyue" <haiyue.wang@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/i40e: i40e FDIR update rate optimization
Date: Thu, 9 Jul 2020 05:30:04 +0000
Message-ID: <SN6PR11MB282911065F8A915A0C6044E4E3640@SN6PR11MB2829.namprd11.prod.outlook.com> (raw)
In-Reply-To: <BN8PR11MB3795D78FA0314F0AE19FE823F7670@BN8PR11MB3795.namprd11.prod.outlook.com>



Best Regards,
Sun, Chenmin

> -----Original Message-----
> From: Wang, Haiyue <haiyue.wang@intel.com>
> Sent: Wednesday, July 8, 2020 4:41 PM
> To: Sun, Chenmin <chenmin.sun@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; Sun, Chenmin <chenmin.sun@intel.com>
> Subject: RE: [dpdk-dev] [PATCH] net/i40e: i40e FDIR update rate optimization
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of chenmin.sun@intel.com
> > Sent: Saturday, June 13, 2020 02:00
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>; Xing, Beilei
> > <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>
> > Cc: dev@dpdk.org; Sun, Chenmin <chenmin.sun@intel.com>
> > Subject: [dpdk-dev] [PATCH] net/i40e: i40e FDIR update rate
> > optimization
> >
> > From: Chenmin Sun <chenmin.sun@intel.com>
> >
> > This patch optimized the fdir update rate for i40e PF, by tracking the
> > fdir rule will be inserted into guaranteed space or shared space.
> > For the flows that are inserted to the guaranteed space, it returns
> > success directly without retrieving the result for NIC.
> >
> > This patch changes the global register GLQF_CTL. Therefore, when
> > devarg ``Support multiple driver`` is set, the patch will not take
> > effect to avoid affecting the normal behavior of other i40e drivers,
> > e.g., Linux kernel driver.
> >
> > Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
> > ---
> >  drivers/net/i40e/i40e_ethdev.c  |  96 ++++++++++++++++-
> > drivers/net/i40e/i40e_ethdev.h  |  57 +++++++---
> >  drivers/net/i40e/i40e_fdir.c    | 182 +++++++++++++++++++++-----------
> >  drivers/net/i40e/i40e_flow.c    | 181 +++++++++++++++++++++++++------
> >  drivers/net/i40e/i40e_rxtx.c    |  15 ++-
> >  drivers/net/i40e/rte_pmd_i40e.c |   2 +-
> >  6 files changed, 417 insertions(+), 116 deletions(-)
> >
> 
> 
> >
> > +static
> > +uint32_t bin_search(uint64_t data)
> > +{
> > +	uint32_t pos = 0;
> > +
> > +	if ((data & 0xFFFFFFFF) == 0) {
> > +		data >>= 32;
> > +		pos += 32;
> > +	}
> > +
> > +	if ((data & 0xFFFF) == 0) {
> > +		data >>= 16;
> > +		pos += 16;
> > +	}
> > +	if ((data & 0xFF) == 0) {
> > +		data >>= 8;
> > +		pos += 8;
> > +	}
> > +	if ((data & 0xF) == 0) {
> > +		data >>= 4;
> > +		pos += 4;
> > +	}
> > +	if ((data & 0x3) == 0) {
> > +		data >>= 2;
> > +		pos += 2;
> > +	}
> > +	if ((data & 0x1) == 0)
> > +		pos += 1;
> > +
> > +	return pos;
> > +}
> > +
> 
> Try " __builtin_ctzll ", DPDK has many examples to use it. ;-)
> 

Thanks, I have replaced it with rte_bsf64()

> > --
> > 2.17.1


  reply	other threads:[~2020-07-09  5:30 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12 18:00 chenmin.sun
2020-07-08  5:38 ` Xing, Beilei
2020-07-09  5:29   ` Sun, Chenmin
2020-07-08  8:41 ` Wang, Haiyue
2020-07-09  5:30   ` Sun, Chenmin [this message]
2020-07-09 14:39 ` [dpdk-dev] [PATCH V2] " chenmin.sun
2020-07-10  2:50   ` Zhang, Qi Z
2020-07-13  8:33     ` Sun, Chenmin
2020-07-13 22:23   ` [dpdk-dev] [PATCH V3 0/2] " chenmin.sun
2020-07-13 22:23     ` [dpdk-dev] [PATCH V3 1/2] net/i40e: i40e FDIR update rate optimization data structures chenmin.sun
2020-07-13 22:23     ` [dpdk-dev] [PATCH V3 2/2] net/i40e: i40e FDIR update rate optimization chenmin.sun
2020-07-15 19:53     ` [dpdk-dev] [PATCH V4 0/4] " chenmin.sun
2020-07-15 19:53       ` [dpdk-dev] [PATCH V4 1/4] net/i40e: introducing the fdir space tracking chenmin.sun
2020-07-16 13:16         ` Wu, Jingjing
2020-07-15 19:53       ` [dpdk-dev] [PATCH V4 2/4] net/i40e: FDIR flow memory management optimization chenmin.sun
2020-07-16 15:15         ` Wu, Jingjing
2020-07-15 19:53       ` [dpdk-dev] [PATCH V4 3/4] net/i40e: move the i40e_get_outer_vlan to where it real needed chenmin.sun
2020-07-15 19:53       ` [dpdk-dev] [PATCH V4 4/4] net/i40e: FDIR update rate optimization chenmin.sun
2020-07-16 13:57         ` Wu, Jingjing
2020-07-17  8:26           ` Sun, Chenmin
2020-07-17 17:19       ` [dpdk-dev] [PATCH v5 0/4] i40e " chenmin.sun
2020-07-17 17:19         ` [dpdk-dev] [PATCH v5 1/4] net/i40e: introducing the fdir space tracking chenmin.sun
2020-07-17 17:19         ` [dpdk-dev] [PATCH v5 2/4] net/i40e: FDIR flow memory management optimization chenmin.sun
2020-07-17 17:19         ` [dpdk-dev] [PATCH v5 3/4] net/i40e: move the i40e_get_outer_vlan to where it real needed chenmin.sun
2020-07-17 17:19         ` [dpdk-dev] [PATCH v5 4/4] net/i40e: FDIR update rate optimization chenmin.sun
2020-07-17 17:36         ` [dpdk-dev] [PATCH v6 0/4] i40e " chenmin.sun
2020-07-17 12:49           ` Zhang, Qi Z
2020-07-17 17:36           ` [dpdk-dev] [PATCH v6 1/4] net/i40e: introducing the fdir space tracking chenmin.sun
2020-07-17 17:36           ` [dpdk-dev] [PATCH v6 2/4] net/i40e: FDIR flow memory management optimization chenmin.sun
2020-07-17 17:36           ` [dpdk-dev] [PATCH v6 3/4] net/i40e: move the i40e_get_outer_vlan to where it real needed chenmin.sun
2020-07-17 17:36           ` [dpdk-dev] [PATCH v6 4/4] net/i40e: FDIR update rate optimization chenmin.sun

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=SN6PR11MB282911065F8A915A0C6044E4E3640@SN6PR11MB2829.namprd11.prod.outlook.com \
    --to=chenmin.sun@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=haiyue.wang@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=qi.z.zhang@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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git