[DPDK/ethdev Bug 1690] Calling rte_eth_dev_get_module_info() and rte_eth_dev_get_module_eeprom() for MLX ConnectX-6 spawn errors when transceiver not inserted
bugzilla at dpdk.org
bugzilla at dpdk.org
Thu Apr 3 22:12:35 CEST 2025
https://bugs.dpdk.org/show_bug.cgi?id=1690
Bug ID: 1690
Summary: Calling rte_eth_dev_get_module_info() and
rte_eth_dev_get_module_eeprom() for MLX ConnectX-6
spawn errors when transceiver not inserted
Product: DPDK
Version: unspecified
Hardware: All
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: dev at dpdk.org
Reporter: yogev at cgstowernetworks.com
Target Milestone: ---
For Mellanox 'MT2892 Family [ConnectX-6 Dx] 101d'
Calling the dpdk-testpmd's "show port 0 module_eeprom" results in an error when
a transceiver isn't inserted.
The error is spawned from the mlx source:
drivers/net/mlx5/linux/mlx5_ethdev_os.c
In two places:
```
int mlx5_get_module_info(...)
{
...
ret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr);
if (ret) {
DRV_LOG(DEBUG, "port %u ioctl(SIOCETHTOOL) failed: %s",
dev->data->port_id, strerror(rte_errno));
return ret;
}
...
}
```
And
```
int mlx5_get_module_eeprom(...)
{
...
ret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr);
if (ret)
DRV_LOG(WARNING, "port %u ioctl(SIOCETHTOOL) failed: %s",
dev->data->port_id, strerror(rte_errno));
...
}
```
dpdk-testpmd shows:
```
testpmd> show port 0 module_eeprom
mlx5_net: port 0 ioctl(SIOCETHTOOL) failed: Input/output error //
<------------ this error.
device is removed
```
When trying to use these functions in my own application, as dpdk-testpmd does:
rte_eth_dev_get_module_info() and rte_eth_dev_get_module_eeprom() this error
log gets printed as well.
An expected result would be to check out the return value and print these
errors if required by the caller.
For my scenario, I would like a silence fail in case there's no transceiver.
I've tried to overcome this by asking first if a device "exists" using
rte_eth_dev_is_removed() and rte_eth_dev_is_valid_port() but they don't reflect
the transceiver state.
A possible solution would be to print these errors in DEBUG
Please advice,
Thanks.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20250403/bae8b651/attachment-0001.htm>
More information about the dev
mailing list