Date: Tue, 21 Jul 2015 19:41:40 +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: r285764 - stable/10/sys/dev/ixgbe Message-ID: <201507211941.t6LJfeGP019176@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hiren Date: Tue Jul 21 19:41:39 2015 New Revision: 285764 URL: https://svnweb.freebsd.org/changeset/base/285764 Log: Partial MFC of r285528 as full RSS support is not available in FreeBSD 10. Expose full 32bit RSS hash from card regardless of whether RSS is defined or not. When doing multiqueue, we are all setup to have full 32bit RSS hash from the card. We do not need to hide that under "ifdef RSS" and should expose that by default so others like lagg(4) can use that and avoid hashing the traffic by themselves. Approved by: re (gjb) Sponsored by: Limelight Networks Modified: stable/10/sys/dev/ixgbe/ix_txrx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ixgbe/ix_txrx.c ============================================================================== --- stable/10/sys/dev/ixgbe/ix_txrx.c Tue Jul 21 18:54:38 2015 (r285763) +++ stable/10/sys/dev/ixgbe/ix_txrx.c Tue Jul 21 19:41:39 2015 (r285764) @@ -1892,9 +1892,27 @@ ixgbe_rxeof(struct ix_queue *que) } if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) ixgbe_rx_checksum(staterr, sendmp, ptype); + + /* + * 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) { + sendmp->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(sendmp, M_HASHTYPE_OPAQUE); + } else { #if __FreeBSD_version >= 800000 - sendmp->m_pkthdr.flowid = que->msix; + sendmp->m_pkthdr.flowid = que->msix; + M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); #endif /* FreeBSD_version */ + } } next_desc: bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507211941.t6LJfeGP019176>