From: Yuan Wang <yuanx.wang@intel.com>
To: dev@dpdk.org
Cc: Yuan Wang <yuanx.wang@intel.com>, stable@dpdk.org
Subject: [PATCH] net/e1000: fix eeprom dump failure
Date: Tue, 15 Apr 2025 15:48:02 +0800 [thread overview]
Message-ID: <20250415074802.454733-1-yuanx.wang@intel.com> (raw)
There is a incorrect comparison in get_eeprom that cause epprom dump fail.
This patch fixes this issue.
Fixes: 83c314da4c38 (igb: add access to specific device info)
Cc: stable@dpdk.org
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
---
drivers/net/intel/e1000/igb_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/intel/e1000/igb_ethdev.c b/drivers/net/intel/e1000/igb_ethdev.c
index cbd2f15f5f..738c0ef895 100644
--- a/drivers/net/intel/e1000/igb_ethdev.c
+++ b/drivers/net/intel/e1000/igb_ethdev.c
@@ -5219,7 +5219,7 @@ eth_igb_get_eeprom(struct rte_eth_dev *dev,
first = in_eeprom->offset >> 1;
length = in_eeprom->length >> 1;
if ((first >= hw->nvm.word_size) ||
- ((first + length) >= hw->nvm.word_size))
+ ((first + length) > hw->nvm.word_size))
return -EINVAL;
in_eeprom->magic = hw->vendor_id |
--
2.47.1
reply other threads:[~2025-04-15 7:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250415074802.454733-1-yuanx.wang@intel.com \
--to=yuanx.wang@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/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).