From owner-svn-src-stable@freebsd.org Tue Jul 21 19:41:40 2015 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 724049A7B6C; Tue, 21 Jul 2015 19:41:40 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6243811E5; Tue, 21 Jul 2015 19:41:40 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6LJfeQi019177; Tue, 21 Jul 2015 19:41:40 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6LJfeGP019176; Tue, 21 Jul 2015 19:41:40 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201507211941.t6LJfeGP019176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Tue, 21 Jul 2015 19:41:40 +0000 (UTC) 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 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2015 19:41:40 -0000 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,