<meta http-equiv="Content-Type" content="text/html; charset=GB18030"><br><div>Hi,</div><div><br></div><div>When I create bond4 with ConnectX-4 , mlx_flow_create return error;</div><div><br></div><div>When bond_port is opened, slave_port will be closed to sync bond_port config <br></div><div>(bond_ethdev_start -> slave_configure-><span class="pl-c1">rte_eth_dev_stop</span>)<br></div><div><br></div><div><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1716" class="blob-code blob-code-inner js-file-line"><span style="font-style: italic;"><font size="2"><span class="pl-en"><font style="display: inline;" __editorwarp__="1"></font>slave_configure</span></font></span><span style="font-style: italic;"><font size="2">(</font></span><span style="font-style: italic;"><font size="2"><span class="pl-k">struct</span> </font></span><span style="font-style: italic;"><font size="2">rte_eth_dev *bonded_eth_dev,</font></span></td>
</tr>
<tr>
</tr></tbody></table><font style="display: inline; font-size: 13px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;" __editorwarp__="1"></font><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1717" class="blob-code blob-code-inner js-file-line" style="display: table-cell; font-size: 13px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;"> <span style="font-style: italic;">struct rte_eth_dev *slave_eth_dev)</span></td>
</tr>
<tr>
</tr></tbody></table><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1718" class="blob-code blob-code-inner js-file-line"><font style="display: inline; font-size: 13px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;" __editorwarp__="1"><span style="font-style: italic;">{</span></font></td>
</tr>
<tr>
</tr></tbody></table><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1719" class="blob-code blob-code-inner js-file-line"><font style="display: inline; font-size: 13px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;" __editorwarp__="1"><span style="font-style: italic;">uint16_t nb_rx_queues;</span></font></td>
</tr>
<tr>
</tr></tbody></table><font style="display: inline; font-size: 13px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;" __editorwarp__="1"></font><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1720" class="blob-code blob-code-inner js-file-line" style="display: table-cell; font-size: 13px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;"> <span style="font-style: italic;">uint16_t nb_tx_queues;</span></td>
</tr>
<tr>
</tr></tbody></table><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1721" class="blob-code blob-code-inner js-file-line">
<br></td>
</tr>
<tr>
</tr></tbody></table><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1722" class="blob-code blob-code-inner js-file-line"><font style="display: inline; font-size: 13px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;" __editorwarp__="1"><span style="font-style: italic;">int errval;</span></font></td>
</tr>
<tr>
</tr></tbody></table><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1723" class="blob-code blob-code-inner js-file-line">
<br></td>
</tr>
<tr>
</tr></tbody></table><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1724" class="blob-code blob-code-inner js-file-line"><font style="display: inline; font-size: 13px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;" __editorwarp__="1"><span style="font-style: italic;">struct bond_dev_private *internals = bonded_eth_dev->data->dev_private;</span></font></td>
</tr>
<tr>
</tr></tbody></table><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1725" class="blob-code blob-code-inner js-file-line">
<br></td>
</tr>
<tr>
</tr></tbody></table><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1726" class="blob-code blob-code-inner js-file-line"><font style="display: inline; font-size: 13px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;" __editorwarp__="1"><span style="font-style: italic;">/* Stop slave */</span></font></td>
</tr>
<tr>
</tr></tbody></table><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1727" class="blob-code blob-code-inner js-file-line"> <font style="display: inline; font-size: 13px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;" __editorwarp__="1"><span style="font-style: italic;">errval = </span><span style="font-style: italic;">rte_eth_dev_stop</span><span style="font-style: italic;">(slave_eth_dev->data->port_id);</span></font></td>
</tr>
<tr>
</tr></tbody></table><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1728" class="blob-code blob-code-inner js-file-line"><font style="display: inline; font-size: 13px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;" __editorwarp__="1"><span style="font-style: italic;">if</span><span style="font-style: italic;"> (errval != 0)</span></font></td>
</tr>
<tr>
</tr></tbody></table><font style="display: inline; font-size: 13px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;" __editorwarp__="1"></font><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1729" class="blob-code blob-code-inner js-file-line" style="display: table-cell; font-size: 13px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;"> <span style="font-style: italic;">RTE_BOND_LOG(ERR, "rte_eth_dev_stop: port %u, err (%d)",</span></td>
</tr>
<tr>
</tr></tbody></table><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1730" class="blob-code blob-code-inner js-file-line"> <font style="display: inline; font-size: 13px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;" __editorwarp__="1"><span style="font-style: italic;">slave_eth_dev->data->port_id, errval);</span></font></td>
</tr>
<tr>
</tr></tbody></table><table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="C" data-tagsearch-path="drivers/net/bonding/rte_eth_bond_pmd.c"><tbody><tr><td id="LC1715" class="blob-code blob-code-inner js-file-line"><br><br>However, If the device is not started yetm it is not allowed to created a flow from application.<br>(slave_configure -> <span class="pl-c1">bond_ethdev_8023ad_flow_set -> rte_flow_create -> mlx5_flow_create</span>)<br><br>I want to add <span class="pl-c1">rte_eth_dev_start before </span><span class="pl-c1">bond_ethdev_8023ad_flow_set. This can solve my problem.</span><br><img src="cid:03349B68@BCE9222C.01C59164.png" style="width: 385px; height: 444px;" id="img_insert_168727388848702527905893169221" modifysize="60%" diffpixels="11px" scalingmode="zoom"><br><br></td>
</tr>
<tr>
</tr></tbody></table><hr style="margin: 0 0 10px 0;border: 0;border-bottom:1px solid #E4E5E6;height:0;line-height:0;font-size:0;padding: 20px 0 0 0;width: 50px;" align="left"><div style="font-size:14px;font-family:Verdana;color:#000;"><a class="xm_write_card" id="in_alias" style="white-space: normal; display: inline-block; text-decoration: none !important;font-family: -apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei;" href="https://wx.mail.qq.com/home/index?t=readmail_businesscard_midpage&nocheck=true&name=compile_success&icon=https%3A%2F%2Fthirdqq.qlogo.cn%2Fg%3Fb%3Doidb%26k%3D1hvZ12icF5DbQjpCxcbUedA%26s%3D0&mail=980965867%40qq.com&code=Bjs91Gs3SV6ex5NMSZFNl3ktcNXujD8f_s-Bq2rMizJq1Yw19uNkKUy3WZZeIWqlYdHH8VRTRgFGhPK2pcmBnQ" target="_blank"><table style="white-space: normal;table-layout: fixed; padding-right: 20px;" contenteditable="false" cellspacing="0" cellpadding="0"><tbody><tr valign="top"><td style="width: 40px;min-width: 40px; padding-top:10px"><div style="width: 38px; height: 38px; border: 1px #FFF solid; border-radius:50%; margin: 0;vertical-align: top;box-shadow: 0 0 10px 0 rgba(127,152,178,0.14);"><img src="https://thirdqq.qlogo.cn/g?b=oidb&k=1hvZ12icF5DbQjpCxcbUedA&s=0" style="width:100%;height:100%;border-radius:50%;pointer-events: none;"></div></td><td style="padding: 10px 0 8px 10px;"><div class="businessCard_name" style="font-size: 14px;color: #33312E;line-height: 20px; padding-bottom: 2px; margin:0;font-weight: 500;">compile_success</div><div class="businessCard_mail" style="font-size: 12px;color: #999896;line-height: 18px; margin:0;">980965867@qq.com</div></td></tr></tbody></table></a></div></div>