Print this page
3373 gcc >= 4.5 concerns about offsetof()
Portions contributed by: Igor Pashev <pashev.igor@gmail.com>


  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 #ifndef _SYS_XNF_H
  28 #define _SYS_XNF_H
  29 
  30 #ifdef __cplusplus
  31 extern "C" {
  32 #endif
  33 
  34 #define NET_TX_RING_SIZE  __RING_SIZE((netif_tx_sring_t *)0, PAGESIZE)
  35 #define NET_RX_RING_SIZE  __RING_SIZE((netif_rx_sring_t *)0, PAGESIZE)
  36 
  37 #define XNF_MAXPKT      1500            /* MTU size */
  38 #define XNF_FRAMESIZE   1514            /* frame size including MAC header */
  39 
  40 /* DEBUG flags */
  41 #define XNF_DEBUG_DDI           0x01
  42 #define XNF_DEBUG_TRACE         0x02
  43 
  44 /*
  45  * Information about each receive buffer and any transmit look-aside
  46  * buffers.
  47  */
  48 typedef struct xnf_buf {
  49         frtn_t                  free_rtn;
  50         struct xnf              *xnfp;
  51         ddi_dma_handle_t        dma_handle;
  52         caddr_t                 buf;            /* DMA-able data buffer */
  53         paddr_t                 buf_phys;
  54         mfn_t                   buf_mfn;
  55         size_t                  len;




  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 #ifndef _SYS_XNF_H
  28 #define _SYS_XNF_H
  29 
  30 #ifdef __cplusplus
  31 extern "C" {
  32 #endif
  33 
  34 #define NET_TX_RING_SIZE  __CONST_RING_SIZE(netif_tx, PAGESIZE)
  35 #define NET_RX_RING_SIZE  __CONST_RING_SIZE(netif_rx, PAGESIZE)
  36 
  37 #define XNF_MAXPKT      1500            /* MTU size */
  38 #define XNF_FRAMESIZE   1514            /* frame size including MAC header */
  39 
  40 /* DEBUG flags */
  41 #define XNF_DEBUG_DDI           0x01
  42 #define XNF_DEBUG_TRACE         0x02
  43 
  44 /*
  45  * Information about each receive buffer and any transmit look-aside
  46  * buffers.
  47  */
  48 typedef struct xnf_buf {
  49         frtn_t                  free_rtn;
  50         struct xnf              *xnfp;
  51         ddi_dma_handle_t        dma_handle;
  52         caddr_t                 buf;            /* DMA-able data buffer */
  53         paddr_t                 buf_phys;
  54         mfn_t                   buf_mfn;
  55         size_t                  len;