DPDK usage discussions
 help / color / mirror / Atom feed
* net/mlx:mlx5 mlx_flow_create failed  when set bond_mode_8023
@ 2023-06-20 15:25 =?gb18030?B?Y29tcGlsZV9zdWNjZXNz?=
  2023-07-12 11:29 ` Slava Ovsiienko
  0 siblings, 1 reply; 2+ messages in thread
From: =?gb18030?B?Y29tcGlsZV9zdWNjZXNz?= @ 2023-06-20 15:25 UTC (permalink / raw)
  To: =?gb18030?B?dXNlcnM=?=, =?gb18030?B?ZGV2?=,
	=?gb18030?B?bWF0YW4=?=, =?gb18030?B?c2hhaGFmcw==?=,
	=?gb18030?B?dmlhY2hlc2xhdm8=?=


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: Type: text/plain; charset="gb18030", Size: 1568 bytes --]

Hi,


When I create bond4 with ConnectX-4 , mlx_flow_create return error;


When bond_port  is opened, slave_port  will be closed to sync bond_port config  

£¨bond_ethdev_start -> slave_configure->rte_eth_dev_stop£©



6¤7slave_configure(struct rte_eth_dev *bonded_eth_dev,         
                    
		struct rte_eth_dev *slave_eth_dev)         
                    
{         
                    
uint16_t nb_rx_queues;         
                    
	uint16_t nb_tx_queues;         
                    
 
         
                    
int errval;         
                    
 
         
                    
struct bond_dev_private *internals = bonded_eth_dev->data->dev_private;         
                    
 
         
                    
/* Stop slave */         
                    
	errval = rte_eth_dev_stop(slave_eth_dev->data->port_id);         
                    
if (errval != 0)         
                    
		RTE_BOND_LOG(ERR, "rte_eth_dev_stop: port %u, err (%d)",         
                    
			     slave_eth_dev->data->port_id, errval);         
                    


However,  If the device is not started yetm it is not allowed to created a flow from application.
£¨slave_configure -> bond_ethdev_8023ad_flow_set -> rte_flow_create -> mlx5_flow_create£©

I  want to add rte_eth_dev_start before bond_ethdev_8023ad_flow_set. This can solve my problem.


         
                    


compile_success
980965867@qq.com

[-- Attachment #1.2: Type: text/html, Size: 12702 bytes --]

[-- Attachment #2: 03349B68@BCE9222C.01C59164.png.jpg --]
[-- Type: image/jpeg, Size: 47269 bytes --]

[-- Attachment #3: fix-mlx4-bond-flow-create-failed.patch --]
[-- Type: application/octet-stream, Size: 797 bytes --]

diff -Nur dpdk-21.11.org/drivers/net/bonding/rte_eth_bond_pmd.c dpdk-21.11/drivers/net/bonding/rte_eth_bond_pmd.c
--- dpdk-21.11.org/drivers/net/bonding/rte_eth_bond_pmd.c	2023-06-20 15:21:19.860000000 +0000
+++ dpdk-21.11/drivers/net/bonding/rte_eth_bond_pmd.c	2023-06-20 15:23:39.468000000 +0000
@@ -1848,6 +1848,15 @@
 					internals->mode4.dedicated_queues.flow[slave_eth_dev->data->port_id],
 					&flow_error);
 
+		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;
+
+		}
+
+
 		errval = bond_ethdev_8023ad_flow_set(bonded_eth_dev,
 				slave_eth_dev->data->port_id);
 		if (errval != 0) {

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

end of thread, other threads:[~2023-07-20  5:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-20 15:25 net/mlx:mlx5 mlx_flow_create failed when set bond_mode_8023 =?gb18030?B?Y29tcGlsZV9zdWNjZXNz?=
2023-07-12 11:29 ` Slava Ovsiienko

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