DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: "Rong, Leyi" <leyi.rong@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>,
	 "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
Cc: dpdk-dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/2] net/ice: add Rx AVX512 offload path
Date: Thu, 18 Mar 2021 10:35:11 +0000
Message-ID: <BYAPR11MB3143BE87F2E67F3D310EC331D7699@BYAPR11MB3143.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210317091409.11725-3-leyi.rong@intel.com>

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Leyi Rong
> Sent: Wednesday, March 17, 2021 9:14 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Cc: dev@dpdk.org; Rong, Leyi <leyi.rong@intel.com>
> Subject: [dpdk-dev] [PATCH 2/2] net/ice: add Rx AVX512 offload path
> 
> Split AVX512 Rx data path into two, one is for basic,
> the other one can support additional Rx offload features,
> including Rx checksum offload, Rx vlan offload, RSS offload.
> 
> Signed-off-by: Leyi Rong <leyi.rong@intel.com>
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>


Hi Leyi and Wenzhou,

I'm a bit concerned over code-duplication of the RX datapath in this patch,
as it duplicates the core desc-to-mbuf RX loop.

I loaded the following functions, and compared in "meld" to view the diff
side-by-side, and it should be possible to "specialize" away the differences:
_ice_recv_raw_pkts_vec_avx512() /* original */
_ice_recv_raw_pkts_vec_avx512_offload() /* with offload */

Specializing the implementation (adding "do_offload" parameter to _ice_recv_raw_pkts_vec_avx512()),
and branch on it with an   if(do_offload)  when the offload and non-offload paths behave differently.

When inlining that function the compiler will remove the branches, and you'll only have one version
of the code to maintain, without any performance penalty.

If my suggestion around parameterizing, specializing and inlining isn't clear, please ask and I can
try to explain better.

Regards, -Harry

<snip patch contents>

  reply	other threads:[~2021-03-18 10:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17  9:14 [dpdk-dev] [PATCH 0/2] add alternative " Leyi Rong
2021-03-17  9:14 ` [dpdk-dev] [PATCH 1/2] net/ice: add Tx " Leyi Rong
2021-03-17  9:14 ` [dpdk-dev] [PATCH 2/2] net/ice: add Rx " Leyi Rong
2021-03-18 10:35   ` Van Haaren, Harry [this message]
2021-04-12  4:03 ` [dpdk-dev] [PATCH v3 0/2] add alternative " Leyi Rong
2021-04-12  4:03   ` [dpdk-dev] [PATCH v3 1/2] net/ice: add Tx " Leyi Rong
2021-04-12  4:03   ` [dpdk-dev] [PATCH v3 2/2] net/ice: add Rx " Leyi Rong
2021-04-15  1:13 ` [dpdk-dev] [PATCH v4 0/2] add alternative " Leyi Rong
2021-04-15  1:13   ` [dpdk-dev] [PATCH v4 1/2] net/ice: add Tx " Leyi Rong
2021-04-15  1:13   ` [dpdk-dev] [PATCH v4 2/2] net/ice: add Rx " Leyi Rong
2021-04-15  8:58 ` [dpdk-dev] [PATCH v5 0/2] add alternative " Leyi Rong
2021-04-15  8:58   ` [dpdk-dev] [PATCH v5 1/2] net/ice: add Tx " Leyi Rong
2021-04-15  8:58   ` [dpdk-dev] [PATCH v5 2/2] net/ice: add Rx " Leyi Rong
2021-04-16  9:02   ` [dpdk-dev] [PATCH v5 0/2] add alternative " Sun, QinX
2021-04-16 10:42     ` 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=BYAPR11MB3143BE87F2E67F3D310EC331D7699@BYAPR11MB3143.namprd11.prod.outlook.com \
    --to=harry.van.haaren@intel.com \
    --cc=dev@dpdk.org \
    --cc=leyi.rong@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=wenzhuo.lu@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