summaryrefslogtreecommitdiffstats
path: root/sys/dev/e1000/if_igb.c
diff options
context:
space:
mode:
authorhiren <hiren@FreeBSD.org>2015-05-13 07:39:16 +0000
committerhiren <hiren@FreeBSD.org>2015-05-13 07:39:16 +0000
commit1db2d826475419ff5bfdcd10cb0abe9a38090250 (patch)
tree372f911d7b7fff5829cdfb8578475da25e91eb66 /sys/dev/e1000/if_igb.c
parent4215c2f123c1d2a682e4265d8f9072588d636415 (diff)
downloadFreeBSD-src-1db2d826475419ff5bfdcd10cb0abe9a38090250.zip
FreeBSD-src-1db2d826475419ff5bfdcd10cb0abe9a38090250.tar.gz
Partial MFC r281838:
For igb(4), when we are doing multiqueue, we are all setup to have full 32bit RSS hash from the card. Expose that so others like lagg(4) can use that and avoid hashing the traffic by themselves. Setting hashtype as OPAQUE because FreeBSD 10 doesn't have RSS support. Sponsored by: Limelight Networks
Diffstat (limited to 'sys/dev/e1000/if_igb.c')
-rw-r--r--sys/dev/e1000/if_igb.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c
index 5add360..5dc261a 100644
--- a/sys/dev/e1000/if_igb.c
+++ b/sys/dev/e1000/if_igb.c
@@ -4970,10 +4970,27 @@ igb_rxeof(struct igb_queue *que, int count, int *done)
rxr->fmp->m_pkthdr.ether_vtag = vtag;
rxr->fmp->m_flags |= M_VLANTAG;
}
+
+ /*
+ * In case of multiqueue, we have RXCSUM.PCSD bit set
+ * and never cleared. This means we have RSS hash
+ * available to be used.
+ */
+ if (adapter->num_queues > 1) {
+ rxr->fmp->m_pkthdr.flowid =
+ le32toh(cur->wb.lower.hi_dword.rss);
+ /*
+ * Full RSS support is not avilable in
+ * FreeBSD 10 so setting the hash type to
+ * OPAQUE.
+ */
+ M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE);
+ } else {
#ifndef IGB_LEGACY_TX
- rxr->fmp->m_pkthdr.flowid = que->msix;
- M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE);
+ rxr->fmp->m_pkthdr.flowid = que->msix;
+ M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE);
#endif
+ }
sendmp = rxr->fmp;
/* Make sure to set M_PKTHDR. */
sendmp->m_flags |= M_PKTHDR;
OpenPOWER on IntegriCloud