Home | History | Annotate | Line # | Download | only in ixgbe
ixgbe.h revision 1.24.6.4
      1  1.24.6.4    martin /* $NetBSD: ixgbe.h,v 1.24.6.4 2018/03/01 19:02:15 martin Exp $ */
      2  1.24.6.2       snj 
      3       1.1    dyoung /******************************************************************************
      4  1.24.6.2       snj   SPDX-License-Identifier: BSD-3-Clause
      5       1.1    dyoung 
      6  1.24.6.2       snj   Copyright (c) 2001-2017, Intel Corporation
      7       1.1    dyoung   All rights reserved.
      8  1.24.6.2       snj 
      9  1.24.6.2       snj   Redistribution and use in source and binary forms, with or without
     10       1.1    dyoung   modification, are permitted provided that the following conditions are met:
     11  1.24.6.2       snj 
     12  1.24.6.2       snj    1. Redistributions of source code must retain the above copyright notice,
     13       1.1    dyoung       this list of conditions and the following disclaimer.
     14  1.24.6.2       snj 
     15  1.24.6.2       snj    2. Redistributions in binary form must reproduce the above copyright
     16  1.24.6.2       snj       notice, this list of conditions and the following disclaimer in the
     17       1.1    dyoung       documentation and/or other materials provided with the distribution.
     18  1.24.6.2       snj 
     19  1.24.6.2       snj    3. Neither the name of the Intel Corporation nor the names of its
     20  1.24.6.2       snj       contributors may be used to endorse or promote products derived from
     21       1.1    dyoung       this software without specific prior written permission.
     22  1.24.6.2       snj 
     23       1.1    dyoung   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     24  1.24.6.2       snj   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25  1.24.6.2       snj   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26  1.24.6.2       snj   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     27  1.24.6.2       snj   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     28  1.24.6.2       snj   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     29  1.24.6.2       snj   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     30  1.24.6.2       snj   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     31  1.24.6.2       snj   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     32       1.1    dyoung   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     33       1.1    dyoung   POSSIBILITY OF SUCH DAMAGE.
     34       1.1    dyoung 
     35       1.1    dyoung ******************************************************************************/
     36  1.24.6.2       snj /*$FreeBSD: head/sys/dev/ixgbe/ixgbe.h 320688 2017-07-05 17:27:03Z erj $*/
     37  1.24.6.2       snj 
     38       1.1    dyoung /*
     39       1.1    dyoung  * Copyright (c) 2011 The NetBSD Foundation, Inc.
     40       1.1    dyoung  * All rights reserved.
     41       1.1    dyoung  *
     42       1.1    dyoung  * This code is derived from software contributed to The NetBSD Foundation
     43       1.1    dyoung  * by Coyote Point Systems, Inc.
     44       1.1    dyoung  *
     45       1.1    dyoung  * Redistribution and use in source and binary forms, with or without
     46       1.1    dyoung  * modification, are permitted provided that the following conditions
     47       1.1    dyoung  * are met:
     48       1.1    dyoung  * 1. Redistributions of source code must retain the above copyright
     49       1.1    dyoung  *    notice, this list of conditions and the following disclaimer.
     50       1.1    dyoung  * 2. Redistributions in binary form must reproduce the above copyright
     51       1.1    dyoung  *    notice, this list of conditions and the following disclaimer in the
     52       1.1    dyoung  *    documentation and/or other materials provided with the distribution.
     53       1.1    dyoung  *
     54       1.1    dyoung  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     55       1.1    dyoung  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     56       1.1    dyoung  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     57       1.1    dyoung  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     58       1.1    dyoung  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     59       1.1    dyoung  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     60       1.1    dyoung  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     61       1.1    dyoung  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     62       1.1    dyoung  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     63       1.1    dyoung  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     64       1.1    dyoung  * POSSIBILITY OF SUCH DAMAGE.
     65       1.1    dyoung  */
     66       1.1    dyoung 
     67       1.1    dyoung 
     68       1.1    dyoung #ifndef _IXGBE_H_
     69       1.1    dyoung #define _IXGBE_H_
     70       1.1    dyoung 
     71       1.1    dyoung 
     72       1.1    dyoung #include <sys/param.h>
     73       1.1    dyoung #include <sys/reboot.h>
     74       1.1    dyoung #include <sys/systm.h>
     75      1.22   msaitoh #include <sys/pcq.h>
     76       1.1    dyoung #include <sys/mbuf.h>
     77       1.1    dyoung #include <sys/protosw.h>
     78       1.1    dyoung #include <sys/socket.h>
     79       1.1    dyoung #include <sys/malloc.h>
     80       1.1    dyoung #include <sys/kernel.h>
     81       1.1    dyoung #include <sys/module.h>
     82       1.1    dyoung #include <sys/sockio.h>
     83       1.1    dyoung 
     84       1.1    dyoung #include <net/if.h>
     85       1.1    dyoung #include <net/if_arp.h>
     86       1.1    dyoung #include <net/bpf.h>
     87       1.1    dyoung #include <net/if_ether.h>
     88       1.1    dyoung #include <net/if_dl.h>
     89       1.1    dyoung #include <net/if_media.h>
     90       1.1    dyoung 
     91       1.1    dyoung #include <net/bpf.h>
     92       1.1    dyoung #include <net/if_types.h>
     93       1.1    dyoung #include <net/if_vlanvar.h>
     94       1.1    dyoung 
     95       1.1    dyoung #include <netinet/in_systm.h>
     96       1.1    dyoung #include <netinet/in.h>
     97       1.1    dyoung #include <netinet/ip.h>
     98       1.1    dyoung #include <netinet/ip6.h>
     99       1.1    dyoung #include <netinet/tcp.h>
    100       1.1    dyoung #include <netinet/udp.h>
    101       1.1    dyoung 
    102       1.1    dyoung #include <sys/bus.h>
    103       1.1    dyoung #include <dev/pci/pcivar.h>
    104       1.1    dyoung #include <dev/pci/pcireg.h>
    105       1.1    dyoung #include <sys/proc.h>
    106       1.1    dyoung #include <sys/sysctl.h>
    107       1.1    dyoung #include <sys/endian.h>
    108       1.1    dyoung #include <sys/workqueue.h>
    109       1.7   msaitoh #include <sys/cpu.h>
    110       1.9  knakahar #include <sys/interrupt.h>
    111      1.22   msaitoh #include <sys/bitops.h>
    112       1.1    dyoung 
    113       1.1    dyoung #include "ixgbe_netbsd.h"
    114       1.1    dyoung #include "ixgbe_api.h"
    115      1.12   msaitoh #include "ixgbe_common.h"
    116      1.12   msaitoh #include "ixgbe_phy.h"
    117      1.10   msaitoh #include "ixgbe_vf.h"
    118  1.24.6.2       snj #include "ixgbe_features.h"
    119       1.1    dyoung 
    120       1.1    dyoung /* Tunables */
    121       1.1    dyoung 
    122       1.1    dyoung /*
    123       1.1    dyoung  * TxDescriptors Valid Range: 64-4096 Default Value: 256 This value is the
    124       1.1    dyoung  * number of transmit descriptors allocated by the driver. Increasing this
    125       1.1    dyoung  * value allows the driver to queue more transmits. Each descriptor is 16
    126       1.1    dyoung  * bytes. Performance tests have show the 2K value to be optimal for top
    127       1.1    dyoung  * performance.
    128       1.1    dyoung  */
    129       1.1    dyoung #define DEFAULT_TXD	1024
    130       1.1    dyoung #define PERFORM_TXD	2048
    131       1.1    dyoung #define MAX_TXD		4096
    132       1.1    dyoung #define MIN_TXD		64
    133       1.1    dyoung 
    134       1.1    dyoung /*
    135       1.1    dyoung  * RxDescriptors Valid Range: 64-4096 Default Value: 256 This value is the
    136       1.1    dyoung  * number of receive descriptors allocated for each RX queue. Increasing this
    137       1.1    dyoung  * value allows the driver to buffer more incoming packets. Each descriptor
    138       1.1    dyoung  * is 16 bytes.  A receive buffer is also allocated for each descriptor.
    139       1.1    dyoung  *
    140       1.1    dyoung  * Note: with 8 rings and a dual port card, it is possible to bump up
    141       1.1    dyoung  *	against the system mbuf pool limit, you can tune nmbclusters
    142       1.1    dyoung  *	to adjust for this.
    143       1.1    dyoung  */
    144       1.1    dyoung #define DEFAULT_RXD	1024
    145       1.1    dyoung #define PERFORM_RXD	2048
    146       1.1    dyoung #define MAX_RXD		4096
    147       1.1    dyoung #define MIN_RXD		64
    148       1.1    dyoung 
    149       1.1    dyoung /* Alignment for rings */
    150       1.1    dyoung #define DBA_ALIGN	128
    151       1.1    dyoung 
    152       1.1    dyoung /*
    153       1.1    dyoung  * This is the max watchdog interval, ie. the time that can
    154       1.1    dyoung  * pass between any two TX clean operations, such only happening
    155       1.1    dyoung  * when the TX hardware is functioning.
    156       1.1    dyoung  */
    157  1.24.6.2       snj #define IXGBE_WATCHDOG  (10 * hz)
    158       1.1    dyoung 
    159       1.1    dyoung /*
    160       1.1    dyoung  * This parameters control when the driver calls the routine to reclaim
    161       1.1    dyoung  * transmit descriptors.
    162       1.1    dyoung  */
    163  1.24.6.2       snj #define IXGBE_TX_CLEANUP_THRESHOLD(_a)  ((_a)->num_tx_desc / 8)
    164  1.24.6.2       snj #define IXGBE_TX_OP_THRESHOLD(_a)       ((_a)->num_tx_desc / 32)
    165       1.1    dyoung 
    166      1.12   msaitoh /* These defines are used in MTU calculations */
    167  1.24.6.2       snj #define IXGBE_MAX_FRAME_SIZE  9728
    168  1.24.6.2       snj #define IXGBE_MTU_HDR         (ETHER_HDR_LEN + ETHER_CRC_LEN)
    169  1.24.6.2       snj #define IXGBE_MTU_HDR_VLAN    (ETHER_HDR_LEN + ETHER_CRC_LEN + \
    170  1.24.6.2       snj                                ETHER_VLAN_ENCAP_LEN)
    171  1.24.6.2       snj #define IXGBE_MAX_MTU         (IXGBE_MAX_FRAME_SIZE - IXGBE_MTU_HDR)
    172  1.24.6.2       snj #define IXGBE_MAX_MTU_VLAN    (IXGBE_MAX_FRAME_SIZE - IXGBE_MTU_HDR_VLAN)
    173       1.1    dyoung 
    174       1.1    dyoung /* Flow control constants */
    175  1.24.6.2       snj #define IXGBE_FC_PAUSE        0xFFFF
    176  1.24.6.2       snj #define IXGBE_FC_HI           0x20000
    177  1.24.6.2       snj #define IXGBE_FC_LO           0x10000
    178       1.1    dyoung 
    179       1.6   msaitoh /*
    180       1.6   msaitoh  * Used for optimizing small rx mbufs.  Effort is made to keep the copy
    181       1.6   msaitoh  * small and aligned for the CPU L1 cache.
    182  1.24.6.2       snj  *
    183       1.6   msaitoh  * MHLEN is typically 168 bytes, giving us 8-byte alignment.  Getting
    184       1.6   msaitoh  * 32 byte alignment needed for the fast bcopy results in 8 bytes being
    185       1.6   msaitoh  * wasted.  Getting 64 byte alignment, which _should_ be ideal for
    186       1.6   msaitoh  * modern Intel CPUs, results in 40 bytes wasted and a significant drop
    187       1.6   msaitoh  * in observed efficiency of the optimization, 97.9% -> 81.8%.
    188       1.6   msaitoh  */
    189       1.8   msaitoh #define	MPKTHSIZE		(offsetof(struct _mbuf_dummy, m_pktdat))
    190  1.24.6.2       snj #define IXGBE_RX_COPY_HDR_PADDED  ((((MPKTHSIZE - 1) / 32) + 1) * 32)
    191  1.24.6.2       snj #define IXGBE_RX_COPY_LEN         (MSIZE - IXGBE_RX_COPY_HDR_PADDED)
    192  1.24.6.2       snj #define IXGBE_RX_COPY_ALIGN       (IXGBE_RX_COPY_HDR_PADDED - MPKTHSIZE)
    193       1.6   msaitoh 
    194       1.1    dyoung /* Keep older OS drivers building... */
    195       1.1    dyoung #if !defined(SYSCTL_ADD_UQUAD)
    196       1.1    dyoung #define SYSCTL_ADD_UQUAD SYSCTL_ADD_QUAD
    197       1.1    dyoung #endif
    198       1.1    dyoung 
    199       1.1    dyoung /* Defines for printing debug information */
    200       1.1    dyoung #define DEBUG_INIT  0
    201       1.1    dyoung #define DEBUG_IOCTL 0
    202       1.1    dyoung #define DEBUG_HW    0
    203       1.1    dyoung 
    204       1.1    dyoung #define INIT_DEBUGOUT(S)            if (DEBUG_INIT)  printf(S "\n")
    205       1.1    dyoung #define INIT_DEBUGOUT1(S, A)        if (DEBUG_INIT)  printf(S "\n", A)
    206       1.1    dyoung #define INIT_DEBUGOUT2(S, A, B)     if (DEBUG_INIT)  printf(S "\n", A, B)
    207       1.1    dyoung #define IOCTL_DEBUGOUT(S)           if (DEBUG_IOCTL) printf(S "\n")
    208       1.1    dyoung #define IOCTL_DEBUGOUT1(S, A)       if (DEBUG_IOCTL) printf(S "\n", A)
    209       1.1    dyoung #define IOCTL_DEBUGOUT2(S, A, B)    if (DEBUG_IOCTL) printf(S "\n", A, B)
    210       1.1    dyoung #define HW_DEBUGOUT(S)              if (DEBUG_HW) printf(S "\n")
    211       1.1    dyoung #define HW_DEBUGOUT1(S, A)          if (DEBUG_HW) printf(S "\n", A)
    212       1.1    dyoung #define HW_DEBUGOUT2(S, A, B)       if (DEBUG_HW) printf(S "\n", A, B)
    213       1.1    dyoung 
    214       1.1    dyoung #define MAX_NUM_MULTICAST_ADDRESSES     128
    215  1.24.6.2       snj #define IXGBE_82598_SCATTER             100
    216  1.24.6.2       snj #define IXGBE_82599_SCATTER             32
    217  1.24.6.2       snj #define MSIX_82598_BAR                  3
    218  1.24.6.2       snj #define MSIX_82599_BAR                  4
    219  1.24.6.2       snj #define IXGBE_TSO_SIZE                  262140
    220  1.24.6.2       snj #define IXGBE_RX_HDR                    128
    221  1.24.6.2       snj #define IXGBE_VFTA_SIZE                 128
    222  1.24.6.2       snj #define IXGBE_BR_SIZE                   4096
    223  1.24.6.2       snj #define IXGBE_QUEUE_MIN_FREE            32
    224  1.24.6.2       snj #define IXGBE_MAX_TX_BUSY               10
    225  1.24.6.2       snj #define IXGBE_QUEUE_HUNG                0x80000000
    226      1.11   msaitoh 
    227  1.24.6.2       snj #define IXGBE_EITR_DEFAULT		128
    228      1.11   msaitoh 
    229       1.7   msaitoh /* IOCTL define to gather SFP+ Diagnostic data */
    230       1.7   msaitoh #define SIOCGI2C	SIOCGIFGENERIC
    231       1.7   msaitoh 
    232       1.1    dyoung /* Offload bits in mbuf flag */
    233       1.1    dyoung #define	M_CSUM_OFFLOAD	\
    234       1.1    dyoung     (M_CSUM_IPv4|M_CSUM_UDPv4|M_CSUM_TCPv4|M_CSUM_UDPv6|M_CSUM_TCPv6)
    235       1.1    dyoung 
    236      1.11   msaitoh /* Backward compatibility items for very old versions */
    237      1.11   msaitoh #ifndef pci_find_cap
    238      1.11   msaitoh #define pci_find_cap pci_find_extcap
    239      1.11   msaitoh #endif
    240      1.11   msaitoh 
    241      1.11   msaitoh #ifndef DEVMETHOD_END
    242      1.11   msaitoh #define DEVMETHOD_END { NULL, NULL }
    243      1.11   msaitoh #endif
    244      1.11   msaitoh 
    245       1.1    dyoung /*
    246       1.1    dyoung  * Interrupt Moderation parameters
    247       1.1    dyoung  */
    248       1.1    dyoung #define IXGBE_LOW_LATENCY	128
    249       1.1    dyoung #define IXGBE_AVE_LATENCY	400
    250       1.1    dyoung #define IXGBE_BULK_LATENCY	1200
    251      1.16   msaitoh 
    252      1.16   msaitoh /* Using 1FF (the max value), the interval is ~1.05ms */
    253  1.24.6.2       snj #define IXGBE_LINK_ITR_QUANTA  0x1FF
    254  1.24.6.2       snj #define IXGBE_LINK_ITR         ((IXGBE_LINK_ITR_QUANTA << 3) & \
    255  1.24.6.2       snj                                 IXGBE_EITR_ITR_INT_MASK)
    256      1.13   msaitoh 
    257      1.13   msaitoh 
    258      1.13   msaitoh 
    259  1.24.6.2       snj /************************************************************************
    260       1.1    dyoung  * vendor_info_array
    261  1.24.6.2       snj  *
    262  1.24.6.2       snj  *   Contains the list of Subvendor/Subdevice IDs on
    263  1.24.6.2       snj  *   which the driver should load.
    264  1.24.6.2       snj  ************************************************************************/
    265       1.1    dyoung typedef struct _ixgbe_vendor_info_t {
    266  1.24.6.2       snj 	unsigned int vendor_id;
    267  1.24.6.2       snj 	unsigned int device_id;
    268  1.24.6.2       snj 	unsigned int subvendor_id;
    269  1.24.6.2       snj 	unsigned int subdevice_id;
    270  1.24.6.2       snj 	unsigned int index;
    271       1.1    dyoung } ixgbe_vendor_info_t;
    272       1.1    dyoung 
    273       1.7   msaitoh /* This is used to get SFP+ module data */
    274       1.7   msaitoh struct ixgbe_i2c_req {
    275       1.7   msaitoh         u8 dev_addr;
    276       1.7   msaitoh         u8 offset;
    277       1.7   msaitoh         u8 len;
    278       1.7   msaitoh         u8 data[8];
    279       1.7   msaitoh };
    280       1.1    dyoung 
    281  1.24.6.2       snj struct ixgbe_bp_data {
    282  1.24.6.2       snj 	u32 low;
    283  1.24.6.2       snj 	u32 high;
    284  1.24.6.2       snj 	u32 log;
    285  1.24.6.2       snj };
    286      1.13   msaitoh 
    287       1.1    dyoung struct ixgbe_tx_buf {
    288       1.7   msaitoh 	union ixgbe_adv_tx_desc	*eop;
    289  1.24.6.2       snj 	struct mbuf             *m_head;
    290  1.24.6.2       snj 	bus_dmamap_t            map;
    291       1.1    dyoung };
    292       1.1    dyoung 
    293       1.1    dyoung struct ixgbe_rx_buf {
    294  1.24.6.2       snj 	struct mbuf    *buf;
    295  1.24.6.2       snj 	struct mbuf    *fmp;
    296  1.24.6.2       snj 	bus_dmamap_t   pmap;
    297  1.24.6.2       snj 	u_int          flags;
    298  1.24.6.2       snj #define IXGBE_RX_COPY  0x01
    299  1.24.6.2       snj 	uint64_t       addr;
    300       1.1    dyoung };
    301       1.1    dyoung 
    302       1.1    dyoung /*
    303  1.24.6.2       snj  * Bus dma allocation structure used by ixgbe_dma_malloc and ixgbe_dma_free
    304       1.1    dyoung  */
    305       1.1    dyoung struct ixgbe_dma_alloc {
    306  1.24.6.2       snj 	bus_addr_t        dma_paddr;
    307  1.24.6.2       snj 	void              *dma_vaddr;
    308  1.24.6.2       snj 	ixgbe_dma_tag_t   *dma_tag;
    309  1.24.6.2       snj 	bus_dmamap_t      dma_map;
    310  1.24.6.2       snj 	bus_dma_segment_t dma_seg;
    311  1.24.6.2       snj 	bus_size_t        dma_size;
    312       1.1    dyoung };
    313       1.1    dyoung 
    314      1.13   msaitoh struct ixgbe_mc_addr {
    315  1.24.6.2       snj 	u8  addr[IXGBE_ETH_LENGTH_OF_ADDRESS];
    316      1.13   msaitoh 	u32 vmdq;
    317      1.13   msaitoh };
    318      1.13   msaitoh 
    319       1.1    dyoung /*
    320  1.24.6.2       snj  * Driver queue struct: this is the interrupt container
    321  1.24.6.2       snj  *                      for the associated tx and rx ring.
    322  1.24.6.2       snj  */
    323       1.1    dyoung struct ix_queue {
    324  1.24.6.2       snj 	struct adapter   *adapter;
    325  1.24.6.2       snj 	u32              msix;           /* This queue's MSI-X vector */
    326  1.24.6.2       snj 	u32              eims;           /* This queue's EIMS bit */
    327  1.24.6.2       snj 	u32              eitr_setting;
    328  1.24.6.2       snj 	u32              me;
    329  1.24.6.2       snj 	struct resource  *res;
    330  1.24.6.2       snj 	void             *tag;
    331  1.24.6.2       snj 	int              busy;
    332  1.24.6.2       snj 	struct tx_ring   *txr;
    333  1.24.6.2       snj 	struct rx_ring   *rxr;
    334  1.24.6.2       snj 	void             *que_si;
    335  1.24.6.2       snj 	struct evcnt     irqs;
    336  1.24.6.2       snj 	char             namebuf[32];
    337  1.24.6.2       snj 	char             evnamebuf[32];
    338  1.24.6.4    martin 
    339  1.24.6.4    martin 	kmutex_t         im_mtx;	/* lock for im_nest and this queue's EIMS/EIMC bit */
    340  1.24.6.4    martin 	int              im_nest;
    341       1.1    dyoung };
    342       1.1    dyoung 
    343       1.1    dyoung /*
    344       1.1    dyoung  * The transmit ring, one per queue
    345       1.1    dyoung  */
    346       1.1    dyoung struct tx_ring {
    347       1.1    dyoung         struct adapter		*adapter;
    348       1.1    dyoung 	kmutex_t		tx_mtx;
    349       1.1    dyoung 	u32			me;
    350      1.11   msaitoh 	u32			tail;
    351      1.11   msaitoh 	int			busy;
    352       1.7   msaitoh 	union ixgbe_adv_tx_desc	*tx_base;
    353       1.7   msaitoh 	struct ixgbe_tx_buf	*tx_buffers;
    354       1.7   msaitoh 	struct ixgbe_dma_alloc	txdma;
    355       1.7   msaitoh 	volatile u16		tx_avail;
    356       1.7   msaitoh 	u16			next_avail_desc;
    357       1.7   msaitoh 	u16			next_to_clean;
    358       1.7   msaitoh 	u16			num_desc;
    359       1.1    dyoung 	u32			txd_cmd;
    360       1.1    dyoung 	ixgbe_dma_tag_t		*txtag;
    361       1.1    dyoung 	char			mtx_name[16];
    362      1.22   msaitoh 	pcq_t			*txr_interq;
    363      1.22   msaitoh 	void			*txr_si;
    364  1.24.6.2       snj 
    365  1.24.6.2       snj 	/* Flow Director */
    366       1.1    dyoung 	u16			atr_sample;
    367       1.1    dyoung 	u16			atr_count;
    368  1.24.6.2       snj 
    369       1.1    dyoung 	u32			bytes;  /* used for AIM */
    370       1.1    dyoung 	u32			packets;
    371       1.1    dyoung 	/* Soft Stats */
    372       1.7   msaitoh 	struct evcnt	   	tso_tx;
    373       1.1    dyoung 	struct evcnt		no_desc_avail;
    374       1.1    dyoung 	struct evcnt		total_packets;
    375      1.22   msaitoh 	struct evcnt		pcq_drops;
    376       1.1    dyoung };
    377       1.1    dyoung 
    378       1.1    dyoung 
    379       1.1    dyoung /*
    380       1.1    dyoung  * The Receive ring, one per rx queue
    381       1.1    dyoung  */
    382       1.1    dyoung struct rx_ring {
    383       1.1    dyoung         struct adapter		*adapter;
    384       1.1    dyoung 	kmutex_t		rx_mtx;
    385       1.1    dyoung 	u32			me;
    386      1.11   msaitoh 	u32			tail;
    387       1.1    dyoung 	union ixgbe_adv_rx_desc	*rx_base;
    388       1.1    dyoung 	struct ixgbe_dma_alloc	rxdma;
    389       1.1    dyoung #ifdef LRO
    390       1.1    dyoung 	struct lro_ctrl		lro;
    391       1.1    dyoung #endif /* LRO */
    392       1.1    dyoung 	bool			lro_enabled;
    393       1.1    dyoung 	bool			hw_rsc;
    394       1.4   msaitoh 	bool			vtag_strip;
    395       1.7   msaitoh         u16			next_to_refresh;
    396       1.7   msaitoh         u16 			next_to_check;
    397       1.7   msaitoh 	u16			num_desc;
    398       1.7   msaitoh 	u16			mbuf_sz;
    399       1.1    dyoung 	char			mtx_name[16];
    400       1.1    dyoung 	struct ixgbe_rx_buf	*rx_buffers;
    401       1.7   msaitoh 	ixgbe_dma_tag_t		*ptag;
    402       1.1    dyoung 
    403       1.1    dyoung 	u32			bytes; /* Used for AIM calc */
    404       1.1    dyoung 	u32			packets;
    405       1.1    dyoung 
    406       1.1    dyoung 	/* Soft stats */
    407       1.6   msaitoh 	struct evcnt		rx_copies;
    408       1.1    dyoung 	struct evcnt		rx_packets;
    409       1.1    dyoung 	struct evcnt 		rx_bytes;
    410       1.1    dyoung 	struct evcnt 		rx_discarded;
    411       1.1    dyoung 	struct evcnt 		no_jmbuf;
    412       1.1    dyoung 	u64 			rsc_num;
    413  1.24.6.2       snj 
    414  1.24.6.2       snj 	/* Flow Director */
    415       1.1    dyoung 	u64			flm;
    416       1.1    dyoung };
    417       1.1    dyoung 
    418      1.13   msaitoh #define IXGBE_MAX_VF_MC 30  /* Max number of multicast entries */
    419      1.13   msaitoh 
    420      1.13   msaitoh struct ixgbe_vf {
    421  1.24.6.2       snj 	u_int    pool;
    422  1.24.6.2       snj 	u_int    rar_index;
    423  1.24.6.2       snj 	u_int    max_frame_size;
    424  1.24.6.2       snj 	uint32_t flags;
    425  1.24.6.2       snj 	uint8_t  ether_addr[ETHER_ADDR_LEN];
    426  1.24.6.2       snj 	uint16_t mc_hash[IXGBE_MAX_VF_MC];
    427  1.24.6.2       snj 	uint16_t num_mc_hashes;
    428  1.24.6.2       snj 	uint16_t default_vlan;
    429  1.24.6.2       snj 	uint16_t vlan_tag;
    430  1.24.6.2       snj 	uint16_t api_ver;
    431      1.13   msaitoh };
    432      1.13   msaitoh 
    433       1.1    dyoung /* Our adapter structure */
    434       1.1    dyoung struct adapter {
    435       1.1    dyoung 	struct ixgbe_hw		hw;
    436      1.16   msaitoh 	struct ixgbe_osdep	osdep;
    437       1.1    dyoung 
    438       1.1    dyoung 	device_t		dev;
    439      1.16   msaitoh 	struct ifnet		*ifp;
    440      1.24   msaitoh 	struct if_percpuq	*ipq;	/* softint-based input queues */
    441       1.1    dyoung 
    442       1.1    dyoung 	struct resource		*pci_mem;
    443       1.1    dyoung 	struct resource		*msix_mem;
    444       1.1    dyoung 
    445       1.1    dyoung 	/*
    446       1.1    dyoung 	 * Interrupt resources: this set is
    447       1.1    dyoung 	 * either used for legacy, or for Link
    448  1.24.6.2       snj 	 * when doing MSI-X
    449       1.1    dyoung 	 */
    450       1.1    dyoung 	void			*tag;
    451       1.1    dyoung 	struct resource 	*res;
    452       1.1    dyoung 
    453       1.1    dyoung 	struct ifmedia		media;
    454       1.1    dyoung 	callout_t		timer;
    455  1.24.6.2       snj 	int			link_rid;
    456       1.1    dyoung 	int			if_flags;
    457       1.1    dyoung 
    458       1.1    dyoung 	kmutex_t		core_mtx;
    459       1.1    dyoung 
    460       1.1    dyoung 	unsigned int		num_queues;
    461       1.1    dyoung 
    462       1.1    dyoung 	/*
    463  1.24.6.2       snj 	 * Shadow VFTA table, this is needed because
    464  1.24.6.2       snj 	 * the real vlan filter table gets cleared during
    465  1.24.6.2       snj 	 * a soft reset and the driver needs to be able
    466  1.24.6.2       snj 	 * to repopulate it.
    467  1.24.6.2       snj 	 */
    468       1.1    dyoung 	u32			shadow_vfta[IXGBE_VFTA_SIZE];
    469       1.1    dyoung 
    470       1.1    dyoung 	/* Info about the interface */
    471       1.1    dyoung 	int			advertise;  /* link speeds */
    472      1.18   msaitoh 	bool			enable_aim; /* adaptive interrupt moderation */
    473       1.1    dyoung 	bool			link_active;
    474       1.1    dyoung 	u16			max_frame_size;
    475       1.1    dyoung 	u16			num_segs;
    476       1.1    dyoung 	u32			link_speed;
    477       1.1    dyoung 	bool			link_up;
    478      1.11   msaitoh 	u32 			vector;
    479      1.12   msaitoh 	u16			dmac;
    480      1.13   msaitoh 	u32			phy_layer;
    481      1.12   msaitoh 
    482      1.12   msaitoh 	/* Power management-related */
    483      1.12   msaitoh 	bool			wol_support;
    484      1.12   msaitoh 	u32			wufc;
    485       1.1    dyoung 
    486       1.1    dyoung 	/* Mbuf cluster size */
    487       1.1    dyoung 	u32			rx_mbuf_sz;
    488       1.1    dyoung 
    489       1.1    dyoung 	/* Support for pluggable optics */
    490       1.1    dyoung 	bool			sfp_probe;
    491       1.1    dyoung 	void			*link_si;  /* Link tasklet */
    492       1.1    dyoung 	void			*mod_si;   /* SFP tasklet */
    493       1.1    dyoung 	void			*msf_si;   /* Multispeed Fiber */
    494      1.13   msaitoh 	void			*mbx_si;   /* VF -> PF mailbox interrupt */
    495  1.24.6.2       snj 
    496  1.24.6.2       snj 	/* Flow Director */
    497       1.1    dyoung 	int			fdir_reinit;
    498       1.1    dyoung 	void			*fdir_si;
    499  1.24.6.2       snj 
    500      1.12   msaitoh 	void			*phy_si;   /* PHY intr tasklet */
    501       1.1    dyoung 
    502       1.1    dyoung 	/*
    503  1.24.6.2       snj 	 * Queues:
    504  1.24.6.2       snj 	 *   This is the irq holder, it has
    505  1.24.6.2       snj 	 *   and RX/TX pair or rings associated
    506  1.24.6.2       snj 	 *   with it.
    507  1.24.6.2       snj 	 */
    508       1.1    dyoung 	struct ix_queue		*queues;
    509       1.1    dyoung 
    510       1.1    dyoung 	/*
    511  1.24.6.2       snj 	 * Transmit rings
    512  1.24.6.2       snj 	 *      Allocated at run time, an array of rings
    513       1.1    dyoung 	 */
    514       1.1    dyoung 	struct tx_ring		*tx_rings;
    515       1.7   msaitoh 	u32			num_tx_desc;
    516      1.15   msaitoh 	u32			tx_process_limit;
    517       1.1    dyoung 
    518       1.1    dyoung 	/*
    519  1.24.6.2       snj 	 * Receive rings
    520  1.24.6.2       snj 	 *      Allocated at run time, an array of rings
    521       1.1    dyoung 	 */
    522       1.1    dyoung 	struct rx_ring		*rx_rings;
    523      1.11   msaitoh 	u64			active_queues;
    524       1.7   msaitoh 	u32			num_rx_desc;
    525      1.15   msaitoh 	u32			rx_process_limit;
    526       1.1    dyoung 
    527       1.1    dyoung 	/* Multicast array memory */
    528      1.13   msaitoh 	struct ixgbe_mc_addr	*mta;
    529  1.24.6.2       snj 
    530  1.24.6.2       snj 	/* SR-IOV */
    531  1.24.6.2       snj 	int                     iov_mode;
    532      1.13   msaitoh 	int			num_vfs;
    533      1.13   msaitoh 	int			pool;
    534      1.13   msaitoh 	struct ixgbe_vf		*vfs;
    535  1.24.6.2       snj 
    536  1.24.6.2       snj 	/* Bypass */
    537  1.24.6.2       snj 	struct ixgbe_bp_data    bypass;
    538  1.24.6.2       snj 
    539  1.24.6.2       snj 	/* Netmap */
    540      1.15   msaitoh 	void 			(*init_locked)(struct adapter *);
    541      1.15   msaitoh 	void 			(*stop_locked)(void *);
    542       1.8   msaitoh 
    543       1.1    dyoung 	/* Misc stats maintained by the driver */
    544       1.1    dyoung 	struct evcnt   		mbuf_defrag_failed;
    545       1.1    dyoung 	struct evcnt	   	efbig_tx_dma_setup;
    546       1.1    dyoung 	struct evcnt	   	efbig2_tx_dma_setup;
    547       1.1    dyoung 	struct evcnt	   	einval_tx_dma_setup;
    548       1.1    dyoung 	struct evcnt	   	other_tx_dma_setup;
    549       1.1    dyoung 	struct evcnt	   	eagain_tx_dma_setup;
    550       1.1    dyoung 	struct evcnt	   	enomem_tx_dma_setup;
    551      1.21   msaitoh 	struct evcnt	   	tso_err;
    552       1.1    dyoung 	struct evcnt	   	watchdog_events;
    553      1.12   msaitoh 	struct evcnt		link_irq;
    554       1.1    dyoung 	struct evcnt		handleq;
    555       1.1    dyoung 	struct evcnt		req;
    556       1.1    dyoung 
    557      1.11   msaitoh 	union {
    558      1.11   msaitoh 		struct ixgbe_hw_stats pf;
    559      1.11   msaitoh 		struct ixgbevf_hw_stats	vf;
    560      1.11   msaitoh 	} stats;
    561      1.11   msaitoh #if __FreeBSD_version >= 1100036
    562      1.11   msaitoh 	/* counter(9) stats */
    563      1.11   msaitoh 	u64			ipackets;
    564      1.11   msaitoh 	u64			ierrors;
    565      1.11   msaitoh 	u64			opackets;
    566      1.11   msaitoh 	u64			oerrors;
    567      1.11   msaitoh 	u64			ibytes;
    568      1.11   msaitoh 	u64			obytes;
    569      1.11   msaitoh 	u64			imcasts;
    570      1.11   msaitoh 	u64			omcasts;
    571      1.11   msaitoh 	u64			iqdrops;
    572      1.11   msaitoh 	u64			noproto;
    573      1.11   msaitoh #endif
    574  1.24.6.2       snj 	/* Feature capable/enabled flags.  See ixgbe_features.h */
    575  1.24.6.2       snj 	u32                     feat_cap;
    576  1.24.6.2       snj 	u32                     feat_en;
    577  1.24.6.2       snj 
    578       1.1    dyoung 	struct sysctllog	*sysctllog;
    579      1.19   msaitoh 	const struct sysctlnode *sysctltop;
    580       1.1    dyoung 	ixgbe_extmem_head_t jcl_head;
    581       1.1    dyoung };
    582       1.1    dyoung 
    583       1.8   msaitoh 
    584       1.1    dyoung /* Precision Time Sync (IEEE 1588) defines */
    585       1.1    dyoung #define ETHERTYPE_IEEE1588      0x88F7
    586       1.1    dyoung #define PICOSECS_PER_TICK       20833
    587       1.1    dyoung #define TSYNC_UDP_PORT          319 /* UDP port for the protocol */
    588  1.24.6.2       snj #define IXGBE_ADVTXD_TSTAMP     0x00080000
    589       1.1    dyoung 
    590       1.1    dyoung 
    591       1.1    dyoung #define IXGBE_CORE_LOCK_INIT(_sc, _name) \
    592       1.2   msaitoh         mutex_init(&(_sc)->core_mtx, MUTEX_DEFAULT, IPL_SOFTNET)
    593       1.1    dyoung #define IXGBE_CORE_LOCK_DESTROY(_sc)      mutex_destroy(&(_sc)->core_mtx)
    594       1.1    dyoung #define IXGBE_TX_LOCK_DESTROY(_sc)        mutex_destroy(&(_sc)->tx_mtx)
    595       1.1    dyoung #define IXGBE_RX_LOCK_DESTROY(_sc)        mutex_destroy(&(_sc)->rx_mtx)
    596       1.1    dyoung #define IXGBE_CORE_LOCK(_sc)              mutex_enter(&(_sc)->core_mtx)
    597       1.1    dyoung #define IXGBE_TX_LOCK(_sc)                mutex_enter(&(_sc)->tx_mtx)
    598       1.1    dyoung #define IXGBE_TX_TRYLOCK(_sc)             mutex_tryenter(&(_sc)->tx_mtx)
    599       1.1    dyoung #define IXGBE_RX_LOCK(_sc)                mutex_enter(&(_sc)->rx_mtx)
    600       1.1    dyoung #define IXGBE_CORE_UNLOCK(_sc)            mutex_exit(&(_sc)->core_mtx)
    601       1.1    dyoung #define IXGBE_TX_UNLOCK(_sc)              mutex_exit(&(_sc)->tx_mtx)
    602       1.1    dyoung #define IXGBE_RX_UNLOCK(_sc)              mutex_exit(&(_sc)->rx_mtx)
    603       1.3   msaitoh #define IXGBE_CORE_LOCK_ASSERT(_sc)       KASSERT(mutex_owned(&(_sc)->core_mtx))
    604       1.1    dyoung #define IXGBE_TX_LOCK_ASSERT(_sc)         KASSERT(mutex_owned(&(_sc)->tx_mtx))
    605       1.1    dyoung 
    606      1.11   msaitoh /* Stats macros */
    607      1.11   msaitoh #if __FreeBSD_version >= 1100036
    608      1.11   msaitoh #define IXGBE_SET_IPACKETS(sc, count)    (sc)->ipackets = (count)
    609      1.11   msaitoh #define IXGBE_SET_IERRORS(sc, count)     (sc)->ierrors = (count)
    610      1.11   msaitoh #define IXGBE_SET_OPACKETS(sc, count)    (sc)->opackets = (count)
    611      1.11   msaitoh #define IXGBE_SET_OERRORS(sc, count)     (sc)->oerrors = (count)
    612      1.11   msaitoh #define IXGBE_SET_COLLISIONS(sc, count)
    613      1.11   msaitoh #define IXGBE_SET_IBYTES(sc, count)      (sc)->ibytes = (count)
    614      1.11   msaitoh #define IXGBE_SET_OBYTES(sc, count)      (sc)->obytes = (count)
    615      1.11   msaitoh #define IXGBE_SET_IMCASTS(sc, count)     (sc)->imcasts = (count)
    616      1.11   msaitoh #define IXGBE_SET_OMCASTS(sc, count)     (sc)->omcasts = (count)
    617      1.11   msaitoh #define IXGBE_SET_IQDROPS(sc, count)     (sc)->iqdrops = (count)
    618      1.11   msaitoh #else
    619      1.11   msaitoh #define IXGBE_SET_IPACKETS(sc, count)    (sc)->ifp->if_ipackets = (count)
    620      1.11   msaitoh #define IXGBE_SET_IERRORS(sc, count)     (sc)->ifp->if_ierrors = (count)
    621      1.11   msaitoh #define IXGBE_SET_OPACKETS(sc, count)    (sc)->ifp->if_opackets = (count)
    622      1.11   msaitoh #define IXGBE_SET_OERRORS(sc, count)     (sc)->ifp->if_oerrors = (count)
    623      1.11   msaitoh #define IXGBE_SET_COLLISIONS(sc, count)  (sc)->ifp->if_collisions = (count)
    624      1.11   msaitoh #define IXGBE_SET_IBYTES(sc, count)      (sc)->ifp->if_ibytes = (count)
    625      1.11   msaitoh #define IXGBE_SET_OBYTES(sc, count)      (sc)->ifp->if_obytes = (count)
    626      1.11   msaitoh #define IXGBE_SET_IMCASTS(sc, count)     (sc)->ifp->if_imcasts = (count)
    627      1.11   msaitoh #define IXGBE_SET_OMCASTS(sc, count)     (sc)->ifp->if_omcasts = (count)
    628      1.11   msaitoh #define IXGBE_SET_IQDROPS(sc, count)     (sc)->ifp->if_iqdrops = (count)
    629      1.11   msaitoh #endif
    630      1.11   msaitoh 
    631      1.12   msaitoh /* External PHY register addresses */
    632      1.12   msaitoh #define IXGBE_PHY_CURRENT_TEMP		0xC820
    633      1.12   msaitoh #define IXGBE_PHY_OVERTEMP_STATUS	0xC830
    634      1.12   msaitoh 
    635      1.11   msaitoh /* Sysctl help messages; displayed with sysctl -d */
    636      1.11   msaitoh #define IXGBE_SYSCTL_DESC_ADV_SPEED \
    637      1.11   msaitoh 	"\nControl advertised link speed using these flags:\n" \
    638  1.24.6.2       snj 	"\t0x01 - advertise 100M\n" \
    639  1.24.6.2       snj 	"\t0x02 - advertise 1G\n" \
    640  1.24.6.2       snj         "\t0x04 - advertise 10G\n" \
    641  1.24.6.2       snj         "\t0x08 - advertise 10M\n" \
    642  1.24.6.2       snj         "\t0x10 - advertise 2.5G\n" \
    643  1.24.6.2       snj         "\t0x20 - advertise 5G\n\n" \
    644  1.24.6.2       snj         "\t5G, 2.5G, 100M and 10M are only supported on certain adapters."
    645      1.11   msaitoh 
    646      1.11   msaitoh #define IXGBE_SYSCTL_DESC_SET_FC \
    647      1.11   msaitoh 	"\nSet flow control mode using these values:\n" \
    648      1.11   msaitoh 	"\t0 - off\n" \
    649      1.11   msaitoh 	"\t1 - rx pause\n" \
    650      1.11   msaitoh 	"\t2 - tx pause\n" \
    651      1.11   msaitoh 	"\t3 - tx and rx pause"
    652      1.11   msaitoh 
    653       1.1    dyoung /* Workaround to make 8.0 buildable */
    654       1.1    dyoung #if __FreeBSD_version >= 800000 && __FreeBSD_version < 800504
    655       1.1    dyoung static __inline int
    656       1.1    dyoung drbr_needs_enqueue(struct ifnet *ifp, struct buf_ring *br)
    657       1.1    dyoung {
    658       1.1    dyoung #ifdef ALTQ
    659       1.1    dyoung         if (ALTQ_IS_ENABLED(&ifp->if_snd))
    660       1.1    dyoung                 return (1);
    661       1.1    dyoung #endif
    662       1.1    dyoung         return (!buf_ring_empty(br));
    663       1.1    dyoung }
    664       1.1    dyoung #endif
    665       1.1    dyoung 
    666       1.1    dyoung /*
    667  1.24.6.2       snj  * Find the number of unrefreshed RX descriptors
    668  1.24.6.2       snj  */
    669       1.1    dyoung static inline u16
    670       1.1    dyoung ixgbe_rx_unrefreshed(struct rx_ring *rxr)
    671  1.24.6.2       snj {
    672       1.1    dyoung 	if (rxr->next_to_check > rxr->next_to_refresh)
    673       1.1    dyoung 		return (rxr->next_to_check - rxr->next_to_refresh - 1);
    674       1.1    dyoung 	else
    675       1.7   msaitoh 		return ((rxr->num_desc + rxr->next_to_check) -
    676       1.1    dyoung 		    rxr->next_to_refresh - 1);
    677      1.13   msaitoh }
    678      1.13   msaitoh 
    679      1.13   msaitoh static inline int
    680  1.24.6.2       snj ixgbe_legacy_ring_empty(struct ifnet *ifp, pcq_t *dummy)
    681      1.13   msaitoh {
    682  1.24.6.2       snj 	UNREFERENCED_1PARAMETER(dummy);
    683      1.13   msaitoh 
    684  1.24.6.2       snj 	return IFQ_IS_EMPTY(&ifp->if_snd);
    685      1.13   msaitoh }
    686      1.13   msaitoh 
    687      1.13   msaitoh static inline int
    688  1.24.6.2       snj ixgbe_mq_ring_empty(struct ifnet *dummy, pcq_t *interq)
    689      1.13   msaitoh {
    690  1.24.6.2       snj 	UNREFERENCED_1PARAMETER(dummy);
    691      1.13   msaitoh 
    692  1.24.6.2       snj 	return (pcq_peek(interq) == NULL);
    693      1.13   msaitoh }
    694      1.13   msaitoh 
    695  1.24.6.2       snj /*
    696  1.24.6.2       snj  * This checks for a zero mac addr, something that will be likely
    697  1.24.6.2       snj  * unless the Admin on the Host has created one.
    698  1.24.6.2       snj  */
    699  1.24.6.2       snj static inline bool
    700  1.24.6.2       snj ixv_check_ether_addr(u8 *addr)
    701      1.13   msaitoh {
    702  1.24.6.2       snj 	bool status = TRUE;
    703      1.13   msaitoh 
    704  1.24.6.2       snj 	if ((addr[0] == 0 && addr[1]== 0 && addr[2] == 0 &&
    705  1.24.6.2       snj 	    addr[3] == 0 && addr[4]== 0 && addr[5] == 0))
    706  1.24.6.2       snj 		status = FALSE;
    707      1.13   msaitoh 
    708  1.24.6.2       snj 	return (status);
    709      1.13   msaitoh }
    710  1.24.6.2       snj 
    711  1.24.6.2       snj /* Shared Prototypes */
    712  1.24.6.2       snj void ixgbe_legacy_start(struct ifnet *);
    713  1.24.6.2       snj int  ixgbe_legacy_start_locked(struct ifnet *, struct tx_ring *);
    714  1.24.6.2       snj int  ixgbe_mq_start(struct ifnet *, struct mbuf *);
    715  1.24.6.2       snj int  ixgbe_mq_start_locked(struct ifnet *, struct tx_ring *);
    716  1.24.6.2       snj void ixgbe_deferred_mq_start(void *);
    717  1.24.6.2       snj 
    718  1.24.6.2       snj int  ixgbe_allocate_queues(struct adapter *);
    719  1.24.6.2       snj int  ixgbe_setup_transmit_structures(struct adapter *);
    720  1.24.6.2       snj void ixgbe_free_transmit_structures(struct adapter *);
    721  1.24.6.2       snj int  ixgbe_setup_receive_structures(struct adapter *);
    722  1.24.6.2       snj void ixgbe_free_receive_structures(struct adapter *);
    723  1.24.6.3    martin bool ixgbe_txeof(struct tx_ring *);
    724  1.24.6.2       snj bool ixgbe_rxeof(struct ix_queue *);
    725  1.24.6.2       snj 
    726  1.24.6.2       snj const struct sysctlnode *ixgbe_sysctl_instance(struct adapter *);
    727  1.24.6.2       snj 
    728  1.24.6.2       snj #include "ixgbe_bypass.h"
    729  1.24.6.2       snj #include "ixgbe_sriov.h"
    730  1.24.6.2       snj #include "ixgbe_fdir.h"
    731  1.24.6.2       snj #include "ixgbe_rss.h"
    732  1.24.6.2       snj #include "ixgbe_netmap.h"
    733      1.13   msaitoh 
    734       1.1    dyoung #endif /* _IXGBE_H_ */
    735