From: Yogev Chaimovich <yogev@cgstowernetworks.com>
To: "dsosnowski@nvidia.com" <dsosnowski@nvidia.com>,
"viacheslavo@nvidia.com" <viacheslavo@nvidia.com>,
"bingz@nvidia.com" <bingz@nvidia.com>,
"orika@nvidia.com" <orika@nvidia.com>,
"suanmingm@nvidia.com" <suanmingm@nvidia.com>,
"matan@nvidia.com" <matan@nvidia.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
Yogev Chaimovich <yogev@cgstowernetworks.com>
Subject: [PATCH] net/mlx5: fix transceiver warning when not exist
Date: Mon, 5 May 2025 12:14:51 +0000 [thread overview]
Message-ID: <DU2PR09MB5486574FE72A43A09A323DCDD68E2@DU2PR09MB5486.eurprd09.prod.outlook.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2 bytes --]
[-- Attachment #1.2: Type: text/html, Size: 562 bytes --]
[-- Attachment #2: 0001-net-mlx5-fix-transceiver-warning-when-not-exist.patch --]
[-- Type: application/octet-stream, Size: 1252 bytes --]
From ffe666291bc531b89620cc28a7b45fa209700f35 Mon Sep 17 00:00:00 2001
From: yogev <yogev@cgstowernetworks.com>
Date: Sun, 4 May 2025 23:11:46 +0300
Subject: [PATCH] net/mlx5: fix transceiver warning when not exist
In case no transceiver exist when trying to get the transceiver's info
There should not be an error message from the library.
The caller may print an appropriate error message using the relevant rte_errno if required.
Signed-off-by: yogev <yogev@cgstowernetworks.com>
---
drivers/net/mlx5/linux/mlx5_ethdev_os.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index e192f698d8..ba5fd2d253 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -1253,8 +1253,10 @@ mlx5_get_module_info(struct rte_eth_dev *dev,
}
ret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr);
if (ret) {
- DRV_LOG(WARNING, "port %u ioctl(SIOCETHTOOL) failed: %s",
- dev->data->port_id, strerror(rte_errno));
+ if (rte_errno != EIO) {
+ DRV_LOG(WARNING, "port %u ioctl(SIOCETHTOOL) failed: %s",
+ dev->data->port_id, strerror(rte_errno));
+ }
return ret;
}
modinfo->type = info.type;
--
2.34.1
next reply other threads:[~2025-05-05 12:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-05 12:14 Yogev Chaimovich [this message]
2025-05-06 13:31 yogev
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=DU2PR09MB5486574FE72A43A09A323DCDD68E2@DU2PR09MB5486.eurprd09.prod.outlook.com \
--to=yogev@cgstowernetworks.com \
--cc=bingz@nvidia.com \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=suanmingm@nvidia.com \
--cc=viacheslavo@nvidia.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).