DPDK usage discussions
 help / color / mirror / Atom feed
From: =?gb18030?B?Y29tcGlsZV9zdWNjZXNz?= <980965867@qq.com>
To: =?gb18030?B?dXNlcnM=?= <users@dpdk.org>,
	=?gb18030?B?ZGV2?= <dev@dpdk.org>,
	=?gb18030?B?bWF0YW4=?= <matan@mellanox.com>,
	=?gb18030?B?c2hhaGFmcw==?= <shahafs@mellanox.com>,
	=?gb18030?B?dmlhY2hlc2xhdm8=?= <viacheslavo@mellanox.com>
Subject: net/mlx:mlx5 mlx_flow_create failed  when set bond_mode_8023
Date: Tue, 20 Jun 2023 23:25:53 +0800	[thread overview]
Message-ID: <tencent_DD9E4087F3178CBF1A854CEFD82C346CC606@qq.com> (raw)


[-- 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&nbsp; will be closed to sync bond_port config&nbsp; 

£¨bond_ethdev_start -&gt; slave_configure-&gt;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-&gt;data-&gt;dev_private;         
                    
 
         
                    
/* Stop slave */         
                    
	errval = rte_eth_dev_stop(slave_eth_dev-&gt;data-&gt;port_id);         
                    
if (errval != 0)         
                    
		RTE_BOND_LOG(ERR, "rte_eth_dev_stop: port %u, err (%d)",         
                    
			     slave_eth_dev-&gt;data-&gt;port_id, errval);         
                    


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

I&nbsp; 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) {

             reply	other threads:[~2023-06-21  8:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 15:25 =?gb18030?B?Y29tcGlsZV9zdWNjZXNz?= [this message]
2023-07-12 11:29 ` Slava Ovsiienko

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=tencent_DD9E4087F3178CBF1A854CEFD82C346CC606@qq.com \
    --to=980965867@qq.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=users@dpdk.org \
    --cc=viacheslavo@mellanox.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).