Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Mar 2015 10:20:20 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r280783 - head/sys/dev/sfxge
Message-ID:  <201503281020.t2SAKKfg047876@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503281020.t2SAKKfg047876>