1*8eb6488eSEric Joyner /****************************************************************************** 2*8eb6488eSEric Joyner 3*8eb6488eSEric Joyner Copyright (c) 2001-2017, Intel Corporation 4*8eb6488eSEric Joyner All rights reserved. 5*8eb6488eSEric Joyner 6*8eb6488eSEric Joyner Redistribution and use in source and binary forms, with or without 7*8eb6488eSEric Joyner modification, are permitted provided that the following conditions are met: 8*8eb6488eSEric Joyner 9*8eb6488eSEric Joyner 1. Redistributions of source code must retain the above copyright notice, 10*8eb6488eSEric Joyner this list of conditions and the following disclaimer. 11*8eb6488eSEric Joyner 12*8eb6488eSEric Joyner 2. Redistributions in binary form must reproduce the above copyright 13*8eb6488eSEric Joyner notice, this list of conditions and the following disclaimer in the 14*8eb6488eSEric Joyner documentation and/or other materials provided with the distribution. 15*8eb6488eSEric Joyner 16*8eb6488eSEric Joyner 3. Neither the name of the Intel Corporation nor the names of its 17*8eb6488eSEric Joyner contributors may be used to endorse or promote products derived from 18*8eb6488eSEric Joyner this software without specific prior written permission. 19*8eb6488eSEric Joyner 20*8eb6488eSEric Joyner THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21*8eb6488eSEric Joyner AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22*8eb6488eSEric Joyner IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23*8eb6488eSEric Joyner ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24*8eb6488eSEric Joyner LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25*8eb6488eSEric Joyner CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26*8eb6488eSEric Joyner SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27*8eb6488eSEric Joyner INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28*8eb6488eSEric Joyner CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29*8eb6488eSEric Joyner ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30*8eb6488eSEric Joyner POSSIBILITY OF SUCH DAMAGE. 31*8eb6488eSEric Joyner 32*8eb6488eSEric Joyner ******************************************************************************/ 33*8eb6488eSEric Joyner /*$FreeBSD$*/ 34*8eb6488eSEric Joyner 35*8eb6488eSEric Joyner 36*8eb6488eSEric Joyner #ifndef _IXGBE_FEATURES_H_ 37*8eb6488eSEric Joyner #define _IXGBE_FEATURES_H_ 38*8eb6488eSEric Joyner 39*8eb6488eSEric Joyner /* 40*8eb6488eSEric Joyner * Feature defines. Eventually, we'd like to get to a point where we 41*8eb6488eSEric Joyner * can remove MAC/Phy type checks scattered throughout the code in 42*8eb6488eSEric Joyner * favor of checking these feature flags. If the feature expects OS 43*8eb6488eSEric Joyner * support, make sure to add an #undef below if expected to run on 44*8eb6488eSEric Joyner * OSs that don't support said feature. 45*8eb6488eSEric Joyner */ 46*8eb6488eSEric Joyner #define IXGBE_FEATURE_VF (u32)(1 << 0) 47*8eb6488eSEric Joyner #define IXGBE_FEATURE_SRIOV (u32)(1 << 1) 48*8eb6488eSEric Joyner #define IXGBE_FEATURE_RSS (u32)(1 << 2) 49*8eb6488eSEric Joyner #define IXGBE_FEATURE_NETMAP (u32)(1 << 3) 50*8eb6488eSEric Joyner #define IXGBE_FEATURE_FAN_FAIL (u32)(1 << 4) 51*8eb6488eSEric Joyner #define IXGBE_FEATURE_TEMP_SENSOR (u32)(1 << 5) 52*8eb6488eSEric Joyner #define IXGBE_FEATURE_BYPASS (u32)(1 << 6) 53*8eb6488eSEric Joyner #define IXGBE_FEATURE_LEGACY_TX (u32)(1 << 7) 54*8eb6488eSEric Joyner #define IXGBE_FEATURE_FDIR (u32)(1 << 8) 55*8eb6488eSEric Joyner #define IXGBE_FEATURE_MSI (u32)(1 << 9) 56*8eb6488eSEric Joyner #define IXGBE_FEATURE_MSIX (u32)(1 << 10) 57*8eb6488eSEric Joyner #define IXGBE_FEATURE_EEE (u32)(1 << 11) 58*8eb6488eSEric Joyner #define IXGBE_FEATURE_LEGACY_IRQ (u32)(1 << 12) 59*8eb6488eSEric Joyner #define IXGBE_FEATURE_NEEDS_CTXD (u32)(1 << 13) 60*8eb6488eSEric Joyner 61*8eb6488eSEric Joyner /* Check for OS support. Undefine features if not included in the OS */ 62*8eb6488eSEric Joyner #ifndef PCI_IOV 63*8eb6488eSEric Joyner #undef IXGBE_FEATURE_SRIOV 64*8eb6488eSEric Joyner #define IXGBE_FEATURE_SRIOV 0 65*8eb6488eSEric Joyner #endif 66*8eb6488eSEric Joyner 67*8eb6488eSEric Joyner #ifndef RSS 68*8eb6488eSEric Joyner #undef IXGBE_FEATURE_RSS 69*8eb6488eSEric Joyner #define IXGBE_FEATURE_RSS 0 70*8eb6488eSEric Joyner #endif 71*8eb6488eSEric Joyner 72*8eb6488eSEric Joyner #ifndef DEV_NETMAP 73*8eb6488eSEric Joyner #undef IXGBE_FEATURE_NETMAP 74*8eb6488eSEric Joyner #define IXGBE_FEATURE_NETMAP 0 75*8eb6488eSEric Joyner #endif 76*8eb6488eSEric Joyner 77*8eb6488eSEric Joyner #endif /* _IXGBE_FEATURES_H_ */ 78