1 /* 2 * Copyright 2008-2018 Cisco Systems, Inc. All rights reserved. 3 * Copyright 2007 Nuova Systems, Inc. All rights reserved. 4 * 5 * LICENSE_BEGIN 6 * 7 * This software is available to you under a choice of one of two 8 * licenses. You may choose to be licensed under the terms of the GNU 9 * General Public License (GPL) Version 2, available from the file 10 * COPYING in the main directory of this source tree, or the 11 * BSD license below: 12 * 13 * Redistribution and use in source and binary forms, with or 14 * without modification, are permitted provided that the following 15 * conditions are met: 16 * 17 * - Redistributions of source code must retain the above 18 * copyright notice, this list of conditions and the following 19 * disclaimer. 20 * 21 * - Redistributions in binary form must reproduce the above 22 * copyright notice, this list of conditions and the following 23 * disclaimer in the documentation and/or other materials 24 * provided with the distribution. 25 * 26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 29 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 30 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 31 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 32 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 33 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 34 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 36 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37 * POSSIBILITY OF SUCH DAMAGE. 38 * 39 * LICENSE_END 40 * 41 * 42 */ 43 44 #ifndef _VNIC_ENIC_H_ 45 #define _VNIC_ENIC_H_ 46 47 /* Device-specific region: enet configuration */ 48 struct vnic_enet_config { 49 u32 flags; 50 u32 wq_desc_count; 51 u32 rq_desc_count; 52 u16 mtu; 53 u16 intr_timer_deprecated; 54 u8 intr_timer_type; 55 u8 intr_mode; 56 char devname[16]; 57 u32 intr_timer_usec; 58 u16 loop_tag; 59 u16 vf_rq_count; 60 u16 num_arfs; 61 u64 mem_paddr; 62 }; 63 64 #define VENETF_TSO 0x1 /* TSO enabled */ 65 #define VENETF_LRO 0x2 /* LRO enabled */ 66 #define VENETF_RXCSUM 0x4 /* RX csum enabled */ 67 #define VENETF_TXCSUM 0x8 /* TX csum enabled */ 68 #define VENETF_RSS 0x10 /* RSS enabled */ 69 #define VENETF_RSSHASH_IPV4 0x20 /* Hash on IPv4 fields */ 70 #define VENETF_RSSHASH_TCPIPV4 0x40 /* Hash on TCP + IPv4 fields */ 71 #define VENETF_RSSHASH_IPV6 0x80 /* Hash on IPv6 fields */ 72 #define VENETF_RSSHASH_TCPIPV6 0x100 /* Hash on TCP + IPv6 fields */ 73 #define VENETF_RSSHASH_IPV6_EX 0x200 /* Hash on IPv6 extended fields */ 74 #define VENETF_RSSHASH_TCPIPV6_EX 0x400 /* Hash on TCP + IPv6 ext. fields */ 75 #define VENETF_LOOP 0x800 /* Loopback enabled */ 76 #define VENETF_VMQ 0x4000 /* using VMQ flag for VMware NETQ */ 77 #define VENETF_VXLAN 0x10000 /* VxLAN offload */ 78 #define VENETF_NVGRE 0x20000 /* NVGRE offload */ 79 #define VENET_INTR_TYPE_MIN 0 /* Timer specs min interrupt spacing */ 80 #define VENET_INTR_TYPE_IDLE 1 /* Timer specs idle time before irq */ 81 82 #define VENET_INTR_MODE_ANY 0 /* Try MSI-X, then MSI, then INTx */ 83 #define VENET_INTR_MODE_MSI 1 /* Try MSI then INTx */ 84 #define VENET_INTR_MODE_INTX 2 /* Try INTx only */ 85 86 #endif /* _VNIC_ENIC_H_ */ 87