ixv_rss.h revision 315333
1220295Sadrian/******************************************************************************
2220295Sadrian
3220295Sadrian  Copyright (c) 2001-2017, Intel Corporation
4220295Sadrian  All rights reserved.
5220295Sadrian
6220295Sadrian  Redistribution and use in source and binary forms, with or without
7234945Sadrian  modification, are permitted provided that the following conditions are met:
8234945Sadrian
9220295Sadrian   1. Redistributions of source code must retain the above copyright notice,
10220295Sadrian      this list of conditions and the following disclaimer.
11220295Sadrian
12220295Sadrian   2. Redistributions in binary form must reproduce the above copyright
13220295Sadrian      notice, this list of conditions and the following disclaimer in the
14220295Sadrian      documentation and/or other materials provided with the distribution.
15220295Sadrian
16220295Sadrian   3. Neither the name of the Intel Corporation nor the names of its
17220295Sadrian      contributors may be used to endorse or promote products derived from
18220295Sadrian      this software without specific prior written permission.
19220295Sadrian
20220295Sadrian  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21227921Sadrian  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22227921Sadrian  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23227921Sadrian  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24227921Sadrian  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25227921Sadrian  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26227921Sadrian  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27227921Sadrian  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28227921Sadrian  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29227921Sadrian  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30227926Sadrian  POSSIBILITY OF SUCH DAMAGE.
31227926Sadrian
32227921Sadrian******************************************************************************/
33227921Sadrian/*$FreeBSD: stable/10/sys/dev/ixgbe/ixv_rss.h 315333 2017-03-15 21:20:17Z erj $*/
34227921Sadrian
35227921Sadrian#ifndef _IXGBE_RSS_H_
36227921Sadrian#define _IXGBE_RSS_H_
37227921Sadrian
38227921Sadrian#ifdef RSS
39227921Sadrian
40227921Sadrian#include <net/rss_config.h>
41227921Sadrian#include <netinet/in_rss.h>
42227938Sadrian
43227926Sadrian#else
44227921Sadrian
45227921Sadrian#define RSS_HASHTYPE_RSS_IPV4          (1 << 1)
46227921Sadrian#define RSS_HASHTYPE_RSS_TCP_IPV4      (1 << 2)
47227921Sadrian#define RSS_HASHTYPE_RSS_IPV6          (1 << 3)
48260392Sloos#define RSS_HASHTYPE_RSS_TCP_IPV6      (1 << 4)
49227921Sadrian#define RSS_HASHTYPE_RSS_IPV6_EX       (1 << 5)
50227921Sadrian#define RSS_HASHTYPE_RSS_TCP_IPV6_EX   (1 << 6)
51227921Sadrian#define RSS_HASHTYPE_RSS_UDP_IPV4      (1 << 7)
52227921Sadrian#define RSS_HASHTYPE_RSS_UDP_IPV4_EX   (1 << 8)
53227921Sadrian#define RSS_HASHTYPE_RSS_UDP_IPV6      (1 << 9)
54260392Sloos#define RSS_HASHTYPE_RSS_UDP_IPV6_EX   (1 << 10)
55227921Sadrian
56227921Sadrian#define rss_getcpu(_a) 0
57227921Sadrian#define rss_getnumbuckets() 1
58227921Sadrian#define rss_getkey(_a)
59260392Sloos#define rss_get_indirection_to_bucket(_a) 0
60227938Sadrian#define rss_gethashconfig() 0x7E
61227921Sadrian#define rss_hash2bucket(_a,_b,_c) -1
62227921Sadrian
63227921Sadrian#endif
64227926Sadrian#endif
65227938Sadrian