DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Bruce Richardson <bruce.richardson@intel.com>, dev@dpdk.org
Cc: Thomas Monjalon <thomas@monjalon.net>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Subject: Re: [PATCH 4/4] ethdev: add traffic manager query function
Date: Sun, 22 Sep 2024 17:26:30 +0100	[thread overview]
Message-ID: <ccf85ebb-be07-4868-9c55-d7a500ab4b25@amd.com> (raw)
In-Reply-To: <20240806152417.3649745-5-bruce.richardson@intel.com>

On 8/6/2024 4:24 PM, Bruce Richardson wrote:
> +/**
> + * Return information about a traffic management node
> + *
> + * Return information about a hierarchy node, using the same format of parameters
> + * as was passed to the rte_rm_node_add() function.
> + * Each of the "out" parameters pointers (except error) may be passed as NULL if the
> + * information is not needed by the caller. For example, to one may check if a node id
> + * is in use by:
> + *
> + *  struct rte_tm_error error;
> + *  int ret = rte_tm_node_query(port, node_id, NULL, NULL, NULL, NULL, NULL, &error);
> + *  if (ret == ENOENT) ...
> + *
> + * @param[in] port_id
> + *   The port identifier of the Ethernet device.
> + * @param[in] node_id
> + *   Node ID. Should be a valid node id.
> + * @param[out] parent_node_id
> + *   Parent node ID.
> + * @param[out] priority
> + *   Node priority. The highest node priority is zero. Used by the SP algorithm
> + *   running on the parent of the current node for scheduling this child node.
> + * @param[out] weight
> + *   Node weight. The node weight is relative to the weight sum of all siblings
> + *   that have the same priority. The lowest weight is one. Used by the WFQ
> + *   algorithm running on the parent of the current node for scheduling this
> + *   child node.
> + * @param[out] level_id
> + *   The node level in the scheduler hierarchy.
> + * @param[out] params
> + *   Node parameters, as would be used when creating the node.
> + * @param[out] error
> + *   Error details. Filled in only on error, when not NULL.
> + * @return
> + *   0 on success, non-zero error code otherwise.
> + *   -EINVAL - port or node id value is invalid
> + *   -ENOENT - no node exists with the provided id
> + */
> +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);
> +
>

No objection to get an TM node query API overall, but it would be good
to get more comment on the what correct API should be, we are missing it.
Both because it is not discussed much, and it is first release, better
to add this API as experimental.

Also we should have an implementation in driver and a sample application
usage (testpmd?) with new API. Are these planned separately for this
release, or can it be available part of next version of this patch?

Finally, does it worth documenting this in release notes, as just a
query API I am not sure if this a notable feature, but just a reminder.


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

Thread overview: 12+ 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
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 [this message]

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=ccf85ebb-be07-4868-9c55-d7a500ab4b25@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=thomas@monjalon.net \
    /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).