ixgbe_rss.h revision 1.5
1/* $NetBSD: ixgbe_rss.h,v 1.5 2021/04/30 06:41:36 msaitoh Exp $ */ 2/****************************************************************************** 3 4 Copyright (c) 2001-2017, Intel Corporation 5 All rights reserved. 6 7 Redistribution and use in source and binary forms, with or without 8 modification, are permitted provided that the following conditions are met: 9 10 1. Redistributions of source code must retain the above copyright notice, 11 this list of conditions and the following disclaimer. 12 13 2. Redistributions in binary form must reproduce the above copyright 14 notice, this list of conditions and the following disclaimer in the 15 documentation and/or other materials provided with the distribution. 16 17 3. Neither the name of the Intel Corporation nor the names of its 18 contributors may be used to endorse or promote products derived from 19 this software without specific prior written permission. 20 21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 25 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 POSSIBILITY OF SUCH DAMAGE. 32 33******************************************************************************/ 34/*$FreeBSD: head/sys/dev/ixgbe/ixgbe_rss.h 324518 2017-10-11 05:55:52Z sephe $*/ 35 36#ifndef _IXGBE_RSS_H_ 37#define _IXGBE_RSS_H_ 38 39#ifdef __NetBSD__ 40#include <net/rss_config.h> 41 42#define RSS_HASHTYPE_RSS_IPV4 (1 << 1) 43#define RSS_HASHTYPE_RSS_TCP_IPV4 (1 << 2) 44#define RSS_HASHTYPE_RSS_IPV6 (1 << 3) 45#define RSS_HASHTYPE_RSS_TCP_IPV6 (1 << 4) 46#define RSS_HASHTYPE_RSS_IPV6_EX (1 << 5) 47#define RSS_HASHTYPE_RSS_TCP_IPV6_EX (1 << 6) 48#define RSS_HASHTYPE_RSS_UDP_IPV4 (1 << 7) 49#define RSS_HASHTYPE_RSS_UDP_IPV6 (1 << 9) 50#define RSS_HASHTYPE_RSS_UDP_IPV6_EX (1 << 10) 51 52#define rss_getcpu(_a) 0 53#define rss_getnumbuckets() 1 54#define rss_get_indirection_to_bucket(_a) 0 55#define rss_gethashconfig() 0x7E 56#define rss_hash2bucket(_a,_b,_c) -1 57 58#else 59#ifdef RSS 60 61#include <net/rss_config.h> 62#include <netinet/in_rss.h> 63 64#else 65 66#define RSS_HASHTYPE_RSS_IPV4 (1 << 1) 67#define RSS_HASHTYPE_RSS_TCP_IPV4 (1 << 2) 68#define RSS_HASHTYPE_RSS_IPV6 (1 << 3) 69#define RSS_HASHTYPE_RSS_TCP_IPV6 (1 << 4) 70#define RSS_HASHTYPE_RSS_IPV6_EX (1 << 5) 71#define RSS_HASHTYPE_RSS_TCP_IPV6_EX (1 << 6) 72#define RSS_HASHTYPE_RSS_UDP_IPV4 (1 << 7) 73#define RSS_HASHTYPE_RSS_UDP_IPV6 (1 << 9) 74#define RSS_HASHTYPE_RSS_UDP_IPV6_EX (1 << 10) 75 76#define rss_getcpu(_a) 0 77#define rss_getnumbuckets() 1 78#define rss_getkey(_a) do { } while (/*CONSTCOND*/false) 79#define rss_get_indirection_to_bucket(_a) 0 80#define rss_gethashconfig() 0x7E 81#define rss_hash2bucket(_a,_b,_c) -1 82 83#endif 84#endif /* __NetBSD__ */ 85#endif /* _IXGBE_RSS_H_ */ 86