DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chas Williams <3chas3@gmail.com>
To: Usman Tanveer <usman.tanveer@emumba.com>,
	chas3@att.com, humin29@huawei.com
Cc: dev@dpdk.org
Subject: Re: [PATCH] net/bonding: fix error in bonding mode 4 with dedicated queues enabled
Date: Sun, 25 Sep 2022 06:42:23 -0400	[thread overview]
Message-ID: <c3f30b67-6148-3c6a-b682-4fb170fd1c01@gmail.com> (raw)
In-Reply-To: <20220924141953.273290-1-usman.tanveer@emumba.com>

It's probably cleaner to just move the bond_ethdev_8023ad_flow_set
until after the device start. For the reader, they don't need to
understand why you might not have started the device earlier.

On 9/24/22 10:19, Usman Tanveer wrote:
> when dedicated queues are enable with bonding mode 4 (mlx5), the
> application sets the flow, which cannot be set if the device is not
> started. This fixed the issue by starting the device just before
> setting the flow. Because device should be started to set the flow.
> Also it does not effect other driver codes (I have tried on ixgbe).
> 
> Bugzilla ID: 759
> 
> Signed-off-by: Usman Tanveer <usman.tanveer@emumba.com>
> ---
>   drivers/net/bonding/rte_eth_bond_pmd.c | 19 ++++++++++++++-----
>   1 file changed, 14 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index 73e6972035..2dfb613ea6 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -1829,6 +1829,13 @@ slave_start(struct rte_eth_dev *bonded_eth_dev,
>   				slave_eth_dev->data->port_id, errval);
>   		}
>   
> +		errval = rte_eth_dev_start(slave_eth_dev->data->port_id);
> +		if (errval != 0) {
> +			RTE_BOND_LOG(ERR, "rte_eth_dev_start: port=%u, err (%d)",
> +					slave_eth_dev->data->port_id, errval);
> +			return -1;
> +		}
> +
>   		errval = bond_ethdev_8023ad_flow_set(bonded_eth_dev,
>   				slave_eth_dev->data->port_id);
>   		if (errval != 0) {
> @@ -1840,11 +1847,13 @@ slave_start(struct rte_eth_dev *bonded_eth_dev,
>   	}
>   
>   	/* Start device */
> -	errval = rte_eth_dev_start(slave_eth_dev->data->port_id);
> -	if (errval != 0) {
> -		RTE_BOND_LOG(ERR, "rte_eth_dev_start: port=%u, err (%d)",
> -				slave_eth_dev->data->port_id, errval);
> -		return -1;
> +	if (!slave_eth_dev->data->dev_started) {
> +		errval = rte_eth_dev_start(slave_eth_dev->data->port_id);
> +		if (errval != 0) {
> +			RTE_BOND_LOG(ERR, "rte_eth_dev_start: port=%u, err (%d)",
> +					slave_eth_dev->data->port_id, errval);
> +			return -1;
> +		}
>   	}
>   
>   	/* If RSS is enabled for bonding, synchronize RETA */

      reply	other threads:[~2022-09-25 10:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-24 14:19 Usman Tanveer
2022-09-25 10:42 ` Chas Williams [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=c3f30b67-6148-3c6a-b682-4fb170fd1c01@gmail.com \
    --to=3chas3@gmail.com \
    --cc=chas3@att.com \
    --cc=dev@dpdk.org \
    --cc=humin29@huawei.com \
    --cc=usman.tanveer@emumba.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).