<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<pre>Hi Wenxuan Wu,</pre>
<div class="moz-cite-prefix">On 2/9/2022 4:12 PM,
<a class="moz-txt-link-abbreviated" href="mailto:wenxuanx.wu@intel.com">wenxuanx.wu@intel.com</a> wrote:<br>
</div>
<blockquote type="cite" cite="mid:20220209104243.117334-1-wenxuanx.wu@intel.com">
<pre class="moz-quote-pre" wrap="">From: Wenxuan Wu <a class="moz-txt-link-rfc2396E" href="mailto:wenxuanx.wu@intel.com"><wenxuanx.wu@intel.com></a>
when testpmd startup with pf and vfs, it is ok when running, while
exiting, it will result in heap-free-after-use which means pf is
released but vf is still accessing.
Change the logic of func port_is_bonding_slave ,this func
eth_dev_info_get_print_err while pf is released would result in this error.</pre>
</blockquote>
<pre>Removing call to func eth_dev_info_get_print_err, seems like a quick fix to the problem.
Can you try root causing further, where pf is released. And can the order be fixed,
first free vf and then the pf.
</pre>
<blockquote type="cite" cite="mid:20220209104243.117334-1-wenxuanx.wu@intel.com">
<pre class="moz-quote-pre" wrap="">
Fixes: 0a0821bcf312 ("app/testpmd: remove most uses of internal ethdev array")
Cc: <a class="moz-txt-link-abbreviated" href="mailto:stable@dpdk.org">stable@dpdk.org</a>
Signed-off-by: Wenxuan Wu <a class="moz-txt-link-rfc2396E" href="mailto:wenxuanx.wu@intel.com"><wenxuanx.wu@intel.com></a>
---
app/test-pmd/testpmd.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index e1da961311..7fa1944d78 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3824,19 +3824,10 @@ void clear_port_slave_flag(portid_t slave_pid)
uint8_t port_is_bonding_slave(portid_t slave_pid)
{
struct rte_port *port;
- struct rte_eth_dev_info dev_info;
- int ret;
port = &ports[slave_pid];
- ret = eth_dev_info_get_print_err(slave_pid, &dev_info);
- if (ret != 0) {
- TESTPMD_LOG(ERR,
- "Failed to get device info for port id %d,"
- "cannot determine if the port is a bonded slave",
- slave_pid);
- return 0;
- }
- if ((*dev_info.dev_flags & RTE_ETH_DEV_BONDED_SLAVE) || (port->slave_flag == 1))
+
+ if (port->slave_flag == 1)
return 1;
return 0;
}
</pre>
</blockquote>
</body>
</html>