netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2 v2] igb: Add macro for size of RETA indirection table
@ 2013-07-31 11:47 Laura Mihaela Vasilescu
  2013-07-31 11:47 ` [PATCH 2/2 v2] igb: Expose RSS indirection table for ethtool Laura Mihaela Vasilescu
  2013-07-31 12:12 ` [PATCH 1/2 v2] igb: Add macro for size of RETA indirection table Jeff Kirsher
  0 siblings, 2 replies; 4+ messages in thread
From: Laura Mihaela Vasilescu @ 2013-07-31 11:47 UTC (permalink / raw)
  To: netdev
  Cc: carolyn.wyborny, anjali.singhai, jeffrey.t.kirsher,
	alexander.h.duyck, Laura Mihaela Vasilescu

RETA indirection table is used to assign the received data to a CPU
in order to maintain an efficient distribution of network receive
processing accross multiple CPUs.

This patch removes the hard-coded value for the size of the indirection
table and defines a new macro.

Signed-off-by: Laura Mihaela Vasilescu <laura.vasilescu@rosedu.org>
---
Changes since v1:
	* enhance commit description

 drivers/net/ethernet/intel/igb/igb.h      |    2 ++
 drivers/net/ethernet/intel/igb/igb_main.c |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index 15ea8dc..5a2659b 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -343,6 +343,8 @@ struct hwmon_buff {
 	};
 #endif
 
+#define IGB_RETA_SIZE	128
+
 /* board specific private data structure */
 struct igb_adapter {
 	unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 6a0c1b6..00f5d96 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -3127,7 +3127,7 @@ static void igb_setup_mrqc(struct igb_adapter *adapter)
 	 * we are generating the results for n and n+2 and then interleaving
 	 * those with the results with n+1 and n+3.
 	 */
-	for (j = 0; j < 32; j++) {
+	for (j = 0; j < IGB_RETA_SIZE / 4; j++) {
 		/* first pass generates n and n+2 */
 		u32 base = ((j * 0x00040004) + 0x00020000) * num_rx_queues;
 		u32 reta = (base & 0x07800780) >> (7 - shift);
-- 
1.7.10.4

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

end of thread, other threads:[~2013-07-31 12:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-31 11:47 [PATCH 1/2 v2] igb: Add macro for size of RETA indirection table Laura Mihaela Vasilescu
2013-07-31 11:47 ` [PATCH 2/2 v2] igb: Expose RSS indirection table for ethtool Laura Mihaela Vasilescu
2013-07-31 12:13   ` Jeff Kirsher
2013-07-31 12:12 ` [PATCH 1/2 v2] igb: Add macro for size of RETA indirection table Jeff Kirsher

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