DPDK patches and discussions
 help / color / mirror / Atom feed
From: fengchengwen <fengchengwen@huawei.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: <dev@dpdk.org>, <ferruh.yigit@amd.com>
Subject: Re: [PATCH v2 1/3] ethdev: add traffic manager query function
Date: Wed, 9 Oct 2024 17:38:38 +0800	[thread overview]
Message-ID: <19878abe-6b2e-459d-b1de-1f87c9025d8d@huawei.com> (raw)
In-Reply-To: <ZwY53pY4_Zc5WZI9@bricha3-mobl1.ger.corp.intel.com>



On 2024/10/9 16:07, Bruce Richardson wrote:
> On Wed, Oct 09, 2024 at 08:57:41AM +0800, fengchengwen wrote:
>> On 2024/10/8 22:43, Bruce Richardson wrote:
>>> Add function to allow querying a node in the scheduler tree.  Returns
>>> the parameters as were given to the add function. Adding this function
>>> allows apps to just query the hierarchy rather than having to maintain
>>> their own copies of it internally.
>>>
>>> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>>> ---
> 
> Hi,
> 
> thanks for the detailed review. Most comments are fine and will fix. One
> reply below for just one of them though.
> 
> /Bruce
> 
> <snip>
>>> + */
>>> +__rte_experimental
>>> +int
>>> +rte_tm_node_query(uint16_t port_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,
>>> +	struct rte_tm_error *error);
>>> +
>>
>> Suggest this new function place after node_resume in header/impl.c(e.g. source or trace), keep them consistency
> 
> Why do you think it should go after node resume? I deliberately placed it
> after node_add function since the parameters are matching each other,
> whatever parameters you provided on add, you get returned to you on query.

To one object, we may have four basic operation: add/del/modify/query, I always keep this order in .c/.h file.
As for the tm node case, we could treat node_suspend/node_resume as the modify operation.

It is just a personal coding style. From my point of view, it's fine in that order.

> 
> 


  reply	other threads:[~2024-10-09  9:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08 10:53 [PATCH 0/3] add support for querying ethdev TM nodes Bruce Richardson
2024-10-08 10:53 ` [PATCH 1/3] ethdev: add traffic manager query function Bruce Richardson
2024-10-08 10:53 ` [PATCH 2/3] net/ice: add traffic management node " Bruce Richardson
2024-10-08 10:53 ` [PATCH 3/3] app/testpmd: add support for querying TM nodes Bruce Richardson
2024-10-08 14:43 ` [PATCH v2 0/3] add support for querying ethdev " Bruce Richardson
2024-10-08 14:43   ` [PATCH v2 1/3] ethdev: add traffic manager query function Bruce Richardson
2024-10-09  0:57     ` fengchengwen
2024-10-09  8:07       ` Bruce Richardson
2024-10-09  9:38         ` fengchengwen [this message]
2024-10-08 14:43   ` [PATCH v2 2/3] net/ice: add traffic management node " Bruce Richardson
2024-10-08 14:43   ` [PATCH v2 3/3] app/testpmd: add support for querying TM nodes Bruce Richardson
2024-10-09  1:02     ` fengchengwen
2024-10-09 10:32       ` Bruce Richardson
2024-10-09 10:32 ` [PATCH v3 0/3] add support for querying ethdev " Bruce Richardson
2024-10-09 10:32   ` [PATCH v3 1/3] ethdev: add traffic manager query function Bruce Richardson
2024-10-10  2:05     ` Ferruh Yigit
2024-10-12  0:28     ` Ferruh Yigit
2024-10-09 10:32   ` [PATCH v3 2/3] net/ice: add traffic management node " Bruce Richardson
2024-10-09 10:32   ` [PATCH v3 3/3] app/testpmd: add support for querying TM nodes Bruce Richardson
2024-10-12  0:33   ` [PATCH v3 0/3] add support for querying ethdev " 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=19878abe-6b2e-459d-b1de-1f87c9025d8d@huawei.com \
    --to=fengchengwen@huawei.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.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).