fm10k: fix incorrect index calculation in fm10k_write_reta
Subsystems (2)
PATCH v2 1/1 fm10k: fix incorrect index calculation in fm10k_write_reta
The index calculated when looping through the indir array passed to fm10k_write_reta was incorrectly calculated as the first part i needs to be multiplied by 4.
---
Notes:
Jeff, this needs to be squashed into "[v1,1/4] fm10k: fix possible null pointer deref after kcalloc", and I am sending it this way since you requested I work only at the top if the queue for now.
- v2
* Fix checkpatch warning
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c +3 -2
@@ -983,9 +983,10 @@ void fm10k_write_reta(struct fm10k_intfc *interface, const u32 *indir)/* generate a new table if we weren't given one */ for (j =0 ; j <4 ; j++) {if (indir) - n = indir[i + j]; + n = indir[4 * i + j];else - n =ethtool_rxfh_indir_default (i + j, rss_i); + n =ethtool_rxfh_indir_default (4 * i + j, + rss_i); table[j] = n; }
Signature · 1 line
2.8.1.371.g31c5d55
Singh
PATCH v2 1/1 fm10k: fix incorrect index calculation in fm10k_write_reta
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Monday, April 18, 2016 3:45 PM
To: Kirsher, Jeffrey T <[email protected]>; Intel Wired LAN <[email protected]>
Subject: [Intel-wired-lan] [PATCH v2] fm10k: fix incorrect index calculation in fm10k_write_reta
The index calculated when looping through the indir array passed to fm10k_write_reta was incorrectly calculated as the first part i needs to be multiplied by 4.
---
Singh
PATCH v2 1/1 fm10k: fix incorrect index calculation in fm10k_write_reta
In reply to Jacob Keller-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Monday, April 18, 2016 3:45 PM
To: Kirsher, Jeffrey T <[email protected]>; Intel Wired LAN <[email protected]>
Subject: [Intel-wired-lan] [PATCH v2] fm10k: fix incorrect index calculation in fm10k_write_reta
The index calculated when looping through the indir array passed to fm10k_write_reta was incorrectly calculated as the first part i needs to be multiplied by 4.
---