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 280615 2015-03-25 14:10:20Z arybchik $ |
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 |
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 |
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 |
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 |
182 struct sfxge_lro_state lro; |
183#endif |
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 --- |