Deleted Added
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 $
27 * $FreeBSD: head/sys/dev/cxgbe/adapter.h 219290 2011-03-05 03:42:03Z 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;
227 bus_addr_t ba; /* bus address of descriptor ring */
228 char lockname[16];
229 unsigned int flags;
230 struct adapter *adapter;
229 uint32_t flags;
230 uint16_t abs_id; /* absolute SGE id for the iq */
231 int8_t intr_pktc_idx; /* packet count threshold index */
232 int8_t pad0;
233 iq_intr_handler_t *handler;
234 __be64 *desc; /* KVA of descriptor ring */
235
232 __be64 *desc; /* KVA of descriptor ring */
233 bus_addr_t ba; /* bus address of descriptor ring */
236 struct mtx iq_lock;
237 struct adapter *adapter;
238 const __be64 *cdesc; /* current descriptor */
239 uint8_t gen; /* generation bit */
240 uint8_t intr_params; /* interrupt holdoff parameters */
237 int8_t intr_pktc_idx; /* packet count threshold index */
241 uint8_t intr_next; /* holdoff for next interrupt */
242 uint8_t esize; /* size (bytes) of each entry in the queue */
243 uint16_t qsize; /* size (# of entries) of the queue */
244 uint16_t cidx; /* consumer index */
245 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;
246};
247
248enum {
249 /* eq flags */
250 EQ_ALLOCATED = (1 << 1), /* firmware resources allocated */
251 EQ_STARTED = (1 << 2), /* started */
252 EQ_STALLED = (1 << 3), /* currently stalled */
253};

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

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

--- 222 unchanged lines hidden ---