aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb_main.c
diff options
context:
space:
mode:
authorAkeem G. Abodunrin <akeem.g.abodunrin@intel.com>2012-11-12 23:03:21 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-13 14:18:14 -0500
commit039454a818b4bfdb530d84b2cdcf014b2f4d2b53 (patch)
tree5ef12c533df7e3760215461858ff26f2b3051471 /drivers/net/ethernet/intel/igb/igb_main.c
parent867eb39e8b023b25073ad9d47ff3230b4f65990b (diff)
igb: Support for modifying UDP RSS flow hashing
This patch provides ability to enable or disable UDP RSS hashing. It gives users option of generating RSS hash based on the UDP source and destination ports numbers. Currently, UDP flow hash is always disabled in igb-driver. Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_main.c')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 082ce73dc627..da9fd7b8e23a 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2874,18 +2874,21 @@ static void igb_setup_mrqc(struct igb_adapter *adapter)
2874 2874
2875 /* Don't need to set TUOFL or IPOFL, they default to 1 */ 2875 /* Don't need to set TUOFL or IPOFL, they default to 1 */
2876 wr32(E1000_RXCSUM, rxcsum); 2876 wr32(E1000_RXCSUM, rxcsum);
2877 /*
2878 * Generate RSS hash based on TCP port numbers and/or
2879 * IPv4/v6 src and dst addresses since UDP cannot be
2880 * hashed reliably due to IP fragmentation
2881 */
2882 2877
2878 /* Generate RSS hash based on packet types, TCP/UDP
2879 * port numbers and/or IPv4/v6 src and dst addresses
2880 */
2883 mrqc = E1000_MRQC_RSS_FIELD_IPV4 | 2881 mrqc = E1000_MRQC_RSS_FIELD_IPV4 |
2884 E1000_MRQC_RSS_FIELD_IPV4_TCP | 2882 E1000_MRQC_RSS_FIELD_IPV4_TCP |
2885 E1000_MRQC_RSS_FIELD_IPV6 | 2883 E1000_MRQC_RSS_FIELD_IPV6 |
2886 E1000_MRQC_RSS_FIELD_IPV6_TCP | 2884 E1000_MRQC_RSS_FIELD_IPV6_TCP |
2887 E1000_MRQC_RSS_FIELD_IPV6_TCP_EX; 2885 E1000_MRQC_RSS_FIELD_IPV6_TCP_EX;
2888 2886
2887 if (adapter->flags & IGB_FLAG_RSS_FIELD_IPV4_UDP)
2888 mrqc |= E1000_MRQC_RSS_FIELD_IPV4_UDP;
2889 if (adapter->flags & IGB_FLAG_RSS_FIELD_IPV6_UDP)
2890 mrqc |= E1000_MRQC_RSS_FIELD_IPV6_UDP;
2891
2889 /* If VMDq is enabled then we set the appropriate mode for that, else 2892 /* If VMDq is enabled then we set the appropriate mode for that, else
2890 * we default to RSS so that an RSS hash is calculated per packet even 2893 * we default to RSS so that an RSS hash is calculated per packet even
2891 * if we are only using one queue */ 2894 * if we are only using one queue */