DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: "Xu, Rosen" <rosen.xu@intel.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	Harman Kalra <hkalra@marvell.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Sachin Saxena <sachin.saxena@nxp.com>,
	Jie Hai <haijie1@huawei.com>,
	Yisen Zhuang <yisen.zhuang@huawei.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	Jiawen Wu <jiawenwu@trustnetic.com>,
	Jian Wang <jianwang@trustnetic.com>,
	"Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: Re: [PATCH 1/4] ethdev: make parameters to TM node add fn constant
Date: Sun, 22 Sep 2024 17:10:49 +0100	[thread overview]
Message-ID: <850ee1df-012f-4ecd-a81d-3513a0f147ef@amd.com> (raw)
In-Reply-To: <DM4PR11MB775781378AC4339F1B326B4E89B82@DM4PR11MB7757.namprd11.prod.outlook.com>

On 8/7/2024 8:27 AM, Xu, Rosen wrote:
> Hi,
> 
>> -----Original Message-----
<...>
>> Subject: [PATCH 1/4] ethdev: make parameters to TM node add fn constant
>>
>> The function to add a new scheduling node in rte_tm should not (and does
>> not) modify the actual node parameters passed in via struct pointer. We
>> should guarantee this by marking the parameter pointer as const. This allows
>> SW to create multiple scheduling nodes using the same parameter struct
>> without having to reset it each time.
>>
>> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>> ---
>>  drivers/net/ipn3ke/ipn3ke_tm.c  |  4 ++--
>> diff --git a/drivers/net/ipn3ke/ipn3ke_tm.c
>> b/drivers/net/ipn3ke/ipn3ke_tm.c index 0260227900..cffe1fdaa4 100644
>> --- a/drivers/net/ipn3ke/ipn3ke_tm.c
>> +++ b/drivers/net/ipn3ke/ipn3ke_tm.c
>> @@ -1010,7 +1010,7 @@ ipn3ke_tm_tdrop_profile_delete(struct
>> rte_eth_dev *dev,  static int
>> ipn3ke_tm_node_add_check_parameter(uint32_t tm_id,
>>  	uint32_t node_id, uint32_t parent_node_id, uint32_t priority,
>> -	uint32_t weight, uint32_t level_id, struct rte_tm_node_params
>> *params,
>> +	uint32_t weight, uint32_t level_id, const struct rte_tm_node_params
>> +*params,
>>  	struct rte_tm_error *error)
>>  {
>>  	uint32_t level_of_node_id;
>> @@ -1168,7 +1168,7 @@ ipn3ke_tm_node_add_check_mount(uint32_t
>> tm_id,  static int  ipn3ke_tm_node_add(struct rte_eth_dev *dev,
>>  	uint32_t node_id, uint32_t parent_node_id, uint32_t priority,
>> -	uint32_t weight, uint32_t level_id, struct rte_tm_node_params
>> *params,
>> +	uint32_t weight, uint32_t level_id, const struct rte_tm_node_params
>> +*params,
>>  	struct rte_tm_error *error)
>>  {
>>  	struct ipn3ke_hw *hw = IPN3KE_DEV_PRIVATE_TO_HW(dev); diff --
>>  /** @internal Traffic manager node delete */
>> --
>> 2.43.0
> 
> Reviewed-by: Rosen Xu <rosen.xu@intel.com>
>

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

  reply	other threads:[~2024-09-22 16:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06 15:24 [PATCH 0/4] improve rte_tm APIs Bruce Richardson
2024-08-06 15:24 ` [PATCH 1/4] ethdev: make parameters to TM node add fn constant Bruce Richardson
2024-08-07  7:27   ` Xu, Rosen
2024-09-22 16:10     ` Ferruh Yigit [this message]
2024-08-06 15:24 ` [PATCH 2/4] ethdev: make parameters to TM profile " Bruce Richardson
2024-08-07  7:27   ` Xu, Rosen
2024-09-22 16:11     ` Ferruh Yigit
2024-08-06 15:24 ` [PATCH 3/4] ethdev: make TM shaper parameters constant Bruce Richardson
2024-08-07  7:29   ` Xu, Rosen
2024-09-22 16:11     ` Ferruh Yigit
2024-08-06 15:24 ` [PATCH 4/4] ethdev: add traffic manager query function Bruce Richardson
2024-09-22 16:26   ` Ferruh Yigit
2024-10-07 11:04     ` Bruce Richardson
2024-10-08 10:56       ` Bruce Richardson
2024-10-07 11:49 ` [PATCH v2 0/3] make struct parameters constant in rte_tm APIs Bruce Richardson
2024-10-07 11:49   ` [PATCH v2 1/3] ethdev: make parameters to TM node add fn constant Bruce Richardson
2024-10-07 11:49   ` [PATCH v2 2/3] ethdev: make parameters to TM profile " Bruce Richardson
2024-10-07 11:49   ` [PATCH v2 3/3] ethdev: make TM shaper parameters constant Bruce Richardson
2024-10-07 15:22   ` [PATCH v2 0/3] make struct parameters constant in rte_tm APIs Stephen Hemminger
2024-10-08  0:38     ` Ferruh Yigit

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=850ee1df-012f-4ecd-a81d-3513a0f147ef@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=bruce.richardson@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=haijie1@huawei.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=hkalra@marvell.com \
    --cc=jianwang@trustnetic.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=jingjing.wu@intel.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=rosen.xu@intel.com \
    --cc=sachin.saxena@nxp.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    --cc=thomas@monjalon.net \
    --cc=yisen.zhuang@huawei.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).