a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Copyright (C) 2008 Michael Brown <mbrown@fensystems.co.uk>.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * This program is free software; you can redistribute it and/or
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * modify it under the terms of the GNU General Public License as
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * published by the Free Software Foundation; either version 2 of the
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * License, or any later version.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * This program is distributed in the hope that it will be useful, but
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * WITHOUT ANY WARRANTY; without even the implied warranty of
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * General Public License for more details.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * You should have received a copy of the GNU General Public License
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * along with this program; if not, write to the Free Software
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * VMware vmxnet3 virtual NIC driver
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Maximum number of TX queues */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Maximum number of RX queues */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Maximum number of interrupts */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Maximum packet size */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** "PT" PCI BAR address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** "PT" PCI BAR size */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Interrupt Mask Register */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Transmit producer index */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Rx producer index for ring 1 */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Rx producer index for ring 2 */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** "VD" PCI BAR address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** "VD" PCI BAR size */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** vmxnet3 Revision Report Selection */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** UPT Version Report Selection */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Driver Shared Address Low */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Driver Shared Address High */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Command */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** MAC Address Low */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** MAC Address High */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Interrupt Cause Register */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Event Cause Register */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Commands */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync VMXNET3_CMD_GET_QUEUE_STATUS = VMXNET3_CMD_FIRST_GET,
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Events */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Miscellaneous configuration descriptor */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Driver version */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Guest information */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Version supported */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** UPT version supported */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** UPT features supported */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Driver-private data address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Queue descriptors data address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Driver-private data length */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Queue descriptors data length */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Maximum transmission unit */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Maximum number of RX scatter-gather */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Number of TX queues */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Number of RX queues */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Reserved */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Driver version magic */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Interrupt configuration */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Interrupt control - disable all interrupts */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Receive filter configuration */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Receive filter mode */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Multicast filter table length */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Reserved */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Multicast filter table address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** VLAN filter table (one bit per possible VLAN) */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Receive filter mode */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync VMXNET3_RXM_MCAST = 0x02, /**< Multicast passing the filters */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync VMXNET3_RXM_ALL_MULTI = 0x08, /**< All multicast */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Variable-length configuration descriptor */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Driver shared area */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Magic signature */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Reserved */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Miscellaneous configuration */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Interrupt configuration */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Receive filter configuration */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** RSS configuration */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Pattern-matching configuration */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Plugin configuration */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Event notifications */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Reserved */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Alignment of driver shared area */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Driver shared area magic */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Transmit descriptor */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Flags */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Transmit generation flag */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Transmit end-of-packet flag */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Transmit completion request flag */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Transmit completion descriptor */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Index of the end-of-packet descriptor */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Reserved */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Flags */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Transmit completion generation flag */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Transmit queue control */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Transmit queue configuration */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Descriptor ring address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Data ring address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Completion ring address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Driver-private data address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Reserved */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Number of descriptors */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Number of data descriptors */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Number of completion descriptors */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Driver-private data length */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Interrupt index */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Reserved */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Transmit queue statistics */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Reserved */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Receive descriptor */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Flags */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Reserved */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Receive generation flag */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Receive completion descriptor */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Descriptor index */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** RSS hash value */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Length */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Flags */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Receive completion generation flag */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Receive queue control */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Receive queue configuration */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Descriptor ring addresses */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Completion ring address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Driver-private data address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Reserved */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Number of descriptors */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Number of completion descriptors */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Driver-private data length */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Interrupt index */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Reserved */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Receive queue statistics */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Reserved */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Queue status */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Transmit queue descriptor */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Receive queue descriptor */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Queue descriptor set
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * We use only a single TX and RX queue
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Transmit queue descriptor(s) */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Receive queue descriptor(s) */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Alignment of queue descriptor set */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Alignment of rings */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Number of TX descriptors */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Number of TX completion descriptors */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Number of RX descriptors */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Number of RX completion descriptors */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * DMA areas
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * These are arranged in order of decreasing alignment, to allow for a
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * single allocation
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** TX descriptor ring */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync struct vmxnet3_tx_desc tx_desc[VMXNET3_NUM_TX_DESC];
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** TX completion ring */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync struct vmxnet3_tx_comp tx_comp[VMXNET3_NUM_TX_COMP];
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** RX descriptor ring */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync struct vmxnet3_rx_desc rx_desc[VMXNET3_NUM_RX_DESC];
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** RX completion ring */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync struct vmxnet3_rx_comp rx_comp[VMXNET3_NUM_RX_COMP];
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Queue descriptors */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Shared area */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** DMA area alignment */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Producer and consumer counters */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Transmit producer counter */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Transmit completion consumer counter */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Receive producer counter */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Receive fill level */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Receive consumer counter */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** A vmxnet3 NIC */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** "PT" register base address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** "VD" register base address */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** DMA area */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Producer and consumer counters */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Transmit I/O buffers */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync /** Receive I/O buffers */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** vmxnet3 version that we support */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** UPT version that we support */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** MTU size */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#define VMXNET3_MTU ( ETH_FRAME_LEN + 4 /* VLAN */ + 4 /* FCS */ )
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Receive ring maximum fill level */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync/** Received packet alignment padding */
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync#endif /* _VMXNET3_H */