From owner-svn-src-all@freebsd.org Mon May 30 04:48:07 2016 Return-Path: Delivered-To: svn-src-all@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 577FEB51947; Mon, 30 May 2016 04:48:07 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 20C971462; Mon, 30 May 2016 04:48:07 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4U4m6jT001448; Mon, 30 May 2016 04:48:06 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4U4m6NW001446; Mon, 30 May 2016 04:48:06 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201605300448.u4U4m6NW001446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 30 May 2016 04:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300982 - head/sys/sys 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.22 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: Mon, 30 May 2016 04:48:07 -0000 Author: sephe Date: Mon May 30 04:48:06 2016 New Revision: 300982 URL: https://svnweb.freebsd.org/changeset/base/300982 Log: mbuf: Add a flag for M_HASHTYPE_ to indicate the type has hash properties This flag has not been used, and drivers setting M_HASHTYPE_OPAQUE have not been converted as of this commit. Reviewed by: hps, gallatin (early version) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6406 Modified: head/sys/sys/mbuf.h head/sys/sys/param.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Mon May 30 03:31:37 2016 (r300981) +++ head/sys/sys/mbuf.h Mon May 30 04:48:06 2016 (r300982) @@ -318,30 +318,41 @@ struct mbuf { * * Most NICs support RSS, which provides ordering and explicit affinity, and * use the hash m_flag bits to indicate what header fields were covered by - * the hash. M_HASHTYPE_OPAQUE can be set by non-RSS cards or configurations - * that provide an opaque flow identifier, allowing for ordering and - * distribution without explicit affinity. + * the hash. M_HASHTYPE_OPAQUE and M_HASHTYPE_OPAQUE_HASH can be set by non- + * RSS cards or configurations that provide an opaque flow identifier, allowing + * for ordering and distribution without explicit affinity. Additionally, + * M_HASHTYPE_OPAQUE_HASH indicates that the flow identifier has hash + * properties. */ +#define M_HASHTYPE_HASHPROP 0x80 /* has hash properties */ +#define M_HASHTYPE_HASH(t) (M_HASHTYPE_HASHPROP | (t)) /* Microsoft RSS standard hash types */ #define M_HASHTYPE_NONE 0 -#define M_HASHTYPE_RSS_IPV4 1 /* IPv4 2-tuple */ -#define M_HASHTYPE_RSS_TCP_IPV4 2 /* TCPv4 4-tuple */ -#define M_HASHTYPE_RSS_IPV6 3 /* IPv6 2-tuple */ -#define M_HASHTYPE_RSS_TCP_IPV6 4 /* TCPv6 4-tuple */ -#define M_HASHTYPE_RSS_IPV6_EX 5 /* IPv6 2-tuple + ext hdrs */ -#define M_HASHTYPE_RSS_TCP_IPV6_EX 6 /* TCPv6 4-tiple + ext hdrs */ +#define M_HASHTYPE_RSS_IPV4 M_HASHTYPE_HASH(1) /* IPv4 2-tuple */ +#define M_HASHTYPE_RSS_TCP_IPV4 M_HASHTYPE_HASH(2) /* TCPv4 4-tuple */ +#define M_HASHTYPE_RSS_IPV6 M_HASHTYPE_HASH(3) /* IPv6 2-tuple */ +#define M_HASHTYPE_RSS_TCP_IPV6 M_HASHTYPE_HASH(4) /* TCPv6 4-tuple */ +#define M_HASHTYPE_RSS_IPV6_EX M_HASHTYPE_HASH(5) /* IPv6 2-tuple + + * ext hdrs */ +#define M_HASHTYPE_RSS_TCP_IPV6_EX M_HASHTYPE_HASH(6) /* TCPv6 4-tiple + + * ext hdrs */ /* Non-standard RSS hash types */ -#define M_HASHTYPE_RSS_UDP_IPV4 7 /* IPv4 UDP 4-tuple */ -#define M_HASHTYPE_RSS_UDP_IPV4_EX 8 /* IPv4 UDP 4-tuple + ext hdrs */ -#define M_HASHTYPE_RSS_UDP_IPV6 9 /* IPv6 UDP 4-tuple */ -#define M_HASHTYPE_RSS_UDP_IPV6_EX 10 /* IPv6 UDP 4-tuple + ext hdrs */ - -#define M_HASHTYPE_OPAQUE 255 /* ordering, not affinity */ +#define M_HASHTYPE_RSS_UDP_IPV4 M_HASHTYPE_HASH(7) /* IPv4 UDP 4-tuple*/ +#define M_HASHTYPE_RSS_UDP_IPV4_EX M_HASHTYPE_HASH(8) /* IPv4 UDP 4-tuple + + * ext hdrs */ +#define M_HASHTYPE_RSS_UDP_IPV6 M_HASHTYPE_HASH(9) /* IPv6 UDP 4-tuple*/ +#define M_HASHTYPE_RSS_UDP_IPV6_EX M_HASHTYPE_HASH(10)/* IPv6 UDP 4-tuple + + * ext hdrs */ + +#define M_HASHTYPE_OPAQUE 63 /* ordering, not affinity */ +#define M_HASHTYPE_OPAQUE_HASH M_HASHTYPE_HASH(M_HASHTYPE_OPAQUE) + /* ordering+hash, not affinity*/ #define M_HASHTYPE_CLEAR(m) ((m)->m_pkthdr.rsstype = 0) #define M_HASHTYPE_GET(m) ((m)->m_pkthdr.rsstype) #define M_HASHTYPE_SET(m, v) ((m)->m_pkthdr.rsstype = (v)) #define M_HASHTYPE_TEST(m, v) (M_HASHTYPE_GET(m) == (v)) +#define M_HASHTYPE_ISHASH(m) (M_HASHTYPE_GET(m) & M_HASHTYPE_HASHPROP) /* * COS/QOS class and quality of service tags. Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon May 30 03:31:37 2016 (r300981) +++ head/sys/sys/param.h Mon May 30 04:48:06 2016 (r300982) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100114 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100115 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,