xref: /freebsd/sys/dev/ixgbe/ixgbe_rss.h (revision f72de14ea13259db78b06c50da6c864dea698668)
18eb6488eSEric Joyner /******************************************************************************
28eb6488eSEric Joyner 
38455e365SKevin Bowling   Copyright (c) 2001-2020, Intel Corporation
48eb6488eSEric Joyner   All rights reserved.
58eb6488eSEric Joyner 
68eb6488eSEric Joyner   Redistribution and use in source and binary forms, with or without
78eb6488eSEric Joyner   modification, are permitted provided that the following conditions are met:
88eb6488eSEric Joyner 
98eb6488eSEric Joyner    1. Redistributions of source code must retain the above copyright notice,
108eb6488eSEric Joyner       this list of conditions and the following disclaimer.
118eb6488eSEric Joyner 
128eb6488eSEric Joyner    2. Redistributions in binary form must reproduce the above copyright
138eb6488eSEric Joyner       notice, this list of conditions and the following disclaimer in the
148eb6488eSEric Joyner       documentation and/or other materials provided with the distribution.
158eb6488eSEric Joyner 
168eb6488eSEric Joyner    3. Neither the name of the Intel Corporation nor the names of its
178eb6488eSEric Joyner       contributors may be used to endorse or promote products derived from
188eb6488eSEric Joyner       this software without specific prior written permission.
198eb6488eSEric Joyner 
208eb6488eSEric Joyner   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
218eb6488eSEric Joyner   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
228eb6488eSEric Joyner   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
238eb6488eSEric Joyner   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
248eb6488eSEric Joyner   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
258eb6488eSEric Joyner   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
268eb6488eSEric Joyner   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
278eb6488eSEric Joyner   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
288eb6488eSEric Joyner   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
298eb6488eSEric Joyner   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
308eb6488eSEric Joyner   POSSIBILITY OF SUCH DAMAGE.
318eb6488eSEric Joyner 
328eb6488eSEric Joyner ******************************************************************************/
338eb6488eSEric Joyner 
348eb6488eSEric Joyner #ifndef _IXGBE_RSS_H_
358eb6488eSEric Joyner #define _IXGBE_RSS_H_
368eb6488eSEric Joyner 
378eb6488eSEric Joyner #ifdef RSS
388eb6488eSEric Joyner 
398eb6488eSEric Joyner #include <net/rss_config.h>
408eb6488eSEric Joyner #include <netinet/in_rss.h>
418eb6488eSEric Joyner 
428eb6488eSEric Joyner #else
438eb6488eSEric Joyner 
448eb6488eSEric Joyner #define RSS_HASHTYPE_RSS_IPV4          (1 << 1)
458eb6488eSEric Joyner #define RSS_HASHTYPE_RSS_TCP_IPV4      (1 << 2)
468eb6488eSEric Joyner #define RSS_HASHTYPE_RSS_IPV6          (1 << 3)
478eb6488eSEric Joyner #define RSS_HASHTYPE_RSS_TCP_IPV6      (1 << 4)
488eb6488eSEric Joyner #define RSS_HASHTYPE_RSS_IPV6_EX       (1 << 5)
498eb6488eSEric Joyner #define RSS_HASHTYPE_RSS_TCP_IPV6_EX   (1 << 6)
508eb6488eSEric Joyner #define RSS_HASHTYPE_RSS_UDP_IPV4      (1 << 7)
51*f72de14eSKevin Bowling #define RSS_HASHTYPE_RSS_UDP_IPV4_EX   (1 << 8)
528eb6488eSEric Joyner #define RSS_HASHTYPE_RSS_UDP_IPV6      (1 << 9)
538eb6488eSEric Joyner #define RSS_HASHTYPE_RSS_UDP_IPV6_EX   (1 << 10)
548eb6488eSEric Joyner 
558eb6488eSEric Joyner #define rss_getcpu(_a) 0
568eb6488eSEric Joyner #define rss_getnumbuckets() 1
578eb6488eSEric Joyner #define rss_getkey(_a)
588eb6488eSEric Joyner #define rss_get_indirection_to_bucket(_a) 0
598eb6488eSEric Joyner #define rss_gethashconfig() 0x7E
608eb6488eSEric Joyner #define rss_hash2bucket(_a,_b,_c) -1
618eb6488eSEric Joyner 
628eb6488eSEric Joyner #endif
638eb6488eSEric Joyner #endif /* _IXGBE_RSS_H_ */
64