The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/vxge/vxge.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright(c) 2002-2011 Exar Corp.
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification are permitted provided the following conditions are met:
    7  *
    8  *    1. Redistributions of source code must retain the above copyright notice,
    9  *       this list of conditions and the following disclaimer.
   10  *
   11  *    2. Redistributions in binary form must reproduce the above copyright
   12  *       notice, this list of conditions and the following disclaimer in the
   13  *       documentation and/or other materials provided with the distribution.
   14  *
   15  *    3. Neither the name of the Exar Corporation nor the names of its
   16  *       contributors may be used to endorse or promote products derived from
   17  *       this software without specific prior written permission.
   18  *
   19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
   23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   29  * POSSIBILITY OF SUCH DAMAGE.
   30  */
   31 /*$FreeBSD: releng/11.2/sys/dev/vxge/vxge.h 331722 2018-03-29 02:50:57Z eadler $*/
   32 
   33 #ifndef _VXGE_H_
   34 #define _VXGE_H_
   35 
   36 #include <dev/vxge/vxgehal/vxgehal.h>
   37 #include <dev/vxge/vxge-osdep.h>
   38 #include "vxge-firmware.h"
   39 
   40 #define VXGE_GET_PARAM(str_kenv, to, param, hardcode) { \
   41         static int __CONCAT(param, __LINE__);           \
   42         if (testenv(str_kenv) == 1)                     \
   43                 TUNABLE_INT_FETCH(str_kenv,             \
   44                     &__CONCAT(param, __LINE__));        \
   45         else                                            \
   46                 __CONCAT(param, __LINE__) = hardcode;   \
   47                                                         \
   48         to.param = __CONCAT(param, __LINE__);           \
   49 }
   50 
   51 #define VXGE_BUFFER_ALIGN(buffer_length, to) {          \
   52         if (buffer_length % to)                         \
   53                 buffer_length +=                        \
   54                     (to - (buffer_length % to));        \
   55 }
   56 
   57 #define VXGE_HAL_VPATH_MSIX_ACTIVE              4
   58 #define VXGE_HAL_VPATH_MSIX_ALARM_ID            2
   59 #define VXGE_MSIX_ALARM_ID(hldev, i)                    \
   60         ((__hal_device_t *) hldev)->first_vp_id *       \
   61             VXGE_HAL_VPATH_MSIX_ACTIVE + i;
   62 
   63 #define VXGE_DUAL_PORT_MODE                     2
   64 #define VXGE_DUAL_PORT_MAP                      0xAAAAULL
   65 #define VXGE_BAUDRATE                           1000000000
   66 #define VXGE_MAX_SEGS                           VXGE_HAL_MAX_FIFO_FRAGS
   67 #define VXGE_TSO_SIZE                           65600
   68 #define VXGE_STATS_BUFFER_SIZE                  65536
   69 #define VXGE_PRINT_BUF_SIZE                     128
   70 #define VXGE_PMD_INFO_LEN                       24
   71 #define VXGE_RXD_REPLENISH_COUNT                4
   72 #define VXGE_TX_LOW_THRESHOLD                   32
   73 
   74 /* Default configuration parameters */
   75 #define VXGE_DEFAULT_USER_HARDCODED             -1
   76 #define VXGE_DEFAULT_CONFIG_VALUE               0xFF
   77 #define VXGE_DEFAULT_CONFIG_ENABLE              1
   78 #define VXGE_DEFAULT_CONFIG_DISABLE             0
   79 
   80 #if __FreeBSD_version >= 800000
   81 #define VXGE_DEFAULT_CONFIG_MQ_ENABLE           1
   82 #else
   83 #define VXGE_DEFAULT_CONFIG_MQ_ENABLE           0
   84 #endif
   85 
   86 #define VXGE_DEFAULT_CONFIG_IFQ_MAXLEN          1024
   87 
   88 #define VXGE_DEFAULT_BR_SIZE                    4096
   89 #define VXGE_DEFAULT_RTH_BUCKET_SIZE            8
   90 #define VXGE_DEFAULT_RING_BLOCK                 2
   91 #define VXGE_DEFAULT_SUPPORTED_DEVICES          1
   92 #define VXGE_DEFAULT_DEVICE_POLL_MILLIS         2000
   93 #define VXGE_DEFAULT_FIFO_ALIGNED_FRAGS         1
   94 #define VXGE_DEFAULT_VPATH_PRIORITY_LOW         3
   95 #define VXGE_DEFAULT_VPATH_PRIORITY_HIGH        0
   96 #define VXGE_DEFAULT_ALL_VID_ENABLE             \
   97         VXGE_HAL_VPATH_RPA_ALL_VID_ENABLE
   98 
   99 #define VXGE_DEFAULT_STRIP_VLAN_TAG             \
  100         VXGE_HAL_VPATH_RPA_STRIP_VLAN_TAG_ENABLE
  101 
  102 #define VXGE_DEFAULT_TTI_BTIMER_VAL             250000
  103 #define VXGE_DEFAULT_TTI_LTIMER_VAL             80
  104 #define VXGE_DEFAULT_TTI_RTIMER_VAL             0
  105 
  106 #define VXGE_DEFAULT_RTI_BTIMER_VAL             250
  107 #define VXGE_DEFAULT_RTI_LTIMER_VAL             100
  108 #define VXGE_DEFAULT_RTI_RTIMER_VAL             0
  109 
  110 #define VXGE_TTI_RTIMER_ADAPT_VAL               10
  111 #define VXGE_RTI_RTIMER_ADAPT_VAL               15
  112 
  113 #define VXGE_DEFAULT_TTI_TX_URANGE_A            5
  114 #define VXGE_DEFAULT_TTI_TX_URANGE_B            15
  115 #define VXGE_DEFAULT_TTI_TX_URANGE_C            40
  116 
  117 #define VXGE_DEFAULT_RTI_RX_URANGE_A            5
  118 #define VXGE_DEFAULT_RTI_RX_URANGE_B            15
  119 #define VXGE_DEFAULT_RTI_RX_URANGE_C            40
  120 
  121 #define VXGE_DEFAULT_TTI_TX_UFC_A               1
  122 #define VXGE_DEFAULT_TTI_TX_UFC_B               5
  123 #define VXGE_DEFAULT_TTI_TX_UFC_C               15
  124 #define VXGE_DEFAULT_TTI_TX_UFC_D               40
  125 
  126 #define VXGE_DEFAULT_RTI_RX_UFC_A               1
  127 #define VXGE_DEFAULT_RTI_RX_UFC_B               20
  128 #define VXGE_DEFAULT_RTI_RX_UFC_C               40
  129 #define VXGE_DEFAULT_RTI_RX_UFC_D               100
  130 
  131 #define VXGE_MAX_RX_INTERRUPT_COUNT             100
  132 #define VXGE_MAX_TX_INTERRUPT_COUNT             200
  133 
  134 #define is_multi_func(func_mode) \
  135         ((func_mode == VXGE_HAL_PCIE_FUNC_MODE_MF8_VP2) || \
  136         (func_mode == VXGE_HAL_PCIE_FUNC_MODE_MF2_VP8) || \
  137         (func_mode == VXGE_HAL_PCIE_FUNC_MODE_MF4_VP4) || \
  138         (func_mode == VXGE_HAL_PCIE_FUNC_MODE_MF8P_VP2))
  139 
  140 #define is_single_func(func_mode) \
  141         (func_mode == VXGE_HAL_PCIE_FUNC_MODE_SF1_VP17)
  142 
  143 #define VXGE_DRV_STATS(v, x)            v->driver_stats.x++
  144 #define VXGE_MAX_MSIX_MESSAGES          (VXGE_HAL_MAX_VIRTUAL_PATHS * 2 + 2)
  145 
  146 #define VXGE_DRV_LOCK(x)                mtx_lock(&(x)->mtx_drv)
  147 #define VXGE_DRV_UNLOCK(x)              mtx_unlock(&(x)->mtx_drv)
  148 #define VXGE_DRV_LOCK_DESTROY(x)        mtx_destroy(&(x)->mtx_drv)
  149 #define VXGE_DRV_LOCK_ASSERT(x)         mtx_assert(&(x)->mtx_drv, MA_OWNED)
  150 
  151 #define VXGE_TX_LOCK(x)                 mtx_lock(&(x)->mtx_tx)
  152 #define VXGE_TX_TRYLOCK(x)              mtx_trylock(&(x)->mtx_tx)
  153 #define VXGE_TX_UNLOCK(x)               mtx_unlock(&(x)->mtx_tx)
  154 #define VXGE_TX_LOCK_DESTROY(x)         mtx_destroy(&(x)->mtx_tx)
  155 #define VXGE_TX_LOCK_ASSERT(x)          mtx_assert(&(x)->mtx_tx, MA_OWNED)
  156 
  157 const char *
  158 vxge_port_mode[6] =
  159 {
  160         "Default",
  161         "Reserved",
  162         "Active/Passive",
  163         "Single Port",
  164         "Dual Port",
  165         "Disabled"
  166 };
  167 
  168 const char *
  169 vxge_port_failure[3] =
  170 {
  171         "No Failover",
  172         "Failover only",
  173         "Failover & Failback"
  174 };
  175 
  176 /* IOCTLs to identify vxge-manage requests */
  177 typedef enum _vxge_query_device_info_e {
  178 
  179         VXGE_GET_PCI_CONF = 100,
  180         VXGE_GET_MRPCIM_STATS = 101,
  181         VXGE_GET_DEVICE_STATS = 102,
  182         VXGE_GET_DEVICE_HWINFO = 103,
  183         VXGE_GET_DRIVER_STATS = 104,
  184         VXGE_GET_INTR_STATS = 105,
  185         VXGE_GET_VERSION = 106,
  186         VXGE_GET_TCODE = 107,
  187         VXGE_GET_VPATH_COUNT = 108,
  188         VXGE_GET_BANDWIDTH = 109,
  189         VXGE_SET_BANDWIDTH = 110,
  190         VXGE_GET_PORT_MODE = 111,
  191         VXGE_SET_PORT_MODE = 112
  192 
  193 } vxge_query_device_info_e;
  194 
  195 typedef enum _vxge_firmware_upgrade_e {
  196 
  197         VXGE_FW_UPGRADE_NONE = 0,
  198         VXGE_FW_UPGRADE_ALL = 1,
  199         VXGE_FW_UPGRADE_FORCE = 2
  200 
  201 } vxge_firmware_upgrade_e;
  202 
  203 typedef enum _vxge_free_resources_e {
  204 
  205         VXGE_FREE_NONE = 0,
  206         VXGE_FREE_MUTEX = 1,
  207         VXGE_FREE_PCI_INFO = 2,
  208         VXGE_FREE_BAR0 = 3,
  209         VXGE_FREE_BAR1 = 4,
  210         VXGE_FREE_BAR2 = 5,
  211         VXGE_FREE_ISR_RESOURCE = 6,
  212         VXGE_FREE_MEDIA = 7,
  213         VXGE_FREE_INTERFACE = 8,
  214         VXGE_FREE_DEVICE_CONFIG = 9,
  215         VXGE_FREE_TERMINATE_DEVICE = 10,
  216         VXGE_FREE_TERMINATE_DRIVER = 11,
  217         VXGE_DISABLE_PCI_BUSMASTER = 12,
  218         VXGE_FREE_VPATH = 13,
  219         VXGE_FREE_ALL = 14
  220 
  221 } vxge_free_resources_e;
  222 
  223 typedef enum _vxge_device_attributes_e {
  224 
  225         VXGE_PRINT_DRV_VERSION = 0,
  226         VXGE_PRINT_PCIE_INFO = 1,
  227         VXGE_PRINT_SERIAL_NO = 2,
  228         VXGE_PRINT_PART_NO = 3,
  229         VXGE_PRINT_FW_VERSION = 4,
  230         VXGE_PRINT_FW_DATE = 5,
  231         VXGE_PRINT_FUNC_MODE = 6,
  232         VXGE_PRINT_INTR_MODE = 7,
  233         VXGE_PRINT_VPATH_COUNT = 8,
  234         VXGE_PRINT_MTU_SIZE = 9,
  235         VXGE_PRINT_LRO_MODE = 10,
  236         VXGE_PRINT_RTH_MODE = 11,
  237         VXGE_PRINT_TSO_MODE = 12,
  238         VXGE_PRINT_PMD_PORTS_0 = 13,
  239         VXGE_PRINT_PMD_PORTS_1 = 14,
  240         VXGE_PRINT_ADAPTER_TYPE = 15,
  241         VXGE_PRINT_PORT_MODE = 16,
  242         VXGE_PRINT_PORT_FAILURE = 17,
  243         VXGE_PRINT_ACTIVE_PORT = 18,
  244         VXGE_PRINT_L2SWITCH_MODE = 19
  245 
  246 } vxge_device_attribute_e;
  247 
  248 typedef struct _vxge_isr_info_t {
  249 
  250         int     irq_rid;
  251         void   *irq_handle;
  252         struct resource *irq_res;
  253 
  254 } vxge_isr_info_t;
  255 
  256 typedef struct _vxge_drv_stats_t {
  257 
  258         u64     isr_msix;
  259 
  260         u64     tx_xmit;
  261         u64     tx_posted;
  262         u64     tx_compl;
  263         u64     tx_tso;
  264         u64     tx_tcode;
  265         u64     tx_low_dtr_cnt;
  266         u64     tx_reserve_failed;
  267         u64     tx_no_dma_setup;
  268         u64     tx_max_frags;
  269         u64     tx_again;
  270 
  271         u64     rx_compl;
  272         u64     rx_tcode;
  273         u64     rx_no_buf;
  274         u64     rx_map_fail;
  275         u64     rx_lro_queued;
  276         u64     rx_lro_flushed;
  277 
  278 } vxge_drv_stats_t;
  279 
  280 typedef struct vxge_dev_t vxge_dev_t;
  281 
  282 /* Rx descriptor private structure */
  283 typedef struct _vxge_rxd_priv_t {
  284 
  285         mbuf_t  mbuf_pkt;
  286         bus_size_t dma_sizes[1];
  287         bus_addr_t dma_addr[1];
  288         bus_dmamap_t dma_map;
  289 
  290 } vxge_rxd_priv_t;
  291 
  292 /* Tx descriptor private structure */
  293 typedef struct _vxge_txdl_priv_t {
  294 
  295         mbuf_t  mbuf_pkt;
  296         bus_dmamap_t dma_map;
  297         bus_dma_segment_t dma_buffers[VXGE_MAX_SEGS];
  298 
  299 } vxge_txdl_priv_t;
  300 
  301 typedef struct _vxge_vpath_t {
  302 
  303         u32             vp_id;
  304         u32             vp_index;
  305         u32             is_open;
  306         u32             lro_enable;
  307         int             msix_vec;
  308 
  309         int             msix_vec_alarm;
  310         u32             is_configured;
  311         u64             rxd_posted;
  312         macaddr_t       mac_addr;
  313         macaddr_t       mac_mask;
  314 
  315         int             tx_ticks;
  316         int             rx_ticks;
  317 
  318         u32             tti_rtimer_val;
  319         u32             rti_rtimer_val;
  320 
  321         u64             tx_interrupts;
  322         u64             rx_interrupts;
  323 
  324         int             tx_intr_coalesce;
  325         int             rx_intr_coalesce;
  326 
  327         vxge_dev_t      *vdev;
  328         vxge_hal_vpath_h handle;
  329         char            mtx_tx_name[16];
  330 
  331         bus_dma_tag_t   dma_tag_tx;
  332         bus_dma_tag_t   dma_tag_rx;
  333         bus_dmamap_t    extra_dma_map;
  334 
  335         vxge_drv_stats_t driver_stats;
  336         struct          mtx mtx_tx;
  337         struct          lro_ctrl lro;
  338 
  339 #if __FreeBSD_version >= 800000
  340         struct          buf_ring *br;
  341 #endif
  342 
  343 } vxge_vpath_t;
  344 
  345 typedef struct _vxge_bw_info_t {
  346 
  347         char    query;
  348         u64     func_id;
  349         int     priority;
  350         int     bandwidth;
  351 
  352 } vxge_bw_info_t;
  353 
  354 typedef struct _vxge_port_info_t {
  355 
  356         char    query;
  357         int     port_mode;
  358         int     port_failure;
  359 
  360 } vxge_port_info_t;
  361 
  362 typedef struct _vxge_device_hw_info_t {
  363 
  364         vxge_hal_device_hw_info_t hw_info;
  365         vxge_hal_xmac_nwif_dp_mode port_mode;
  366         vxge_hal_xmac_nwif_behavior_on_failure port_failure;
  367 
  368 } vxge_device_hw_info_t;
  369 
  370 typedef struct _vxge_config_t {
  371 
  372         u32     intr_mode;
  373         int     lro_enable;
  374         int     rth_enable;
  375         int     tso_enable;
  376         int     tx_steering;
  377         int     rth_bkt_sz;
  378         int     ifq_maxlen;
  379         int     no_of_vpath;
  380         int     ifq_multi;
  381         int     intr_coalesce;
  382         int     low_latency;
  383         int     l2_switch;
  384         int     port_mode;
  385         int     function_mode;
  386         char    nic_attr[20][128];
  387 
  388         vxge_hal_device_hw_info_t       hw_info;
  389         vxge_firmware_upgrade_e         fw_option;
  390         vxge_hal_xmac_nwif_behavior_on_failure  port_failure;
  391 
  392         vxge_bw_info_t          bw_info[VXGE_HAL_MAX_FUNCTIONS];
  393         vxge_isr_info_t         isr_info[VXGE_MAX_MSIX_MESSAGES];
  394 
  395 } vxge_config_t;
  396 
  397 struct vxge_dev_t {
  398 
  399         device_t ndev;
  400 
  401         bool    is_privilaged;
  402         bool    is_initialized;
  403         bool    is_active;
  404         int     intr_count;
  405         bool    fw_upgrade;
  406         int     no_of_vpath;
  407         u64     active_port;
  408         u32     no_of_func;
  409         u32     hw_fw_version;
  410         u32     max_supported_vpath;
  411         int     rx_mbuf_sz;
  412         int     if_flags;
  413         int     ifm_optics;
  414         ifnet_t ifp;
  415 
  416         vxge_hal_xmac_nwif_dp_mode              port_mode;
  417         vxge_hal_xmac_nwif_l2_switch_status     l2_switch;
  418         vxge_hal_xmac_nwif_behavior_on_failure  port_failure;
  419 
  420         char    ndev_name[16];
  421         char    mtx_drv_name[16];
  422 
  423         struct mtx mtx_drv;
  424         struct ifmedia media;
  425 
  426         vxge_pci_info_t         *pdev;
  427         vxge_hal_device_t       *devh;
  428         vxge_vpath_t            *vpaths;
  429         vxge_config_t           config;
  430         vxge_hal_device_config_t *device_config;
  431         vxge_hal_vpath_h        vpath_handles[VXGE_HAL_MAX_VIRTUAL_PATHS];
  432 };
  433 
  434 int     vxge_probe(device_t);
  435 int     vxge_attach(device_t);
  436 int     vxge_detach(device_t);
  437 int     vxge_shutdown(device_t);
  438 
  439 int     vxge_alloc_resources(vxge_dev_t *);
  440 int     vxge_alloc_isr_resources(vxge_dev_t *);
  441 int     vxge_alloc_bar_resources(vxge_dev_t *, int);
  442 void    vxge_free_resources(device_t, vxge_free_resources_e);
  443 void    vxge_free_isr_resources(vxge_dev_t *);
  444 void    vxge_free_bar_resources(vxge_dev_t *, int);
  445 
  446 int     vxge_device_hw_info_get(vxge_dev_t *);
  447 int     vxge_firmware_verify(vxge_dev_t *);
  448 
  449 vxge_hal_status_e
  450 vxge_driver_init(vxge_dev_t *);
  451 
  452 vxge_hal_status_e
  453 vxge_firmware_upgrade(vxge_dev_t *);
  454 
  455 vxge_hal_status_e
  456 vxge_func_mode_set(vxge_dev_t *);
  457 
  458 vxge_hal_status_e
  459 vxge_port_mode_set(vxge_dev_t *);
  460 
  461 vxge_hal_status_e
  462 vxge_port_behavior_on_failure_set(vxge_dev_t *);
  463 
  464 vxge_hal_status_e
  465 vxge_l2switch_mode_set(vxge_dev_t *);
  466 
  467 void    vxge_init(void *);
  468 void    vxge_init_locked(vxge_dev_t *);
  469 
  470 void    vxge_stop(vxge_dev_t *);
  471 void    vxge_stop_locked(vxge_dev_t *);
  472 
  473 void    vxge_reset(vxge_dev_t *);
  474 int     vxge_ifp_setup(device_t);
  475 int     vxge_isr_setup(vxge_dev_t *);
  476 
  477 void    vxge_media_init(vxge_dev_t *);
  478 int     vxge_media_change(ifnet_t);
  479 void    vxge_media_status(ifnet_t, struct ifmediareq *);
  480 
  481 void    vxge_mutex_init(vxge_dev_t *);
  482 void    vxge_mutex_destroy(vxge_dev_t *);
  483 void    vxge_link_up(vxge_hal_device_h, void *);
  484 void    vxge_link_down(vxge_hal_device_h, void *);
  485 void    vxge_crit_error(vxge_hal_device_h, void *, vxge_hal_event_e, u64);
  486 
  487 int     vxge_ioctl(ifnet_t, u_long, caddr_t);
  488 int     vxge_ioctl_regs(vxge_dev_t *, struct ifreq *);
  489 int     vxge_ioctl_stats(vxge_dev_t *, struct ifreq *);
  490 void    vxge_promisc_set(vxge_dev_t *);
  491 
  492 void    vxge_vpath_config(vxge_dev_t *);
  493 int     vxge_vpath_open(vxge_dev_t *);
  494 void    vxge_vpath_close(vxge_dev_t *);
  495 void    vxge_vpath_reset(vxge_dev_t *);
  496 
  497 int     vxge_change_mtu(vxge_dev_t *, unsigned long);
  498 
  499 u32     vxge_ring_length_get(u32);
  500 
  501 void    vxge_isr_line(void *);
  502 int     vxge_isr_filter(void *);
  503 void    vxge_isr_msix(void *);
  504 void    vxge_isr_msix_alarm(void *);
  505 
  506 void
  507 vxge_intr_coalesce_tx(vxge_vpath_t *);
  508 
  509 void
  510 vxge_intr_coalesce_rx(vxge_vpath_t *);
  511 
  512 vxge_hal_status_e
  513 vxge_msix_enable(vxge_dev_t *);
  514 
  515 vxge_hal_status_e
  516 vxge_rth_config(vxge_dev_t *);
  517 
  518 int     vxge_dma_tags_create(vxge_vpath_t *);
  519 void    vxge_device_hw_info_print(vxge_dev_t *);
  520 int     vxge_driver_config(vxge_dev_t *);
  521 
  522 #if __FreeBSD_version >= 800000
  523 
  524 int
  525 vxge_mq_send(ifnet_t, mbuf_t);
  526 
  527 static inline int
  528 vxge_mq_send_locked(ifnet_t, vxge_vpath_t *, mbuf_t);
  529 
  530 void
  531 vxge_mq_qflush(ifnet_t);
  532 
  533 #endif
  534 
  535 void
  536 vxge_send(ifnet_t);
  537 
  538 static inline void
  539 vxge_send_locked(ifnet_t, vxge_vpath_t *);
  540 
  541 static inline int
  542 vxge_xmit(ifnet_t, vxge_vpath_t *, mbuf_t *);
  543 
  544 static inline int
  545 vxge_dma_mbuf_coalesce(bus_dma_tag_t, bus_dmamap_t,
  546     mbuf_t *, bus_dma_segment_t *, int *);
  547 
  548 static inline void
  549 vxge_rx_checksum(vxge_hal_ring_rxd_info_t, mbuf_t);
  550 
  551 static inline void
  552 vxge_rx_input(ifnet_t, mbuf_t, vxge_vpath_t *);
  553 
  554 static inline vxge_hal_vpath_h
  555 vxge_vpath_handle_get(vxge_dev_t *, int);
  556 
  557 static inline int
  558 vxge_vpath_get(vxge_dev_t *, mbuf_t);
  559 
  560 void
  561 vxge_tso_config(vxge_dev_t *);
  562 
  563 vxge_hal_status_e
  564 vxge_tx_replenish(vxge_hal_vpath_h, vxge_hal_txdl_h, void *,
  565     u32, void *, vxge_hal_reopen_e);
  566 
  567 vxge_hal_status_e
  568 vxge_tx_compl(vxge_hal_vpath_h, vxge_hal_txdl_h, void *,
  569     vxge_hal_fifo_tcode_e, void *);
  570 
  571 void
  572 vxge_tx_term(vxge_hal_vpath_h, vxge_hal_txdl_h, void *,
  573     vxge_hal_txdl_state_e, void *, vxge_hal_reopen_e);
  574 
  575 vxge_hal_status_e
  576 vxge_rx_replenish(vxge_hal_vpath_h, vxge_hal_rxd_h, void *,
  577     u32, void *, vxge_hal_reopen_e);
  578 
  579 vxge_hal_status_e
  580 vxge_rx_compl(vxge_hal_vpath_h, vxge_hal_rxd_h, void *, u8, void *);
  581 
  582 void
  583 vxge_rx_term(vxge_hal_vpath_h, vxge_hal_rxd_h, void *,
  584     vxge_hal_rxd_state_e, void *, vxge_hal_reopen_e);
  585 
  586 void
  587 vxge_rx_rxd_1b_get(vxge_vpath_t *, vxge_hal_rxd_h, void *);
  588 
  589 int
  590 vxge_rx_rxd_1b_set(vxge_vpath_t *, vxge_hal_rxd_h, void *);
  591 
  592 int
  593 vxge_bw_priority_config(vxge_dev_t *);
  594 
  595 vxge_hal_status_e
  596 vxge_bw_priority_get(vxge_dev_t *, vxge_bw_info_t *);
  597 
  598 int
  599 vxge_bw_priority_set(vxge_dev_t *, struct ifreq *);
  600 
  601 int
  602 vxge_bw_priority_update(vxge_dev_t *, u32, bool);
  603 
  604 int
  605 vxge_port_mode_update(vxge_dev_t *);
  606 
  607 vxge_hal_status_e
  608 vxge_port_mode_get(vxge_dev_t *, vxge_port_info_t *);
  609 
  610 void
  611 vxge_pmd_port_type_get(vxge_dev_t *, u32, char *, u8);
  612 
  613 void
  614 vxge_active_port_update(vxge_dev_t *);
  615 
  616 static inline void
  617 vxge_null_terminate(char *, size_t);
  618 
  619 #endif  /* _VXGE_H_ */

Cache object: 61ded10ffb4c9dbb97b45c9d8b908ccc


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.