if_vgevar.h (200635) | if_vgevar.h (200638) |
---|---|
1/*- 2 * Copyright (c) 2004 3 * Bill Paul <wpaul@windriver.com>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * | 1/*- 2 * Copyright (c) 2004 3 * Bill Paul <wpaul@windriver.com>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/dev/vge/if_vgevar.h 200635 2009-12-17 17:38:06Z yongari $ | 32 * $FreeBSD: head/sys/dev/vge/if_vgevar.h 200638 2009-12-17 18:00:25Z yongari $ |
33 */ 34 35#define VGE_JUMBO_MTU 9000 36 37#define VGE_TX_DESC_CNT 256 38#define VGE_RX_DESC_CNT 252 /* Must be a multiple of 4!! */ 39#define VGE_TX_RING_ALIGN 64 40#define VGE_RX_RING_ALIGN 64 --- 19 unchanged lines hidden (view full) --- 60 ((x) = (((x) + VGE_TX_DESC_CNT - 1) % VGE_TX_DESC_CNT)) 61#define VGE_RX_DESC_INC(x) ((x) = ((x) + 1) % VGE_RX_DESC_CNT) 62#define VGE_ADDR_LO(y) ((uint64_t) (y) & 0xFFFFFFFF) 63#define VGE_ADDR_HI(y) ((uint64_t) (y) >> 32) 64#define VGE_BUFLEN(y) ((y) & 0x3FFF) 65#define VGE_RXBYTES(x) (((x) & VGE_RDSTS_BUFSIZ) >> 16) 66#define VGE_MIN_FRAMELEN 60 67 | 33 */ 34 35#define VGE_JUMBO_MTU 9000 36 37#define VGE_TX_DESC_CNT 256 38#define VGE_RX_DESC_CNT 252 /* Must be a multiple of 4!! */ 39#define VGE_TX_RING_ALIGN 64 40#define VGE_RX_RING_ALIGN 64 --- 19 unchanged lines hidden (view full) --- 60 ((x) = (((x) + VGE_TX_DESC_CNT - 1) % VGE_TX_DESC_CNT)) 61#define VGE_RX_DESC_INC(x) ((x) = ((x) + 1) % VGE_RX_DESC_CNT) 62#define VGE_ADDR_LO(y) ((uint64_t) (y) & 0xFFFFFFFF) 63#define VGE_ADDR_HI(y) ((uint64_t) (y) >> 32) 64#define VGE_BUFLEN(y) ((y) & 0x3FFF) 65#define VGE_RXBYTES(x) (((x) & VGE_RDSTS_BUFSIZ) >> 16) 66#define VGE_MIN_FRAMELEN 60 67 |
68#define VGE_INT_HOLDOFF_TICK 20 69#define VGE_INT_HOLDOFF_USEC(x) ((x) / VGE_INT_HOLDOFF_TICK) 70#define VGE_INT_HOLDOFF_MIN 0 71#define VGE_INT_HOLDOFF_MAX (255 * VGE_INT_HOLDOFF_TICK) 72#define VGE_INT_HOLDOFF_DEFAULT 150 73 74#define VGE_RX_COAL_PKT_MIN 1 75#define VGE_RX_COAL_PKT_MAX VGE_RX_DESC_CNT 76#define VGE_RX_COAL_PKT_DEFAULT 64 77 78#define VGE_TX_COAL_PKT_MIN 1 79#define VGE_TX_COAL_PKT_MAX VGE_TX_DESC_CNT 80#define VGE_TX_COAL_PKT_DEFAULT 128 81 |
|
68struct vge_type { 69 uint16_t vge_vid; 70 uint16_t vge_did; 71 char *vge_name; 72}; 73 74struct vge_txdesc { 75 struct mbuf *tx_m; --- 96 unchanged lines hidden (view full) --- 172 int vge_phyaddr; 173 int vge_flags; 174#define VGE_FLAG_PCIE 0x0001 175#define VGE_FLAG_MSI 0x0002 176#define VGE_FLAG_SUSPENDED 0x4000 177#define VGE_FLAG_LINK 0x8000 178 int vge_expcap; 179 int vge_camidx; | 82struct vge_type { 83 uint16_t vge_vid; 84 uint16_t vge_did; 85 char *vge_name; 86}; 87 88struct vge_txdesc { 89 struct mbuf *tx_m; --- 96 unchanged lines hidden (view full) --- 186 int vge_phyaddr; 187 int vge_flags; 188#define VGE_FLAG_PCIE 0x0001 189#define VGE_FLAG_MSI 0x0002 190#define VGE_FLAG_SUSPENDED 0x4000 191#define VGE_FLAG_LINK 0x8000 192 int vge_expcap; 193 int vge_camidx; |
194 int vge_int_holdoff; 195 int vge_rx_coal_pkt; 196 int vge_tx_coal_pkt; |
|
180 struct mtx vge_mtx; 181 struct callout vge_watchdog; 182 int vge_timer; 183 184 struct vge_chain_data vge_cdata; 185 struct vge_ring_data vge_rdata; 186 struct vge_hw_stats vge_stats; 187}; --- 41 unchanged lines hidden --- | 197 struct mtx vge_mtx; 198 struct callout vge_watchdog; 199 int vge_timer; 200 201 struct vge_chain_data vge_cdata; 202 struct vge_ring_data vge_rdata; 203 struct vge_hw_stats vge_stats; 204}; --- 41 unchanged lines hidden --- |