svn commit: r282831 - stable/10/sys/dev/e1000
Hiren Panchasara
hiren at FreeBSD.org
Wed May 13 07:39:17 UTC 2015
Author: hiren
Date: Wed May 13 07:39:16 2015
New Revision: 282831
URL: https://svnweb.freebsd.org/changeset/base/282831
Log:
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
Modified:
stable/10/sys/dev/e1000/if_igb.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/10/sys/dev/e1000/if_igb.c Wed May 13 05:46:04 2015 (r282830)
+++ stable/10/sys/dev/e1000/if_igb.c Wed May 13 07:39:16 2015 (r282831)
@@ -4970,10 +4970,27 @@ igb_rxeof(struct igb_queue *que, int cou
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;
More information about the svn-src-stable
mailing list