DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Chaoyong He <chaoyong.he@corigine.com>
Cc: dev@dpdk.org, oss-drivers@corigine.com,
	Long Wu <long.wu@corigine.com>,
	Peng Zhang <peng.zhang@corigine.com>
Subject: Re: [PATCH 2/2] net/bonding: add command to set dedicated queue size
Date: Thu, 10 Oct 2024 11:13:07 -0700	[thread overview]
Message-ID: <20241010111307.559d432e@hermes.local> (raw)
In-Reply-To: <20240624020355.3712965-3-chaoyong.he@corigine.com>

On Mon, 24 Jun 2024 10:03:55 +0800
Chaoyong He <chaoyong.he@corigine.com> wrote:

> diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
> index 06c21ebe6d..c19645aa4f 100644
> --- a/drivers/net/bonding/rte_eth_bond_8023ad.c
> +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
> @@ -1254,6 +1254,8 @@ bond_mode_8023ad_conf_assign(struct mode8023ad_private *mode4,
>  	mode4->dedicated_queues.enabled = 0;
>  	mode4->dedicated_queues.rx_qid = UINT16_MAX;
>  	mode4->dedicated_queues.tx_qid = UINT16_MAX;
> +	mode4->dedicated_queues.rx_queue_size = SLOW_RX_QUEUE_HW_DEFAULT_SIZE;
> +	mode4->dedicated_queues.tx_queue_size = SLOW_TX_QUEUE_HW_DEFAULT_SIZE;
>  }
>  
>  void
> @@ -1753,3 +1755,40 @@ rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)
>  
>  	return retval;
>  }
> +
> +int
> +rte_eth_bond_8023ad_dedicated_queue_size_set(uint16_t port,
> +		uint16_t queue_size,
> +		char *queue_type)

Should be const char * for queue type

> +{
> +	struct rte_eth_dev *dev;
> +	struct bond_dev_private *internals;
> +
> +	if (valid_bonding_port_id(port) != 0) {
> +		RTE_BOND_LOG(ERR, "The bonding port id is invalid");
> +		return -EINVAL;
> +	}
> +
> +	dev = &rte_eth_devices[port];
> +
> +	/* Device must be stopped to set up slow queue */
> +	if (dev->data->dev_started != 0) {
> +		RTE_BOND_LOG(ERR, "Please stop the bonding port");
> +		return -EINVAL;
> +	}
> +
> +	internals = dev->data->dev_private;
> +	if (internals->mode4.dedicated_queues.enabled == 0) {
> +		RTE_BOND_LOG(ERR, "Please enable dedicated queue");
> +		return -EINVAL;
> +	}
> +
> +	if (strcmp(queue_type, "rxq") == 0)
> +		internals->mode4.dedicated_queues.rx_queue_size = queue_size;
> +	else if (strcmp(queue_type, "txq") == 0)
> +		internals->mode4.dedicated_queues.tx_queue_size = queue_size;
> +	else
> +		return -EINVAL;

Add error message like:
		RTE_BOND_LOG(ERR, "Unknown queue type %s", queue_type);

> +
> +	return 0;
> +}

  reply	other threads:[~2024-10-10 18:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24  2:03 [PATCH 0/2] add function " Chaoyong He
2024-06-24  2:03 ` [PATCH 1/2] net/bonding: standard the log message Chaoyong He
2024-10-10 18:10   ` Stephen Hemminger
2024-10-11  3:02     ` Chaoyong He
2024-06-24  2:03 ` [PATCH 2/2] net/bonding: add command to set dedicated queue size Chaoyong He
2024-10-10 18:13   ` Stephen Hemminger [this message]
2024-10-11  3:00     ` Chaoyong He
2024-10-11  3:24 ` [PATCH v2 0/2] add function " Chaoyong He
2024-10-11  3:24   ` [PATCH v2 1/2] net/bonding: standard the log message Chaoyong He
2024-10-11  5:10     ` Stephen Hemminger
2024-10-11  3:24   ` [PATCH v2 2/2] net/bonding: add command to set dedicated queue size Chaoyong He
2024-10-17 16:05     ` Thomas Monjalon
  -- strict thread matches above, loose matches on Subject: below --
2024-06-05  5:55 [PATCH 0/2] add function " Chaoyong He
2024-06-05  5:55 ` [PATCH 2/2] net/bonding: add command " Chaoyong He

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=20241010111307.559d432e@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=long.wu@corigine.com \
    --cc=oss-drivers@corigine.com \
    --cc=peng.zhang@corigine.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).