From: Bruce Richardson <bruce.richardson@intel.com>
To: Dawid Wesierski <dawid.wesierski@intel.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>,
<stephen@networkplumber.org>, <marek.kasiewicz@intel.com>
Subject: Re: [PATCH v3 2/6] net/iavf: allow runtime queue rate limit configuration
Date: Tue, 30 Jun 2026 15:46:24 +0100 [thread overview]
Message-ID: <akPWwOAE4Dbuvb0Y@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20260630120657.1046588-3-dawid.wesierski@intel.com>
On Tue, Jun 30, 2026 at 08:06:52AM -0400, Dawid Wesierski wrote:
> From: Marek Kasiewicz <marek.kasiewicz@intel.com>
>
> Allow per-queue bandwidth rate limiting to be configured without
> stopping the port when only a single TC node and single QoS element
> are involved. This enables dynamic session management where individual
> queue pacing rates can be changed while other queues continue
> transmitting.
>
> Also fix the queue ID assignment in the bandwidth configuration to
> use the actual TM node ID rather than a sequential counter index, and
> only mark the TM hierarchy as committed when the port is stopped to
> permit subsequent reconfiguration.
>
> Signed-off-by: Marek Kasiewicz <marek.kasiewicz@intel.com>
> Signed-off-by: Dawid Wesierski <dawid.wesierski@intel.com>
> ---
> drivers/net/intel/iavf/iavf_tm.c | 25 ++++++++++++++++---------
> 1 file changed, 16 insertions(+), 9 deletions(-)
>
AI review that I ran indicates that this function has some memory leaks
around the tc_mapping, q_bw and qtc_map variables, which are allocated
using rte_zmalloc. However, those are not introduced by this patch, so ok
to take this as-is for now. We should look to ensure leaks are fixed in
future patches. (Also, we should ideally change from using rte_zmalloc to
regular malloc/calloc, unless there is a strong reason why the need these
nodes in hugepage memory).
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> diff --git a/drivers/net/intel/iavf/iavf_tm.c b/drivers/net/intel/iavf/iavf_tm.c
> index 1cf7bfb106..e3492ec491 100644
> --- a/drivers/net/intel/iavf/iavf_tm.c
> +++ b/drivers/net/intel/iavf/iavf_tm.c
> @@ -804,19 +804,25 @@ static int iavf_hierarchy_commit(struct rte_eth_dev *dev,
> int index = 0, node_committed = 0;
> int i, ret_val = IAVF_SUCCESS;
>
> - /* check if port is stopped */
> - if (adapter->stopped != 1) {
> - PMD_DRV_LOG(ERR, "Please stop port first");
> - ret_val = IAVF_ERR_NOT_READY;
> - goto err;
> - }
> -
> if (!(vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_QOS)) {
> PMD_DRV_LOG(ERR, "VF queue tc mapping is not supported");
> ret_val = IAVF_NOT_SUPPORTED;
> goto fail_clear;
> }
>
> + /*
> + * Allow reconfiguration on a running port only when a single queue is
> + * involved (single TC node and single QoS element); otherwise the port
> + * must be stopped first. qos_cap is valid here because the
> + * VIRTCHNL_VF_OFFLOAD_QOS capability was checked above.
> + */
> + if ((vf->tm_conf.nb_tc_node != 1 || vf->qos_cap->num_elem != 1) &&
> + adapter->stopped != 1) {
> + PMD_DRV_LOG(ERR, "Please stop port first");
> + ret_val = IAVF_ERR_NOT_READY;
> + goto err;
> + }
> +
> /* check if all TC nodes are set with VF vsi */
> if (vf->tm_conf.nb_tc_node != vf->qos_cap->num_elem) {
> PMD_DRV_LOG(ERR, "Does not set VF vsi nodes to all TCs");
> @@ -856,7 +862,7 @@ static int iavf_hierarchy_commit(struct rte_eth_dev *dev,
> q_tc_mapping->tc[tm_node->tc].req.queue_count++;
>
> if (tm_node->shaper_profile) {
> - q_bw->cfg[node_committed].queue_id = node_committed;
> + q_bw->cfg[node_committed].queue_id = tm_node->id;
> q_bw->cfg[node_committed].shaper.peak =
> tm_node->shaper_profile->profile.peak.rate /
> 1000 * IAVF_BITS_PER_BYTE;
> @@ -900,7 +906,8 @@ static int iavf_hierarchy_commit(struct rte_eth_dev *dev,
> goto fail_clear;
>
> vf->qtc_map = qtc_map;
> - vf->tm_conf.committed = true;
> + if (adapter->stopped == 1)
> + vf->tm_conf.committed = true;
> return ret_val;
>
> fail_clear:
> --
> 2.47.3
>
> ---------------------------------------------------------------------
> Intel Technology Poland sp. z o.o.
> ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
> Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
>
> Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
> This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
>
next prev parent reply other threads:[~2026-06-30 14:46 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 16:40 [PATCH 0/7] intel network and pcapng updates Dawid Wesierski
2026-06-08 16:40 ` [PATCH 1/7] net/iavf: increase max ring descriptors to hardware limit Dawid Wesierski
2026-06-08 16:40 ` [PATCH 2/7] net/iavf: allow runtime queue rate limit configuration Dawid Wesierski
2026-06-08 16:40 ` [PATCH 3/7] net/ice/base: reduce default scheduler burst size Dawid Wesierski
2026-06-08 16:40 ` [PATCH 4/7] net/ice: timestamp all received packets when PTP is enabled Dawid Wesierski
2026-06-08 16:40 ` [PATCH 5/7] net/iavf: disable runtime queue setup capability Dawid Wesierski
2026-06-08 16:40 ` [PATCH 6/7] pcapng: add user-supplied timestamp support Dawid Wesierski
2026-06-08 17:09 ` Stephen Hemminger
2026-06-08 16:40 ` [PATCH 7/7] net/ice: add header split mbuf callback support Dawid Wesierski
2026-06-08 16:59 ` [PATCH 0/7] intel network and pcapng updates Thomas Monjalon
2026-06-18 14:44 ` [PATCH v3 1/1] pcapng: add user-supplied timestamp support Dawid Wesierski
2026-06-18 15:20 ` Stephen Hemminger
2026-06-18 14:44 ` [PATCH v2 0/7] Intel network drivers enhancements Dawid Wesierski
2026-06-18 14:44 ` [PATCH v2 1/7] ethdev: add header split mbuf callback API Dawid Wesierski
2026-06-18 16:26 ` Thomas Monjalon
2026-06-18 14:44 ` [PATCH v2 2/7] net/iavf: increase max ring descriptors to hardware limit Dawid Wesierski
2026-06-18 14:44 ` [PATCH v2 3/7] net/iavf: allow runtime queue rate limit configuration Dawid Wesierski
2026-06-18 14:44 ` [PATCH v2 4/7] net/ice/base: reduce default scheduler burst size Dawid Wesierski
2026-06-18 14:44 ` [PATCH v2 5/7] net/ice: timestamp all received packets when PTP is enabled Dawid Wesierski
2026-06-18 14:44 ` [PATCH v2 6/7] net/iavf: disable runtime queue setup capability Dawid Wesierski
2026-06-18 14:44 ` [PATCH v2 7/7] net/intel: support header split mbuf callback Dawid Wesierski
2026-06-29 15:33 ` Tested the v3 series on Intel E810-C (Columbiaville) hardware Dawid Wesierski
2026-06-30 12:06 ` [PATCH v3 0/6] Intel network drivers enhancements Dawid Wesierski
2026-06-30 12:06 ` [PATCH v3 1/6] net/iavf: increase max ring descriptors to hardware limit Dawid Wesierski
2026-06-30 14:29 ` Bruce Richardson
2026-06-30 12:06 ` [PATCH v3 2/6] net/iavf: allow runtime queue rate limit configuration Dawid Wesierski
2026-06-30 14:46 ` Bruce Richardson [this message]
2026-06-30 12:06 ` [PATCH v3 3/6] net/ice: add scheduler rate-limiter burst size devarg Dawid Wesierski
2026-06-30 15:20 ` Bruce Richardson
2026-06-30 12:06 ` [PATCH v3 4/6] net/ice: timestamp all received packets when PTP is enabled Dawid Wesierski
2026-06-30 15:39 ` Bruce Richardson
2026-07-03 20:00 ` Dawid Wesierski
2026-06-30 12:06 ` [PATCH v3 5/6] net/iavf: disable runtime queue setup capability Dawid Wesierski
2026-06-30 15:44 ` Bruce Richardson
2026-06-30 12:06 ` [PATCH v3 6/6] app/testpmd: add pinned external-buffer Rx pool command Dawid Wesierski
2026-07-01 10:42 ` [PATCH v3 0/6] Intel network drivers enhancements Bruce Richardson
2026-07-03 12:19 ` [PATCH v4 0/5] " Dawid Wesierski
2026-07-03 12:19 ` [PATCH v4 1/5] net/iavf: increase max ring descriptors to hardware limit Dawid Wesierski
2026-07-03 12:19 ` [PATCH v4 2/5] net/iavf: allow runtime queue rate limit configuration Dawid Wesierski
2026-07-03 12:19 ` [PATCH v4 3/5] net/ice: add scheduler rate-limiter burst size devarg Dawid Wesierski
2026-07-03 12:19 ` [PATCH v4 4/5] net/iavf: disable runtime queue setup capability Dawid Wesierski
2026-07-03 12:19 ` [PATCH v4 5/5] app/testpmd: add pinned external-buffer Rx pool command Dawid Wesierski
2026-06-18 15:45 ` [PATCH v2 0/7] Intel network drivers enhancements Stephen Hemminger
2026-06-18 15:46 ` Stephen Hemminger
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=akPWwOAE4Dbuvb0Y@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dawid.wesierski@intel.com \
--cc=dev@dpdk.org \
--cc=marek.kasiewicz@intel.com \
--cc=stephen@networkplumber.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.