DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ed Czeck <ed.czeck@atomicrules.com>, dev@dpdk.org
Cc: shepard.siegel@atomicrules.com, john.miller@atomicrules.com,
	stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 1/2] net/ark: remove queue offset based on port id
Date: Fri, 19 Jul 2019 18:27:31 +0100
Message-ID: <9c362eae-3b6d-f11d-eb95-a98af1c54ddd@intel.com> (raw)
In-Reply-To: <1563541663-10797-1-git-send-email-ed.czeck@atomicrules.com>

On 7/19/2019 2:07 PM, Ed Czeck wrote:
> Queue index was incorrectly incremented with port, which
> caused swizzling of packet placement among queues. 

What is "swizzling of packet placement"?


'qidx' is used to set 'phys_qid', if what the name suggest is correct it is used
to access the actual physical queues.

How this was working if you are calculating physical queue indexes wrong?
(Of-course except port 0)

Are you actually fixing the multiple port support?


> This manifested
> when the number of configured ports was >1 and < nb_queues.

I can see port number ">1", but is the 'nb_queues' limitation real?

If there are 2 queues per port, and you are configuring 3 ports will the
original calculation be correct?

> 
> Fixes: c33d45af3633 ("net/ark: add Tx initial version")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
> ---
>  drivers/net/ark/ark_ethdev_rx.c | 4 +---
>  drivers/net/ark/ark_ethdev_tx.c | 4 +---
>  2 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c
> index 7de1a98..6156730 100644
> --- a/drivers/net/ark/ark_ethdev_rx.c
> +++ b/drivers/net/ark/ark_ethdev_rx.c
> @@ -127,9 +127,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
>  	uint32_t i;
>  	int status;
>  
> -	/* Future works: divide the Q's evenly with multi-ports */
> -	int port = dev->data->port_id;
> -	int qidx = port + queue_idx;
> +	int qidx = queue_idx;
>  
>  	/* We may already be setup, free memory prior to re-allocation */
>  	if (dev->data->rx_queues[queue_idx] != NULL) {
> diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
> index 1967655..08bcf43 100644
> --- a/drivers/net/ark/ark_ethdev_tx.c
> +++ b/drivers/net/ark/ark_ethdev_tx.c
> @@ -211,9 +211,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
>  	struct ark_tx_queue *queue;
>  	int status;
>  
> -	/* Future: divide the Q's evenly with multi-ports */
> -	int port = dev->data->port_id;
> -	int qidx = port + queue_idx;
> +	int qidx = queue_idx;
>  
>  	if (!rte_is_power_of_2(nb_desc)) {
>  		PMD_DRV_LOG(ERR,
> 


  parent reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-16 21:34 Ed Czeck
2019-07-16 21:34 ` [dpdk-dev] [PATCH 2/2] net/ark: remove resources when port is close Ed Czeck
2019-07-17 17:33 ` [dpdk-dev] [PATCH 1/2] net/ark: remove queue offset based on port id Ferruh Yigit
2019-07-19 13:07 ` Ed Czeck
2019-07-19 13:07   ` [dpdk-dev] [PATCH 2/2] net/ark: remove resources when port is close Ed Czeck
2019-07-19 17:27   ` Ferruh Yigit [this message]
2019-07-22 12:35 ` [dpdk-dev] [PATCH 1/2] net/ark: remove queue offset based on port id Ed Czeck
2019-07-22 12:35   ` [dpdk-dev] [PATCH 2/2] net/ark: remove resources when port is close Ed Czeck
2019-07-22 16:07   ` [dpdk-dev] [PATCH 1/2] net/ark: remove queue offset based on port id Ferruh Yigit

Reply instructions:

You may reply publically 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=9c362eae-3b6d-f11d-eb95-a98af1c54ddd@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=ed.czeck@atomicrules.com \
    --cc=john.miller@atomicrules.com \
    --cc=shepard.siegel@atomicrules.com \
    --cc=stable@dpdk.org \
    /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

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org dpdk-dev@archiver.kernel.org
	public-inbox-index dpdk-dev


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox