Date: Wed, 13 May 2015 07:39:16 +0000 (UTC) From: Hiren Panchasara <hiren@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282831 - stable/10/sys/dev/e1000 Message-ID: <201505130739.t4D7dG3J007459@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505130739.t4D7dG3J007459>