From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 10:20:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1A53627; Sat, 28 Mar 2015 10:20:21 +0000 (UTC) Received: from svn.freebsd.org (svn.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 7308FE94; Sat, 28 Mar 2015 10:20:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SAKLEA047878; Sat, 28 Mar 2015 10:20:21 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SAKKfg047876; Sat, 28 Mar 2015 10:20:20 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503281020.t2SAKKfg047876@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 28 Mar 2015 10:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280783 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 10:20:21 -0000 Author: arybchik Date: Sat Mar 28 10:20:20 2015 New Revision: 280783 URL: https://svnweb.freebsd.org/changeset/base/280783 Log: sfxge: set correct RSS hash type instead of opaque Reviewed by: adrian, gnn Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D2124 Modified: head/sys/dev/sfxge/sfxge_rx.c head/sys/dev/sfxge/sfxge_version.h Modified: head/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.c Sat Mar 28 09:08:57 2015 (r280782) +++ head/sys/dev/sfxge/sfxge_rx.c Sat Mar 28 10:20:20 2015 (r280783) @@ -330,11 +330,16 @@ sfxge_rx_deliver(struct sfxge_softc *sc, if (rx_desc->flags & EFX_CKSUM_TCPUDP) csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; - /* The hash covers a 4-tuple for TCP only */ - if (rx_desc->flags & EFX_PKT_TCP) { + if (rx_desc->flags & (EFX_PKT_IPV4 | EFX_PKT_IPV6)) { m->m_pkthdr.flowid = EFX_RX_HASH_VALUE(EFX_RX_HASHALG_TOEPLITZ, mtod(m, uint8_t *)); - M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); + /* The hash covers a 4-tuple for TCP only */ + M_HASHTYPE_SET(m, + (rx_desc->flags & EFX_PKT_IPV4) ? + ((rx_desc->flags & EFX_PKT_TCP) ? + M_HASHTYPE_RSS_TCP_IPV4 : M_HASHTYPE_RSS_IPV4) : + ((rx_desc->flags & EFX_PKT_TCP) ? + M_HASHTYPE_RSS_TCP_IPV6 : M_HASHTYPE_RSS_IPV6)); } m->m_data += sc->rx_prefix_size; m->m_len = rx_desc->size - sc->rx_prefix_size; @@ -385,7 +390,9 @@ sfxge_lro_deliver(struct sfxge_lro_state } m->m_pkthdr.flowid = c->conn_hash; - M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); + M_HASHTYPE_SET(m, + SFXGE_LRO_CONN_IS_TCPIPV4(c) ? + M_HASHTYPE_RSS_TCP_IPV4 : M_HASHTYPE_RSS_TCP_IPV6); m->m_pkthdr.csum_flags = csum_flags; __sfxge_rx_deliver(sc, m); Modified: head/sys/dev/sfxge/sfxge_version.h ============================================================================== --- head/sys/dev/sfxge/sfxge_version.h Sat Mar 28 09:08:57 2015 (r280782) +++ head/sys/dev/sfxge/sfxge_version.h Sat Mar 28 10:20:20 2015 (r280783) @@ -32,6 +32,6 @@ #ifndef _SFXGE_VERSION_H #define _SFXGE_VERSION_H -#define SFXGE_VERSION_STRING "v3.3.4.6363" +#define SFXGE_VERSION_STRING "v3.3.4.6365" #endif /* _SFXGE_DRIVER_VERSION_H */