DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Danilewicz, MarcinX" <marcinx.danilewicz@intel.com>
To: "Singh, Jasvinder" <jasvinder.singh@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
Cc: "Ajmera, Megha" <megha.ajmera@intel.com>
Subject: RE: [PATCH v8] sched: enable CMAN at runtime
Date: Thu, 7 Jul 2022 13:07:06 +0000	[thread overview]
Message-ID: <PH0PR11MB5784D14C28652489229D9BDB8F839@PH0PR11MB5784.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CY4PR11MB1589E23BFEB8BBAB7BD53B39E0809@CY4PR11MB1589.namprd11.prod.outlook.com>

<snip>
> > Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
> > ---
> > Log: v2 change in rte_sched.h to avoid ABI breakage.
> >      v3 changes from comments
> >      v4 rebase to 22.07-rc1
> >      v5 rebase to main latest
> >      v6 commit message fixed
> >      v7 changes from comments
> >      v8 with changes from comments
> 
> 
> You need to explicitly mention the changes done in each version to help
> reviewer easily locate the changes.
Yes, yes. I am going to provide more detailed changes and explaining history on what changes was made. This split development over time is the best example to show that need. 

<snip>
>>@@ -96,9 +94,7 @@ static const struct rte_sched_subport_params
> > subport_params_default = {
> >  	.pipe_profiles = pipe_profile,
> >  	.n_pipe_profiles = 0, /* filled at run time */
> >  	.n_max_pipe_profiles = RTE_DIM(pipe_profile), -#ifdef
> RTE_SCHED_CMAN
> >  	.cman_params = &cman_params,
> > -#endif /* RTE_SCHED_CMAN */
> >  };
> 
> 
> Similar to what is discussed for qos_sched sample app, set cman_params to
> NULL and  remove default parameters for "static struct
> rte_sched_cman_params cman_params" above.
Sure, that will be done.

> > -#ifdef RTE_SCHED_CMAN
> > -	struct rte_sched_cman_params cman_params = {
> > -		.cman_mode = RTE_SCHED_CMAN_RED,
> > -		.red_params = { },
> > -	};
> > +	subport_params->cman_params = NULL;
> 
> No need to set subport_params->cman_params  again to null as it is already
> set to NULL in init.c.
Sure, app_load_cfg_profile -> cfg_load_subport is also not called several times, just once

<snip>
> >  			}
> > -#ifdef RTE_SCHED_CMAN
> > -			set_subport_cman_params(subport_params+i,
> > cman_params);
> > -#endif
> > +			subport_params[i].cman_params = &cman_params;
> 
> Since cman_params_is global variable, memory is allocated regardless of
> whether cman mechanism is enabled or disabled. So subport_params-
> >cman_params will never point to NULL even when red/pie is disabled.
> Define local flag "cman_enabled" and set his flag if red or pie is enabled and
> check this flag to set subport_params[i].cman_params to cman_params.
Ah .. nice spot. But, cant we do that with additional check, using what we have?
For an instance:
If (cman_params.cman_mode == RTE_SCHED_CMAN_PIE || cman_params.cman_mode == RTE_SCHED_CMAN_RED) {
Then set subport_params[i].cman_params to cman_params.
}

BR,
/Marcin 

  reply	other threads:[~2022-07-07 13:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 13:53 [PATCH] " Marcin Danilewicz
2022-05-12 13:10 ` [PATCH v2] " Marcin Danilewicz
2022-05-30 11:19   ` Dumitrescu, Cristian
2022-05-30 14:03     ` Danilewicz, MarcinX
2022-06-02  9:57     ` Danilewicz, MarcinX
2022-05-30 11:35   ` Dumitrescu, Cristian
2022-06-07 10:40     ` Danilewicz, MarcinX
2022-06-08  9:42   ` [PATCH v3] " Marcin Danilewicz
2022-06-08 11:59     ` Dumitrescu, Cristian
2022-06-08 15:29       ` Danilewicz, MarcinX
2022-06-13  9:09     ` [PATCH v4] " Marcin Danilewicz
2022-06-17 11:48       ` Dumitrescu, Cristian
2022-06-20 13:56       ` [PATCH v5] ched: " Marcin Danilewicz
2022-06-20 14:49         ` Dumitrescu, Cristian
2022-06-21  8:20           ` Danilewicz, MarcinX
2022-06-21  8:16         ` [PATCH v6] sched: " Marcin Danilewicz
2022-06-21 13:27           ` Dumitrescu, Cristian
2022-06-22 15:12             ` Danilewicz, MarcinX
2022-07-04  9:19           ` [PATCH v7] " Marcin Danilewicz
2022-07-05 17:05             ` [PATCH v8] " Marcin Danilewicz
2022-07-05 18:00               ` Ajmera, Megha
2022-07-05 22:26                 ` Danilewicz, MarcinX
2022-07-06  8:53               ` Singh, Jasvinder
2022-07-07 13:07                 ` Danilewicz, MarcinX [this message]
2022-07-07 16:28                   ` Singh, Jasvinder
2022-07-07 21:22                     ` Danilewicz, MarcinX
2022-07-08 13:14               ` [PATCH v9] " Marcin Danilewicz

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=PH0PR11MB5784D14C28652489229D9BDB8F839@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 \
    /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).