DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: <nipun.gupta@nxp.com>, <dev@dpdk.org>
Cc: <xiaoyun.li@intel.com>, <orika@nvidia.com>, <thomas@monjalon.net>,
	<hemant.agrawal@nxp.com>, Jun Yang <jun.yang@nxp.com>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support unequal number of RXQ and TXQ
Date: Thu, 30 Sep 2021 14:45:55 +0100	[thread overview]
Message-ID: <2528e0db-713e-8c46-c978-304905a80466@intel.com> (raw)
In-Reply-To: <20210928110850.21184-1-nipun.gupta@nxp.com>

On 9/28/2021 12:08 PM, nipun.gupta@nxp.com wrote:
> From: Jun Yang <jun.yang@nxp.com>
> 
> The existing forwarding mode configures the total number of
> queues as the minimum of rxq and txq, so eventually the number
> of txq are same as rxq.
> However in some scenarios, specially for flow control the
> number of rxq and txq can be different.
> This patch makes the txq and function of rxq for all such
> scenario instead of keeping 1:1 relationship between the two.
> 

Hi Nipun,

I expect more code exists that assumes Rx queue number and Tx queue number is
equal, did you able to test unequal queue numbers with below change?

And can you please describe your usecase more, is the device has uneven Rx/Tx
queues?

> Signed-off-by: Jun Yang <jun.yang@nxp.com>
> ---
>  app/test-pmd/config.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index f5765b34f7..7e17f233ba 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -3000,8 +3000,6 @@ rss_fwd_config_setup(void)
>  	int end;
>  
>  	nb_q = nb_rxq;
> -	if (nb_q > nb_txq)
> -		nb_q = nb_txq;
>  	cur_fwd_config.nb_fwd_lcores = (lcoreid_t) nb_fwd_lcores;
>  	cur_fwd_config.nb_fwd_ports = nb_fwd_ports;
>  	cur_fwd_config.nb_fwd_streams =
> @@ -3038,7 +3036,7 @@ rss_fwd_config_setup(void)
>  		fs->rx_port = fwd_ports_ids[rxp];
>  		fs->rx_queue = rxq;
>  		fs->tx_port = fwd_ports_ids[txp];
> -		fs->tx_queue = rxq;
> +		fs->tx_queue = (rxq % nb_txq);

Is this assumes number of Rx queue is always more than number of Tx queue?

>  		fs->peer_addr = fs->tx_port;
>  		fs->retry_enabled = retry_enabled;
>  		rxp++;
> @@ -3253,7 +3251,7 @@ fwd_config_setup(void)
>  		return;
>  	}
>  
> -	if ((nb_rxq > 1) && (nb_txq > 1)){
> +	if ((nb_rxq > 1) && (nb_txq > 1)) {
>  		if (dcb_config) {
>  			for (i = 0; i < nb_fwd_ports; i++) {
>  				pt_id = fwd_ports_ids[i];
> 


  parent reply	other threads:[~2021-09-30 13:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 11:08 nipun.gupta
2021-09-28 11:08 ` [dpdk-dev] [PATCH] app/testpmd: update raw flow to take hex input nipun.gupta
2021-09-28 11:51   ` Nipun Gupta
2021-09-30 13:45 ` Ferruh Yigit [this message]
2021-10-01  7:22   ` [dpdk-dev] [PATCH] app/testpmd: support unequal number of RXQ and TXQ Nipun Gupta
  -- strict thread matches above, loose matches on Subject: below --
2019-12-11  5:30 Hemant Agrawal
2019-12-11  9:59 ` Ananyev, Konstantin
2019-12-11 10:26   ` Jerin Jacob
2019-12-12 11:20     ` Hemant Agrawal
2023-08-20 15:49     ` 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=2528e0db-713e-8c46-c978-304905a80466@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=jun.yang@nxp.com \
    --cc=nipun.gupta@nxp.com \
    --cc=orika@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=xiaoyun.li@intel.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).