sfxge_rx.h (280502) | sfxge_rx.h (280615) |
---|---|
1/*- 2 * Copyright (c) 2010-2011 Solarflare Communications, Inc. 3 * All rights reserved. 4 * 5 * This software was developed in part by Philip Paeps under contract for 6 * Solarflare Communications, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2010-2011 Solarflare Communications, Inc. 3 * All rights reserved. 4 * 5 * This software was developed in part by Philip Paeps under contract for 6 * Solarflare Communications, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: stable/10/sys/dev/sfxge/sfxge_rx.h 280502 2015-03-25 10:01:07Z arybchik $ | 29 * $FreeBSD: stable/10/sys/dev/sfxge/sfxge_rx.h 280615 2015-03-25 14:10:20Z arybchik $ |
30 */ 31 32#ifndef _SFXGE_RX_H 33#define _SFXGE_RX_H 34 | 30 */ 31 32#ifndef _SFXGE_RX_H 33#define _SFXGE_RX_H 34 |
35#include "opt_inet.h" 36#include "opt_inet6.h" 37 38#if defined(INET) || defined(INET6) 39#define SFXGE_LRO 1 40#endif 41 |
|
35#define SFXGE_MAGIC_RESERVED 0x8000 36 37#define SFXGE_MAGIC_DMAQ_LABEL_WIDTH 6 38#define SFXGE_MAGIC_DMAQ_LABEL_MASK \ 39 ((1 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH) - 1) 40 41#define SFXGE_MAGIC_RX_QFLUSH_DONE \ 42 (SFXGE_MAGIC_RESERVED | (1 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) --- 11 unchanged lines hidden (view full) --- 54 55struct sfxge_rx_sw_desc { 56 struct mbuf *mbuf; 57 bus_dmamap_t map; 58 int flags; 59 int size; 60}; 61 | 42#define SFXGE_MAGIC_RESERVED 0x8000 43 44#define SFXGE_MAGIC_DMAQ_LABEL_WIDTH 6 45#define SFXGE_MAGIC_DMAQ_LABEL_MASK \ 46 ((1 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH) - 1) 47 48#define SFXGE_MAGIC_RX_QFLUSH_DONE \ 49 (SFXGE_MAGIC_RESERVED | (1 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) --- 11 unchanged lines hidden (view full) --- 61 62struct sfxge_rx_sw_desc { 63 struct mbuf *mbuf; 64 bus_dmamap_t map; 65 int flags; 66 int size; 67}; 68 |
69#ifdef SFXGE_LRO 70 |
|
62/** 63 * struct sfxge_lro_conn - Connection state for software LRO 64 * @link: Link for hash table and free list. 65 * @active_link: Link for active_conns list 66 * @l2_id: Identifying information from layer 2 67 * @conn_hash: Hash of connection 4-tuple 68 * @nh: IP (v4 or v6) header of super-packet 69 * @source: Source TCP port number --- 64 unchanged lines hidden (view full) --- 134 unsigned n_slow_start; 135 unsigned n_misorder; 136 unsigned n_too_many; 137 unsigned n_new_stream; 138 unsigned n_drop_idle; 139 unsigned n_drop_closed; 140}; 141 | 71/** 72 * struct sfxge_lro_conn - Connection state for software LRO 73 * @link: Link for hash table and free list. 74 * @active_link: Link for active_conns list 75 * @l2_id: Identifying information from layer 2 76 * @conn_hash: Hash of connection 4-tuple 77 * @nh: IP (v4 or v6) header of super-packet 78 * @source: Source TCP port number --- 64 unchanged lines hidden (view full) --- 143 unsigned n_slow_start; 144 unsigned n_misorder; 145 unsigned n_too_many; 146 unsigned n_new_stream; 147 unsigned n_drop_idle; 148 unsigned n_drop_closed; 149}; 150 |
151#endif /* SFXGE_LRO */ 152 |
|
142enum sfxge_flush_state { 143 SFXGE_FLUSH_DONE = 0, 144 SFXGE_FLUSH_PENDING, 145 SFXGE_FLUSH_FAILED 146}; 147 148enum sfxge_rxq_state { 149 SFXGE_RXQ_UNINITIALIZED = 0, --- 12 unchanged lines hidden (view full) --- 162 unsigned int entries; 163 unsigned int ptr_mask; 164 165 struct sfxge_rx_sw_desc *queue __aligned(CACHE_LINE_SIZE); 166 unsigned int added; 167 unsigned int pending; 168 unsigned int completed; 169 unsigned int loopback; | 153enum sfxge_flush_state { 154 SFXGE_FLUSH_DONE = 0, 155 SFXGE_FLUSH_PENDING, 156 SFXGE_FLUSH_FAILED 157}; 158 159enum sfxge_rxq_state { 160 SFXGE_RXQ_UNINITIALIZED = 0, --- 12 unchanged lines hidden (view full) --- 173 unsigned int entries; 174 unsigned int ptr_mask; 175 176 struct sfxge_rx_sw_desc *queue __aligned(CACHE_LINE_SIZE); 177 unsigned int added; 178 unsigned int pending; 179 unsigned int completed; 180 unsigned int loopback; |
181#ifdef SFXGE_LRO |
|
170 struct sfxge_lro_state lro; | 182 struct sfxge_lro_state lro; |
183#endif |
|
171 unsigned int refill_threshold; 172 struct callout refill_callout; 173 unsigned int refill_delay; 174 175 efx_rxq_t *common __aligned(CACHE_LINE_SIZE); 176 volatile enum sfxge_flush_state flush_state; 177}; 178 --- 14 unchanged lines hidden --- | 184 unsigned int refill_threshold; 185 struct callout refill_callout; 186 unsigned int refill_delay; 187 188 efx_rxq_t *common __aligned(CACHE_LINE_SIZE); 189 volatile enum sfxge_flush_state flush_state; 190}; 191 --- 14 unchanged lines hidden --- |