Commit c342b39e authored by Laura Mihaela Vasilescu's avatar Laura Mihaela Vasilescu Committed by Jeff Kirsher

igb: Add macro for size of RETA indirection table

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

This patch removes the hard-coded value for the size of the indirection
table and defines a new macro.
Signed-off-by: default avatarLaura Mihaela Vasilescu <laura.vasilescu@rosedu.org>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 7dc98a62
...@@ -343,6 +343,8 @@ struct hwmon_buff { ...@@ -343,6 +343,8 @@ struct hwmon_buff {
}; };
#endif #endif
#define IGB_RETA_SIZE 128
/* board specific private data structure */ /* board specific private data structure */
struct igb_adapter { struct igb_adapter {
unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)]; unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
......
...@@ -3157,7 +3157,7 @@ static void igb_setup_mrqc(struct igb_adapter *adapter) ...@@ -3157,7 +3157,7 @@ static void igb_setup_mrqc(struct igb_adapter *adapter)
* we are generating the results for n and n+2 and then interleaving * we are generating the results for n and n+2 and then interleaving
* those with the results with n+1 and n+3. * 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 */ /* first pass generates n and n+2 */
u32 base = ((j * 0x00040004) + 0x00020000) * num_rx_queues; u32 base = ((j * 0x00040004) + 0x00020000) * num_rx_queues;
u32 reta = (base & 0x07800780) >> (7 - shift); u32 reta = (base & 0x07800780) >> (7 - shift);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment