Deleted Added
sdiff udiff text old ( 219289 ) new ( 219290 )
full compact
1/*-
2 * Copyright (c) 2011 Chelsio Communications, Inc.
3 * All rights reserved.
4 * Written by: Navdeep Parhar <np@FreeBSD.org>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $FreeBSD: head/sys/dev/cxgbe/adapter.h 219289 2011-03-05 03:27:14Z np $
28 *
29 */
30
31#ifndef __T4_ADAPTER_H__
32#define __T4_ADAPTER_H__
33
34#include <sys/bus.h>
35#include <sys/rman.h>

--- 183 unchanged lines hidden (view full) ---

219};
220
221/*
222 * Ingress Queue: T4 is producer, driver is consumer.
223 */
224struct sge_iq {
225 bus_dma_tag_t desc_tag;
226 bus_dmamap_t desc_map;
227 struct mtx iq_lock;
228 char lockname[16];
229 unsigned int flags;
230 struct adapter *adapter;
231
232 __be64 *desc; /* KVA of descriptor ring */
233 bus_addr_t ba; /* bus address of descriptor ring */
234 const __be64 *cdesc; /* current descriptor */
235 uint8_t gen; /* generation bit */
236 uint8_t intr_params; /* interrupt holdoff parameters */
237 int8_t intr_pktc_idx; /* packet count threshold index */
238 uint8_t intr_next; /* holdoff for next interrupt */
239 uint8_t esize; /* size (bytes) of each entry in the queue */
240 uint16_t qsize; /* size (# of entries) of the queue */
241 uint16_t cidx; /* consumer index */
242 uint16_t cntxt_id; /* SGE context id for the iq */
243 uint16_t abs_id; /* absolute SGE id for the iq */
244 iq_intr_handler_t *handler;
245};
246
247enum {
248 /* eq flags */
249 EQ_ALLOCATED = (1 << 1), /* firmware resources allocated */
250 EQ_STARTED = (1 << 2), /* started */
251 EQ_STALLED = (1 << 3), /* currently stalled */
252};

--- 84 unchanged lines hidden (view full) ---

337enum {
338 RXQ_LRO_ENABLED = (1 << 0)
339};
340/* rxq: SGE ingress queue + SGE free list + miscellaneous items */
341struct sge_rxq {
342 struct sge_iq iq; /* MUST be first */
343 struct sge_fl fl;
344
345 unsigned int flags;
346 struct ifnet *ifp; /* the interface this rxq belongs to */
347 struct lro_ctrl lro; /* LRO state */
348
349 /* stats for common events first */
350
351 uint64_t rxcsum; /* # of times hardware assisted with checksum */
352 uint64_t vlan_extraction;/* # of times VLAN tag was extracted */
353
354 /* stats for not-that-common events */
355

--- 222 unchanged lines hidden ---