DPDK patches and discussions
 help / color / mirror / Atom feed
From: Usman Tanveer <usman.tanveer@emumba.com>
To: chas3@att.com, humin29@huawei.com
Cc: dev@dpdk.org, Usman Tanveer <usman.tanveer@emumba.com>
Subject: [PATCH] net/bonding: fix error in bonding mode 4 with dedicated queues enabled
Date: Sat, 24 Sep 2022 19:19:53 +0500	[thread overview]
Message-ID: <20220924141953.273290-1-usman.tanveer@emumba.com> (raw)

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 */
-- 
2.25.1


             reply	other threads:[~2022-09-24 14:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-24 14:19 Usman Tanveer [this message]
2022-09-25 10:42 ` Chas Williams

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=20220924141953.273290-1-usman.tanveer@emumba.com \
    --to=usman.tanveer@emumba.com \
    --cc=chas3@att.com \
    --cc=dev@dpdk.org \
    --cc=humin29@huawei.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).