https://bugs.dpdk.org/show_bug.cgi?id=624
Bug ID: 624
Summary: Port close results in "invalid port_id" log message
Product: DPDK
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Closing port leads to an EAL error log message:
```
int
rte_eth_dev_close(uint16_t port_id)
{
struct rte_eth_dev *dev;
int firsterr, binerr;
int *lasterr = &firsterr;
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
dev = &rte_eth_devices[port_id];
RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_close, -ENOTSUP);
*lasterr = (*dev->dev_ops->dev_close)(dev);
if (*lasterr != 0)
lasterr = &binerr;
rte_ethdev_trace_close(port_id);
*lasterr = rte_eth_dev_release_port(dev);
return eth_err(port_id, firsterr);
}
```
eth_err() is called after rte_dev_release_port(), so the port_id is no longer
valid at that stage. The eth_err() itself calls rte_eth_dev_is_removed(), which
in turn calls RTE_ETH_VALID_PORTID_OR_ERR_RET(), which outputs a log message on
invalid port_id.
Offending commit seems to be:
```
commit 8a5a0aad5d3e4f4f75ca81932eb247de94765685
Author: Thomas Monjalon <[email protected]>
Date: Fri Oct 16 15:32:59 2020 +0200
ethdev: allow close function to return an error
The API function rte_eth_dev_close() was returning void.
The return type is changed to int for notifying of errors.
If an error happens during a close operation,
the status of the port is undefined,
a maximum of resources having been freed.
Signed-off-by: Thomas Monjalon <[email protected]>
Reviewed-by: Liron Himi <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>
Acked-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>
```
--
You are receiving this mail because:
You are the assignee for the bug.