DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 2/2] net/bonding: ensure device is started for dedicated queues setup
@ 2021-10-05 17:19 Martin Havlik
  2023-10-31 21:38 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Havlik @ 2021-10-05 17:19 UTC (permalink / raw)
  To: xhavli56, Chas Williams, Min Hu (Connor),
	Ferruh Yigit, Thomas Monjalon, Andrew Rybchenko, Ajit Khaparde,
	Ivan Ilchenko, Aman Deep Singh, Chengwen Feng, Kiran KN,
	RongQing Li
  Cc: Jan Viktorin, dev, haiyue.wang

The flow rule governing dedicated queues is now created
when the slave allows it. That is before or after the start
of the slave device, as the PMD is able to.

Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 8ed9e036f4..66b38610f8 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1685,6 +1685,7 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
 
 	int errval;
 	uint16_t q_id;
+	bool device_started = false;
 	struct rte_flow_error flow_error;
 
 	struct bond_dev_private *internals = bonded_eth_dev->data->dev_private;
@@ -1815,6 +1816,16 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
 					internals->mode4.dedicated_queues.flow[slave_eth_dev->data->port_id],
 					&flow_error);
 
+		if (slave_eth_dev->dev_capa & RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START == 0) {
+			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 errval;
+			}
+		}
+		device_started = true;
+
 		errval = bond_ethdev_8023ad_flow_set(bonded_eth_dev,
 				slave_eth_dev->data->port_id);
 		if (errval != 0) {
@@ -1825,12 +1836,14 @@ slave_configure(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 (!device_started) {
+		/* 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 RSS is enabled for bonding, synchronize RETA */
-- 
2.27.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/bonding: ensure device is started for dedicated queues setup
  2021-10-05 17:19 [dpdk-dev] [PATCH 2/2] net/bonding: ensure device is started for dedicated queues setup Martin Havlik
@ 2023-10-31 21:38 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2023-10-31 21:38 UTC (permalink / raw)
  To: Martin Havlik
  Cc: Chas Williams, Min Hu (Connor),
	Ferruh Yigit, Thomas Monjalon, Andrew Rybchenko, Ajit Khaparde,
	Ivan Ilchenko, Aman Deep Singh, Chengwen Feng, Kiran KN,
	RongQing Li, Jan Viktorin, dev, haiyue.wang

On Tue,  5 Oct 2021 19:19:39 +0200
Martin Havlik <xhavli56@stud.fit.vutbr.cz> wrote:

> The flow rule governing dedicated queues is now created
> when the slave allows it. That is before or after the start
> of the slave device, as the PMD is able to.
> 
> Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>

This patch no longer applies because of recent name changes in bonding.
If still needed please update and resubmit.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-31 21:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05 17:19 [dpdk-dev] [PATCH 2/2] net/bonding: ensure device is started for dedicated queues setup Martin Havlik
2023-10-31 21:38 ` Stephen Hemminger

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).