DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/e1000: fix eeprom dump failure
@ 2025-04-15  7:48 Yuan Wang
  2025-04-28 15:37 ` Bruce Richardson
  0 siblings, 1 reply; 2+ messages in thread
From: Yuan Wang @ 2025-04-15  7:48 UTC (permalink / raw)
  To: dev; +Cc: Yuan Wang, stable

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/e1000: fix eeprom dump failure
  2025-04-15  7:48 [PATCH] net/e1000: fix eeprom dump failure Yuan Wang
@ 2025-04-28 15:37 ` Bruce Richardson
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2025-04-28 15:37 UTC (permalink / raw)
  To: Yuan Wang; +Cc: dev, stable

On Tue, Apr 15, 2025 at 03:48:02PM +0800, Yuan Wang wrote:
> 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;
>  

Fix makes sense.
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied to dpdk-next-net-intel

Thanks,
/Bruce

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-28 15:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-15  7:48 [PATCH] net/e1000: fix eeprom dump failure Yuan Wang
2025-04-28 15:37 ` Bruce Richardson

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).