DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Danilewicz, MarcinX" <marcinx.danilewicz@intel.com>
To: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Singh, Jasvinder" <jasvinder.singh@intel.com>
Cc: "Ajmera, Megha" <megha.ajmera@intel.com>,
	"Liu, Yu Y" <yu.y.liu@intel.com>
Subject: RE: [PATCH v6] sched: enable traffic class oversubscription conditionally
Date: Mon, 30 May 2022 12:02:16 +0000	[thread overview]
Message-ID: <PH0PR11MB5784D8102A51216E21ADD9708FDD9@PH0PR11MB5784.namprd11.prod.outlook.com> (raw)
In-Reply-To: <DM8PR11MB56702CD30F05A408594DA268EBDD9@DM8PR11MB5670.namprd11.prod.outlook.com>

Hi Cristian,



> 
> Using a switch statement for a binary condition instead of if-else does not
> make sense to me. I know you mention you saw better performance with the
> switch, but I am pretty sure it is not the switch providing the performance
> increase. You are using if-else for testing the new subport->tc_ov_enabled
> throughout the code (an example is just below in your patch), so I suggest
> you do the same here:
> 
> if (subport->tc_ov_enabled) {
> 	if (!grinder_credits_check_with_tc_ov(port, subport, pos))
> 		return 0;
> } else {
> 	if (!grinder_credits_check(port, subport, pos))
> 		return 0;
> 

I've changed this snip to what you requested, but I've spent some time on this comparing, if, unlike, switch and switch-case was the fastest. We can focus on that later on.. because there is clear difference.

Regards,
/Marcin
--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.


  reply	other threads:[~2022-05-30 12:02 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07 14:51 [dpdk][PATCH 1/2] sched: enable/disable TC OV at runtime Marcin Danilewicz
2022-04-07 14:51 ` [dpdk][PATCH 2/2] sched: fix to manage " Marcin Danilewicz
2022-04-14  9:53   ` Thomas Monjalon
2022-04-27  9:23   ` [PATCH v3] sched: enable/disable " Marcin Danilewicz
2022-04-27 15:48     ` Singh, Jasvinder
2022-05-09 20:05     ` Dumitrescu, Cristian
2022-05-10  6:40       ` Ajmera, Megha
2022-05-10  9:09         ` Dumitrescu, Cristian
2022-05-24 13:33           ` Marcin Danilewicz
2022-05-24 14:52             ` Stephen Hemminger
2022-05-26 23:12               ` Danilewicz, MarcinX
2022-05-24 13:38     ` [PATCH v4] sched: enable traffic class oversubscription conditionally Marcin Danilewicz
2022-05-24 13:43     ` Marcin Danilewicz
2022-05-24 14:30       ` Dumitrescu, Cristian
2022-05-25 14:18         ` Danilewicz, MarcinX
2022-05-27  0:09           ` Danilewicz, MarcinX
2022-05-27  0:09       ` [PATCH v5] " Marcin Danilewicz
2022-05-30  8:45         ` [PATCH v6] " Marcin Danilewicz
2022-05-30 10:35           ` Dumitrescu, Cristian
2022-05-30 11:59             ` Danilewicz, MarcinX
2022-05-30 10:54           ` Dumitrescu, Cristian
2022-05-30 12:02             ` Danilewicz, MarcinX [this message]
2022-05-30 10:58           ` Dumitrescu, Cristian
2022-05-30 12:04             ` Danilewicz, MarcinX
2022-05-30 11:55           ` [PATCH v7] " Marcin Danilewicz
2022-05-30 12:14             ` Dumitrescu, Cristian
2022-05-30 13:34               ` Danilewicz, MarcinX
2022-05-30 13:55                 ` Dumitrescu, Cristian
2022-05-30 14:05                   ` Danilewicz, MarcinX
2022-05-30 13:38             ` [PATCH v8] " Marcin Danilewicz
2022-05-30 18:47               ` [PATCH v9] " Marcin Danilewicz
2022-05-30 21:13                 ` Dumitrescu, Cristian
2022-05-31  9:49                 ` [PATCH v10] " Marcin Danilewicz
2022-05-31 13:09                   ` Dumitrescu, Cristian
2022-05-31 16:42                     ` Thomas Monjalon
2022-05-31 18:45                       ` Danilewicz, MarcinX
2022-04-08 12:50 ` [dpdk][PATCH 1/2] sched: enable/disable TC OV at runtime Singh, Jasvinder

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=PH0PR11MB5784D8102A51216E21ADD9708FDD9@PH0PR11MB5784.namprd11.prod.outlook.com \
    --to=marcinx.danilewicz@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=jasvinder.singh@intel.com \
    --cc=megha.ajmera@intel.com \
    --cc=yu.y.liu@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).