Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Apr 2011 14:33:16 +0000 (UTC)
From:      "George V. Neville-Neil" <gnn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r221167 - in head: share/man/man4 sys/conf sys/dev/vxge sys/dev/vxge/include sys/dev/vxge/vxgehal sys/modules/vxge
Message-ID:  <201104281433.p3SEXGhh027089@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gnn
Date: Thu Apr 28 14:33:15 2011
New Revision: 221167
URL: http://svn.freebsd.org/changeset/base/221167

Log:
  Exar driver for X3100 10GbE Server/Storage adapters
  
  Features: Jumbo frames (up to 9600), LRO (Large Receive Offload),
            TSO (TCP segmentation offload), RTH (Receive Traffic Hash).
  
  Submitted by: Sriram Rapuru at Exar
  MFC after:	2 weeks

Added:
  head/share/man/man4/vxge.4   (contents, props changed)
  head/sys/dev/vxge/
  head/sys/dev/vxge/LICENSE   (contents, props changed)
  head/sys/dev/vxge/README   (contents, props changed)
  head/sys/dev/vxge/include/
  head/sys/dev/vxge/include/build-version.h   (contents, props changed)
  head/sys/dev/vxge/include/vxge-debug.h   (contents, props changed)
  head/sys/dev/vxge/include/vxge-defs.h   (contents, props changed)
  head/sys/dev/vxge/include/vxge-list.h   (contents, props changed)
  head/sys/dev/vxge/include/vxge-os-debug.h   (contents, props changed)
  head/sys/dev/vxge/include/vxge-os-pal.h   (contents, props changed)
  head/sys/dev/vxge/include/vxge-queue.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-config.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-ll.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-mgmt.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-mgmtaux.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-stats.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-status.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-types.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-version.h   (contents, props changed)
  head/sys/dev/vxge/vxge-firmware.h   (contents, props changed)
  head/sys/dev/vxge/vxge-osdep.h   (contents, props changed)
  head/sys/dev/vxge/vxge.c   (contents, props changed)
  head/sys/dev/vxge/vxge.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/
  head/sys/dev/vxge/vxgehal/vxge-queue.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-blockpool.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-blockpool.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-channel.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-channel.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-common-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-config-priv.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-config.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-debug.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-device.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-device.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-doorbells.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-doorbells.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-driver.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-driver.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-fifo.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-fifo.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-ifmsg.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-ifmsg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-legacy-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-memrepair-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-mgmt.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-mgmtaux.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-mm.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-mm.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-mrpcim-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-mrpcim.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-mrpcim.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-pcicfgmgmt-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-regdefs.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-regs.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-ring.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-ring.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-srpcim-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-srpcim.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-srpcim.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-swapper.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-swapper.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-toc-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-virtualpath.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-virtualpath.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-vpath-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-vpmgmt-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal.h   (contents, props changed)
  head/sys/dev/vxge/vxgell-version.h   (contents, props changed)
  head/sys/modules/vxge/
  head/sys/modules/vxge/Makefile   (contents, props changed)
Modified:
  head/sys/conf/NOTES
  head/sys/conf/files

Added: head/share/man/man4/vxge.4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/man/man4/vxge.4	Thu Apr 28 14:33:15 2011	(r221167)
@@ -0,0 +1,111 @@
+.\" Copyright (c) 2002-2011 Exar Corp.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer as
+.\"    the first lines of this file unmodified.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 16, 2011
+.Dt VXGE 1
+.Os
+.Sh NAME
+.Nm vxge
+.Nd "Neterion X3100 10GbE Server/Storage adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device vxge"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_vxge_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Neterion X3100 adapters.
+The driver supports TCP Segmentation Offload (TSO/LSO), 
+Large Receive Offlaod (LRO), Jumbo Frames, Receive Traffic Hash (RTH),
+VLAN, Promiscuous mode and Multi function mode.
+.Pp
+
+The
+.Nm
+driver supports following function modes:
+.Bd -ragged -offset indent
+.Cd "SF1_VP17 - 1 function with 17 VPATHs"
+.Ed
+.Bd -ragged -offset indent
+.Cd "MF8_VP2 - 8 functions with 2 VPATHs per function"
+.Ed
+.Bd -ragged -offset indent
+.Cd "MF2_VP8 - 2 functions, 8 Paths/Function"
+.Ed
+.Bd -ragged -offset indent
+.Cd "MF4_VP4 - 4 Functions, 4 Paths/Function"
+.Ed
+.Bd -ragged -offset indent
+.Cd "MF8P_VP2 - 8 functions with 2 VPATHs per function required for DirectIO"
+.Ed
+.Pp
+For general information and support, please visit the Neterion support page
+.Pa http://www.neterion.com/support/support.html .
+.Pp
+Support for Jumbo Frames is provided via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to transmit and receive Jumbo Frames.
+X3100 adapters support Jumbo Frames up to 9600 bytes.
+.Pp
+For Jumbo Frames, the driver will try to allocate physically contiguous buffers.
+Failures to do so may degrade the performance.
+To resolve such problems, please visit
+.Pa http://www.neterion.com
+where additional information and a kernel patch can be found.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Neterion X3100 10 Gigabit Ethernet adapters listed in
+.Pa http://www.neterion.com .
+.Sh SUPPORT
+For troubleshooting tips and FAQs, please visit
+.Pa http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous .
+.Pp
+For any issues please send an email to
+.Aq support@neterion.com .
+.Sh SEE ALSO
+.Xr arp 8 ,
+.Xr ifconfig 8
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Neterion
+.Aq support@neterion.com .

Modified: head/sys/conf/NOTES
==============================================================================
--- head/sys/conf/NOTES	Thu Apr 28 14:27:17 2011	(r221166)
+++ head/sys/conf/NOTES	Thu Apr 28 14:33:15 2011	(r221167)
@@ -2094,6 +2094,7 @@ device		nxge		# Neterion Xframe 10GbE Se
 device		ti		# Alteon Networks Tigon I/II gigabit Ethernet
 device		txp		# 3Com 3cR990 (``Typhoon'')
 device		vx		# 3Com 3c590, 3c595 (``Vortex'')
+device		vxge		# Exar/Neterion XFrame 3100 10GbE
 
 # PCI FDDI NICs.
 device		fpa

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Thu Apr 28 14:27:17 2011	(r221166)
+++ head/sys/conf/files	Thu Apr 28 14:33:15 2011	(r221167)
@@ -1970,6 +1970,24 @@ dev/vte/if_vte.c		optional vte pci
 dev/vx/if_vx.c			optional vx
 dev/vx/if_vx_eisa.c		optional vx eisa
 dev/vx/if_vx_pci.c		optional vx pci
+dev/vxge/vxge.c				optional vxge
+dev/vxge/vxgehal/vxgehal-ifmsg.c	optional vxge
+dev/vxge/vxgehal/vxgehal-mrpcim.c	optional vxge
+dev/vxge/vxgehal/vxge-queue.c		optional vxge
+dev/vxge/vxgehal/vxgehal-ring.c		optional vxge
+dev/vxge/vxgehal/vxgehal-swapper.c	optional vxge
+dev/vxge/vxgehal/vxgehal-mgmt.c		optional vxge
+dev/vxge/vxgehal/vxgehal-srpcim.c	optional vxge
+dev/vxge/vxgehal/vxgehal-config.c	optional vxge
+dev/vxge/vxgehal/vxgehal-blockpool.c	optional vxge
+dev/vxge/vxgehal/vxgehal-doorbells.c	optional vxge
+dev/vxge/vxgehal/vxgehal-mgmtaux.c	optional vxge
+dev/vxge/vxgehal/vxgehal-device.c	optional vxge
+dev/vxge/vxgehal/vxgehal-mm.c		optional vxge
+dev/vxge/vxgehal/vxgehal-driver.c	optional vxge
+dev/vxge/vxgehal/vxgehal-virtualpath.c	optional vxge
+dev/vxge/vxgehal/vxgehal-channel.c	optional vxge
+dev/vxge/vxgehal/vxgehal-fifo.c		optional vxge
 dev/watchdog/watchdog.c		standard
 dev/wb/if_wb.c			optional wb pci
 dev/wds/wd7000.c		optional wds isa

Added: head/sys/dev/vxge/LICENSE
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dev/vxge/LICENSE	Thu Apr 28 14:33:15 2011	(r221167)
@@ -0,0 +1,31 @@
+/*-
+ *  Copyright (c) 2002-2010 Exar Corp.
+ *  All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification are permitted provided the following conditions are met:
+ *
+ *    1. Redistributions of source code must retain the above copyright notice,
+ *       this list of conditions and the following disclaimer.
+ *
+ *    2. Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ *    3. Neither the name of the Exar Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived from
+ *       this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ *  POSSIBILITY OF SUCH DAMAGE.
+ */
+/*$FreeBSD$*/
\ No newline at end of file

Added: head/sys/dev/vxge/README
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dev/vxge/README	Thu Apr 28 14:33:15 2011	(r221167)
@@ -0,0 +1,450 @@
+$FreeBSD$
+''_Readme for FreeBSD X3100 Series 10GbE PCIe I/O Virtualized Server Adapter Drivers_'''
+
+=== Introduction ===
+FreeBSD Driver for X3100 10GbE Server/Storage adapters 
+* Drivers support all X3100 10GbE adapters with FreeBSD version 7.x, 8.x and 9.x
+* Supports both i386 and amd64 architectures
+* Features:	Jumbo frames (up to 9600),
+		LRO (Large Receive Offload),
+		TSO (TCP segmentation offload),
+		RTH (Receive Traffic Hash).
+   Also, Extended Message Signaled Interrupts (MSI-X).
+
+
+''Features''
+
+    a.	Jumbo frames:
+	X3110 and X3120 supports MTU up to 9600 bytes, modifiable using ifconfig command.
+
+    b.	LRO (Large Receive Offload):
+	LRO can be enabled/disabled before loading driver.
+	Set lro_enable in vxge.conf to 1 before loading driver.
+
+    c.	TSO (TCP Segmentation Offload)
+	TSO can be enabled/disabled before loading driver.
+	Set tso_enable in vxge.conf to 1 before loading driver.
+
+    d.	RTH (Receive Traffic Hash)
+	Receive side steering for better scaling.
+	Set rth_enable in vxge.conf to 1 before loading driver.
+
+    e.	MSI-X
+	Can be enabled on platforms which support it, resulting in noticeable
+	performance improvement. 
+
+    f.	Multi-VPaths
+	Up to 17 hardware based transmit and receive data channels, with
+	multiple steering options.
+
+
+''X3100 & Driver configuration: vxge.conf''
+
+The vxge.conf contains following attributes.
+
+
+''msix_enable''
+
+Enable MSI (Message Signaled Interrupts) feature in driver.
+0 - INTA
+1 - MSI-X
+Default: 1
+
+
+''rth_enable''
+
+Enables Receive side steering for better scaling (RTH - Receive Traffic Hash)
+Range: 0 - 1
+Default: 1
+
+
+''lro_enable''
+
+Enables LRO (Large Receive Offload) feature in driver.
+Range: 0 - 1
+Default: 1
+
+
+''tso_enable''
+
+Enables TSO (TCP Segmentaton Offload) feature in driver.
+Range: 0 - 1
+Default: 1
+
+
+''no_of_vpath''
+
+Specifies maximum VPATH(s) configured for each device function.
+Valid range: 1-17
+Default: Optimized by driver
+
+
+''func_mode''
+
+Change PCI function mode
+    0  - SF1_VP17 (1 function with 17 VPATHs)
+    1  - MF8_VP2  (8 functions with 2 VPATHs per function)
+    8  - MF2_VP8  (2 functions, 8 Paths/Function)
+    9  - MF4_VP4  (4 Functions, 4 Paths/Function)
+    11 - MF8P_VP2 (8 functions with 2 VPATHS per function required for DirectIO)
+    Default: -1
+
+
+''port_mode''
+
+Change the default dual port mode
+    2 - Active Passive
+    3 - Single Port
+    4 - Dual Port
+
+
+''l2_switch''
+
+Turn on/off the inter function traffic through l2 switch
+    0 - Disallow inter function traffic
+    1 - Allow inter function traffic
+    Default: -1
+
+
+''bandwidth_0 - bandwidth_7''
+
+    Desired max receive/transmit bandwidth,in Mbps for function 0 to function 7
+    Minimum value is 100 Mbps, for 1 Gbps specify a value of 1024.
+
+
+''priority_0 - priority_7''
+
+    Desired receive/transmit priority for function 0 to function 7 
+
+
+''intr_coalesce''
+
+    Adaptive interrupt coalescing
+    0 - Disable
+    1 - Enable
+
+
+''Low Latency''
+
+   0 - Disable
+   1 - Enable
+
+=== Installation Instructions ===
+
+''Identifying the Adapter''
+
+    The X3100 adapter is identified by the board ID number on the adapter.
+
+    Look for a label that has a barcode and a number, for example,
+    SXT0425072. The factory-burned MAC address (hardware address)
+    shows up on the board above the serial number, 
+    (similar to 000CFC000449 -- 00:0C:FC:00:04:49).
+
+
+''Kernel Driver Source Package''
+
+This package contains kernel_update.sh script which is to be used to copy driver sources to kernel path.
+It creates vxge folder with source code in /usr/src/sys/dev and Makefile in /usr/src/sys/modules.
+
+Loadable parameters can be changed by putting below lines in /boot/device.hints and set values as desired.
+	hint.vxge.0.msix_enable="1"
+	hint.vxge.0.rth_enable="1"
+	hint.vxge.0.lro_enable="1"
+	hint.vxge.0.tso_enable="1"
+	hint.vxge.0.tx_steering="1"
+	hint.vxge.0.no_of_vpath="-1"
+	hint.vxge.0.func_mode="-1"
+	hint.vxge.0.port_mode="-1"
+	hint.vxge.0.fw_upgrade="1"
+	hint.vxge.0.bandwidth_0="-1"
+	hint.vxge.0.bandwidth_1="-1"
+	hint.vxge.0.bandwidth_2="-1"
+	hint.vxge.0.bandwidth_3="-1"
+	hint.vxge.0.bandwidth_4="-1"
+	hint.vxge.0.bandwidth_5="-1"
+	hint.vxge.0.bandwidth_6="-1"
+	hint.vxge.0.bandwidth_7="-1"
+	hint.vxge.0.priority_0="-1"
+	hint.vxge.0.priority_1="-1"
+	hint.vxge.0.priority_2="-1"
+	hint.vxge.0.priority_3="-1"
+	hint.vxge.0.priority_4="-1"
+	hint.vxge.0.priority_5="-1"
+	hint.vxge.0.priority_6="-1"
+	hint.vxge.0.priority_7="-1"
+	hint.vxge.0.intr_coalesce="0"
+	hint.vxge.0.low_latency="0"
+
+	e.g., set hint.vxge.0.msix_enable to 0 to load driver in INTA mode.
+	Then reboot the system to add loadable parameters to kenv.
+
+
+''Standalone Driver Source Package''
+
+vxge (FreeBSD package)
+    This directory contains FreeBSD driver sources for X3100 device(s),
+    Makefile, and X3100 Hardware Abstraction headers and sources
+    (vxgehal and include folders)
+
+vxgehal
+    This directory contains the X3100 HAL sources.
+    The driver uses HAL to perform operations on the X3100 hardware.
+
+include
+    The include subdirectory contains HAL header files.
+ 
+Source code for vxge-manage tool (used to get statistics, pciconfig and
+register dump) are included in the freebsd directory.
+
+
+''Building the driver''
+
+    The driver is distributed in the source form. Driver and installation
+    utility executables need to be built for the target platform. 
+
+    In the directory containing Makefile for building Exar driver for FreeBSD, 
+	#make clean
+	#make
+
+    Please unload previously installed Exar drivers before proceeding with following steps.
+	#make uninstall
+
+
+''Loading the driver''
+
+     Use "kldload" to load driver module vxge.ko.
+	#kldload ./vxge.ko
+
+    Run "kldstat" and find an entry for vxge kernel module to ensure driver installation
+    was successful.
+	#kldstat | grep vxge
+	3 1 0xc22cc000 26000   vxge.ko
+
+
+''Enabling interface and assigning IP address''
+
+    #ifconfig <INTERFACE> <IP_ADDRESS> up
+    <INTERFACE> will be similar to vxge0, vxge1 etc. and can be
+    found by executing "ifconfig -a".
+    Neterion adapters typically have MAC addresses starting with
+    "00:0C:FC" or "00:11:25".
+
+    Example:
+	#ifconfig vxge0 10.2.2.40 up
+	Enables vxge0 interface and assigns to it the IP address 10.2.2.40.
+
+	vxge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
+	options=53b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,TSO4,LRO>
+	ether 00:0c:fc:00:da:47
+	inet6 fe80::20c:fcff:fe00:da47%vxge0 prefixlen 64 scopeid 0x3
+	inet 10.2.2.40 netmask 0xff000000 broadcast 17.255.255.255
+	media: Ethernet autoselect (10Gbase-SR <full-duplex>)
+	status: active
+
+
+''Disabling the interface''
+
+    #ifconfig <INTERFACE> down
+    Example:
+	#ifconfig vxge0 down
+
+
+''Unloading the Driver''
+	#kldunload vxge.ko
+
+
+=== Performance Suggestions ===
+
+Sysctl Tuning Parameters
+	#sysctl net.inet.tcp.sendspace=786432
+	#sysctl net.inet.tcp.recvspace=786432
+	#sysctl net.inet.tcp.recvbuf_max=16777216
+	#sysctl net.inet.tcp.sendbuf_max=16777216
+	#sysctl net.inet.tcp.blackhole=1
+	#sysctl net.inet.tcp.rfc1323=1
+	#sysctl net.inet.tcp.path_mtu_discovery=1
+	#sysctl net.inet.tcp.inflight.enable=0
+	#sysctl net.inet.ip.maxfragsperpacket=2147483647
+	#sysctl kern.ipc.maxsockbuf=8388608
+	#sysctl kern.ipc.nmbclusters=2147483647
+	#sysctl kern.ipc.nmbjumbop=262144
+	#sysctl kern.ipc.maxsockets=81920
+	#sysctl hw.intr_storm_threshold=9000
+
+
+''Usage & Troubleshooting''
+
+For general information and support, please visit Neterion support website at 
+http://www.neterion.com/support/support.html
+
+Make sure that the operating system identifies the X3100 adapter. Note that
+Neterion vendor ID is 0x17D5 and X3110 and X3120 adapters can be fixed to both PCIe slots.
+
+The rest of this section details troubleshooting tips and information. Some of
+them are general and some are more specific. For online Troubleshooting tips 
+and faqs, please visit
+http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous
+
+
+''Loading the driver and initializing the device''
+
+The first time FreeBSD identifies the device it stores the corresponding
+device/vendor IDs in an enumerated tree of PCI devices. Note that Neterion
+vendor id is 0x17d5.
+
+After cold reboot FreeBSD finds the device and tries to load the corresponding
+driver. If it fails, try to switch the card and/or cable. And, in parallel, send
+us the "tail" of the "/var/log/messages". We also need traces, register dump and
+statistics(Use vxge-manage tool).
+
+
+''Collect information''
+
+If you're reporting a problem to Neterion, please describe:
+host(s) and adapter(s), switch (if used), software version.
+
+
+''ARP''
+
+If this is a basic connectivity issue (e.g., cannot connect, cannot ping),
+make sure first that ARP works
+Do you see ARPs coming through a switch (in case switch is used)?
+Do you see frame drops at the switch when pinging?
+Do you see frame counts increasing via statistics?
+
+
+''Have you tried''
+
+    a. A previous driver release;
+    b. A different adapter in the same PCI slot;
+    c. A different PCI slot;
+    d. Back-to-back setup so that the switch is excluded from the equation.
+    e. To replace the cables?
+    f. To use a different PCI slot?
+
+
+''Start clean''
+
+    a. Have you tried to reboot the switch? Cold-reboot the host?
+    b. Make sure that the latest released driver gets loaded after the host
+    reboot, and that the 10GE interface shows up via ifconfig.
+
+
+''LEDs''
+
+Do you see LED going green after everything is connected and drivers loaded?
+How/when does the color changes?
+
+
+''ifconfig''
+
+Run "ifconfig -a" at the command prompt and check whether the output Looks as
+expected. Include the output in your problem report.
+
+Note for instance that "all-foxes" i.e, FF:FF:FF:FF:FF:FF MAC address could
+explain a general connectivity issue, if that's what you see.
+
+
+''Log''
+
+Please attach the generated log, with traces enabled.
+
+Note that the driver's logging facility is configurable at compile-time. Errors
+and traces can be compiled out on a per-component basis. The components are: HAL
+fifos and rings, device, etc., see VXGE_COMPONENT_HAL_??? in the Makefile.
+
+Here's how you enable all except data path traces:
+CFLAGS_VXGE = -DVXGE_DEBUG_MODULE_MASK=0xffffffbf  \
+-DVXGE_DEBUG_ERR_MASK=0xffffffbf
+Recompile with traces and include the log in the report.
+
+
+=== Utilities ===
+
+''Statistics''
+
+ To print hardware and software statistics for interface instance 0
+       (i.e., vxge0), run:
+	#vxge-manage vxgeX stats common
+	#vxge-manage vxgeX stats mrpcim
+	#vxge-manage vxgeX stats driver
+	#vxge-manage vxgeX pciconfig
+	#vxge-manage vxgeX hwinfo
+	#vxge-manage vxgeX bw_pri_get
+	#vxge-manage vxgeX bw_pri_get vf_id
+	#vxge-manage vxgeX port_mode_get
+
+The vxge-manage tool generates log file in the working directory. Once done, ping a
+few times, and collect the statistics again (Ping both from this and the remote
+machines).
+
+Many counters could be of interest. For example, "rx_vld_frms" counts all
+valid incoming Ethernet frames seen by the adapter. Information could be derived
+from the fact that (for instance) counter stay constant during ping, if that is
+what happening. For detailed description of the X3100 counters, please refer
+to the "X3100 User Guide".
+
+Please include the statistics into your problem report.
+
+
+''X3100 registers''
+
+       Use vxge-manage to dump all X3100 BAR0 space registers. Include this register dump
+       into your problem report.
+       #vxge-manage vxgeX regs
+
+
+''PCI configuration space''
+
+Use vxge-manage to retrieve PCI vendor, device, etc. Include the PCI configutation
+space in your problem report.
+	#vxge-manage vxgeX pciconfig
+
+
+''Hardware Info''
+
+To retrieve hardware info of device, e.g, serial / part number and function mode etc.
+use vxge-manage 
+	#vxge-manage vxgeX hwinfo
+
+
+''Bandwidth and Priority''
+
+Use vxge-manage to display Bandwidth and Priority information.
+	#vxge-manage vxgeX bw_pri_get
+	or
+	#vxge-manage vxgeX bw_pri_get vf_id
+
+vxge-manage can also be used to set bandwidth and priority for individual VF.
+	#vxge-manage vxgeX bw_pri_set vf_id bandwidth 
+	or
+	#vxge-manage vxgeX bw_pri_set vf_id bandwidth priority
+
+	Example:
+	#vxge-manage vxge0 bw_pri_set 0 1500
+	or
+	#vxge-manage vxge0 bw_pri_set 0 1500 1
+
+''Port mode''
+
+Use vxge-manage to display Port mode setting
+	#vxge-manage vxgeX port_mode_get
+
+vxge-manage can also be used to set Port mode.
+	#vxge-manage vxgeX port_mode_set port_mode_value
+
+	Example:
+	#vxge-manage vxge0 port_mode_set 2
+
+=== Known Issues ===
+
+
+=== Available Downloads ===
+
+   For latest available drivers or further support please contact your network
+   adapter provider or neterionsupport@exar.com.
+
+
+===================================================================
+ Exar Corp., Proprietary
+ COPYRIGHT (c) 2002-2011 Exar corp., ALL RIGHTS RESERVED

Added: head/sys/dev/vxge/include/build-version.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dev/vxge/include/build-version.h	Thu Apr 28 14:33:15 2011	(r221167)
@@ -0,0 +1,7 @@
+/* $FreeBSD$ */
+
+#ifndef	BUILD_VERSION_H
+#define	BUILD_VERSION_H
+/* Do not edit! Automatically generated when released. */
+#define	GENERATED_BUILD_VERSION 22708
+#endif /* BUILD_VERSION_H */

Added: head/sys/dev/vxge/include/vxge-debug.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dev/vxge/include/vxge-debug.h	Thu Apr 28 14:33:15 2011	(r221167)
@@ -0,0 +1,159 @@
+/*-
+ * Copyright(c) 2002-2011 Exar Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification are permitted provided the following conditions are met:
+ *
+ *    1. Redistributions of source code must retain the above copyright notice,
+ *       this list of conditions and the following disclaimer.
+ *
+ *    2. Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ *    3. Neither the name of the Exar Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived from
+ *       this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*$FreeBSD$*/
+
+#ifndef	VXGE_DEBUG_H
+#define	VXGE_DEBUG_H
+
+__EXTERN_BEGIN_DECLS
+
+/*
+ * __FUNCTION__ is, together with __PRETTY_FUNCTION__ or something similar,
+ * a gcc extension. we'll have to #if defined around that, and provide some
+ * meaningful replacement for those, so to make some gcc versions happier
+ */
+#ifndef	__func__
+#if defined(__FUNCTION__)
+#define	__func__ __FUNCTION__
+#else
+#define	__func__ " "
+#endif
+#endif
+
+#define	NULL_HLDEV					NULL
+#define	NULL_VPID					0xFFFFFFFF
+
+#define	VXGE_DEBUG_MODULE_MASK_DEF			0xFFFFFFFF
+#define	VXGE_DEBUG_LEVEL_DEF				VXGE_TRACE
+
+extern u32 g_debug_level;
+
+#ifndef	VXGE_DEBUG_MODULE_MASK
+#define	VXGE_DEBUG_MODULE_MASK				0
+#endif
+
+/*
+ * enum vxge_debug_level_e
+ * @VXGE_NONE: debug disabled
+ * @VXGE_ERR: all errors going to be logged out
+ * @VXGE_INFO: all errors plus all kind of info tracing print outs
+ *		going to be logged out. noisy.
+ * @VXGE_TRACE: all errors, all info plus all function entry and exit
+ *		and parameters. Very noisy
+ *
+ * This enumeration going to be used to switch between different
+ * debug levels during runtime if DEBUG macro defined during
+ * compilation. If DEBUG macro not defined than code will be
+ * compiled out.
+ */
+typedef enum vxge_debug_level_e {
+	VXGE_NONE   = 0x0,
+	VXGE_ERR    = 0x1,
+	VXGE_INFO   = 0x2,
+	VXGE_TRACE  = 0x4,
+} vxge_debug_level_e;
+
+/*
+ * @VXGE_COMPONENT_HAL_DEVICE: do debug for vxge core device module
+ * @VXGE_COMPONENT_HAL_DEVICE_IRQ: do debug for vxge core device module in ISR
+ * @VXGE_COMPONENT_HAL_VAPTH: do debug for vxge core virtual path module
+ * @VXGE_COMPONENT_HAL_VAPTH_ISR: do debug for vxge core virtual path module in
+ *		ISR
+ * @VXGE_COMPONENT_HAL_CONFIG: do debug for vxge core config module
+ * @VXGE_COMPONENT_HAL_MM: do debug for vxge core memory module
+ * @VXGE_COMPONENT_HAL_POOL: do debug for vxge core memory pool module
+ * @VXGE_COMPONENT_HAL_QUEUE: do debug for vxge core queue module
+ * @VXGE_COMPONENT_HAL_BITMAP: do debug for vxge core BITMAP module
+ * @VXGE_COMPONENT_HAL_CHANNEL: do debug for vxge core channel module
+ * @VXGE_COMPONENT_HAL_FIFO: do debug for vxge core fifo module
+ * @VXGE_COMPONENT_HAL_RING: do debug for vxge core ring module
+ * @VXGE_COMPONENT_HAL_DMQ: do debug for vxge core DMQ module
+ * @VXGE_COMPONENT_HAL_UMQ: do debug for vxge core UMQ module
+ * @VXGE_COMPONENT_HAL_SQ: do debug for vxge core SQ module
+ * @VXGE_COMPONENT_HAL_SRQ: do debug for vxge core SRQ module
+ * @VXGE_COMPONENT_HAL_CQRQ: do debug for vxge core CRQ module
+ * @VXGE_COMPONENT_HAL_NCE: do debug for vxge core NCE module
+ * @VXGE_COMPONENT_HAL_STAG: do debug for vxge core STAG module
+ * @VXGE_COMPONENT_HAL_TCP: do debug for vxge core TCP module
+ * @VXGE_COMPONENT_HAL_LRO: do debug for vxge core LRO module
+ * @VXGE_COMPONENT_HAL_SPDM: do debug for vxge core SPDM module
+ * @VXGE_COMPONENT_HAL_SESSION: do debug for vxge core SESSION module
+ * @VXGE_COMPONENT_HAL_STATS: do debug for vxge core statistics module
+ * @VXGE_COMPONENT_HAL_MRPCIM: do debug for vxge KMA core mrpcim module
+ * @VXGE_COMPONENT_HAL_SRPCIM: do debug for vxge KMA core srpcim module
+ * @VXGE_COMPONENT_OSDEP: do debug for vxge KMA os dependent parts
+ * @VXGE_COMPONENT_LL: do debug for vxge link layer module
+ * @VXGE_COMPONENT_ULD: do debug for vxge upper layer driver
+ * @VXGE_COMPONENT_ALL: activate debug for all modules with no exceptions
+ *
+ * This enumeration going to be used to distinguish modules
+ * or libraries during compilation and runtime.  Makefile must declare
+ * VXGE_DEBUG_MODULE_MASK macro and set it to proper value.
+ */
+#define	VXGE_COMPONENT_HAL_DEVICE			0x00000001
+#define	VXGE_COMPONENT_HAL_DEVICE_IRQ			0x00000002
+#define	VXGE_COMPONENT_HAL_VPATH			0x00000004
+#define	VXGE_COMPONENT_HAL_VPATH_IRQ			0x00000008
+#define	VXGE_COMPONENT_HAL_CONFIG			0x00000010
+#define	VXGE_COMPONENT_HAL_MM				0x00000020
+#define	VXGE_COMPONENT_HAL_POOL				0x00000040
+#define	VXGE_COMPONENT_HAL_QUEUE			0x00000080
+#define	VXGE_COMPONENT_HAL_BITMAP			0x00000100
+#define	VXGE_COMPONENT_HAL_CHANNEL			0x00000200
+#define	VXGE_COMPONENT_HAL_FIFO				0x00000400
+#define	VXGE_COMPONENT_HAL_RING				0x00000800
+#define	VXGE_COMPONENT_HAL_DMQ				0x00001000
+#define	VXGE_COMPONENT_HAL_UMQ				0x00002000
+#define	VXGE_COMPONENT_HAL_SQ				0x00004000
+#define	VXGE_COMPONENT_HAL_SRQ				0x00008000
+#define	VXGE_COMPONENT_HAL_CQRQ				0x00010000
+#define	VXGE_COMPONENT_HAL_NCE				0x00020000
+#define	VXGE_COMPONENT_HAL_STAG				0x00040000
+#define	VXGE_COMPONENT_HAL_TCP				0x00080000
+#define	VXGE_COMPONENT_HAL_LRO				0x00100000
+#define	VXGE_COMPONENT_HAL_SPDM				0x00200000
+#define	VXGE_COMPONENT_HAL_SESSION			0x00400000
+#define	VXGE_COMPONENT_HAL_STATS			0x00800000
+#define	VXGE_COMPONENT_HAL_MRPCIM			0x01000000
+#define	VXGE_COMPONENT_HAL_MRPCIM_IRQ			0x02000000
+#define	VXGE_COMPONENT_HAL_SRPCIM			0x04000000
+#define	VXGE_COMPONENT_HAL_SRPCIM_IRQ			0x08000000
+#define	VXGE_COMPONENT_HAL_DRIVER			0x10000000
+
+/* space for CORE_XXX */
+#define	VXGE_COMPONENT_OSDEP				0x20000000
+#define	VXGE_COMPONENT_LL				0x40000000
+#define	VXGE_COMPONENT_ULD				0x80000000
+#define	VXGE_COMPONENT_ALL				0xffffffff
+
+__EXTERN_END_DECLS
+
+#endif	/* VXGE_DEBUG_H */

Added: head/sys/dev/vxge/include/vxge-defs.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dev/vxge/include/vxge-defs.h	Thu Apr 28 14:33:15 2011	(r221167)
@@ -0,0 +1,251 @@
+/*-
+ * Copyright(c) 2002-2011 Exar Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification are permitted provided the following conditions are met:
+ *
+ *    1. Redistributions of source code must retain the above copyright notice,
+ *       this list of conditions and the following disclaimer.
+ *
+ *    2. Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ *    3. Neither the name of the Exar Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived from
+ *       this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+/*$FreeBSD$*/
+
+#ifndef	VXGE_DEFS_H
+#define	VXGE_DEFS_H
+
+#define	VXGE_PCI_VENDOR_ID			0x17D5
+#define	VXGE_PCI_DEVICE_ID_TITAN_1		0x5833
+#define	VXGE_PCI_REVISION_TITAN_1		1
+#define	VXGE_PCI_DEVICE_ID_TITAN_1A		0x5833
+#define	VXGE_PCI_REVISION_TITAN_1A		2
+#define	VXGE_PCI_DEVICE_ID_TITAN_2		0x5834
+#define	VXGE_PCI_REVISION_TITAN_2		1
+
+#define	VXGE_MIN_FW_MAJOR_VERSION		1
+#define	VXGE_MIN_FW_MINOR_VERSION		8
+#define	VXGE_MIN_FW_BUILD_NUMBER		1
+
+#define	VXGE_DRIVER_VENDOR			"Exar Corp."
+#define	VXGE_CHIP_FAMILY			"X3100"
+#define	VXGE_SUPPORTED_MEDIA_0			"Fiber"
+
+#define	VXGE_DRIVER_NAME			\
+	"Neterion X3100 10GbE PCIe Server Adapter Driver"
+/*
+ * mBIT(loc) - set bit at offset
+ */
+#define	mBIT(loc)		(0x8000000000000000ULL >> (loc))
+
+/*
+ * vBIT(val, loc, sz) - set bits at offset
+ */
+#define	vBIT(val, loc, sz)	(((u64)(val)) << (64-(loc)-(sz)))
+#define	vBIT32(val, loc, sz)	(((u32)(val)) << (32-(loc)-(sz)))
+
+/*
+ * bVALx(bits, loc) - Get the value of x bits at location
+ */
+#define	bVAL1(bits, loc)  ((((u64)bits) >> (64-(loc+1))) & 0x1)
+#define	bVAL2(bits, loc)  ((((u64)bits) >> (64-(loc+2))) & 0x3)
+#define	bVAL3(bits, loc)  ((((u64)bits) >> (64-(loc+3))) & 0x7)
+#define	bVAL4(bits, loc)  ((((u64)bits) >> (64-(loc+4))) & 0xF)
+#define	bVAL5(bits, loc)  ((((u64)bits) >> (64-(loc+5))) & 0x1F)
+#define	bVAL6(bits, loc)  ((((u64)bits) >> (64-(loc+6))) & 0x3F)
+#define	bVAL7(bits, loc)  ((((u64)bits) >> (64-(loc+7))) & 0x7F)
+#define	bVAL8(bits, loc)  ((((u64)bits) >> (64-(loc+8))) & 0xFF)
+#define	bVAL9(bits, loc)  ((((u64)bits) >> (64-(loc+9))) & 0x1FF)
+#define	bVAL11(bits, loc) ((((u64)bits) >> (64-(loc+11))) & 0x7FF)
+#define	bVAL12(bits, loc) ((((u64)bits) >> (64-(loc+12))) & 0xFFF)
+#define	bVAL14(bits, loc) ((((u64)bits) >> (64-(loc+14))) & 0x3FFF)
+#define	bVAL15(bits, loc) ((((u64)bits) >> (64-(loc+15))) & 0x7FFF)
+#define	bVAL16(bits, loc) ((((u64)bits) >> (64-(loc+16))) & 0xFFFF)
+#define	bVAL17(bits, loc) ((((u64)bits) >> (64-(loc+17))) & 0x1FFFF)
+#define	bVAL18(bits, loc) ((((u64)bits) >> (64-(loc+18))) & 0x3FFFF)
+#define	bVAL20(bits, loc) ((((u64)bits) >> (64-(loc+20))) & 0xFFFFF)
+#define	bVAL22(bits, loc) ((((u64)bits) >> (64-(loc+22))) & 0x3FFFFF)
+#define	bVAL24(bits, loc) ((((u64)bits) >> (64-(loc+24))) & 0xFFFFFF)
+#define	bVAL28(bits, loc) ((((u64)bits) >> (64-(loc+28))) & 0xFFFFFFF)
+#define	bVAL32(bits, loc) ((((u64)bits) >> (64-(loc+32))) & 0xFFFFFFFF)
+#define	bVAL36(bits, loc) ((((u64)bits) >> (64-(loc+36))) & 0xFFFFFFFFFULL)
+#define	bVAL40(bits, loc) ((((u64)bits) >> (64-(loc+40))) & 0xFFFFFFFFFFULL)
+#define	bVAL44(bits, loc) ((((u64)bits) >> (64-(loc+44))) & 0xFFFFFFFFFFFULL)
+#define	bVAL48(bits, loc) ((((u64)bits) >> (64-(loc+48))) & 0xFFFFFFFFFFFFULL)
+#define	bVAL52(bits, loc) ((((u64)bits) >> (64-(loc+52))) & 0xFFFFFFFFFFFFFULL)
+#define	bVAL56(bits, loc) ((((u64)bits) >> (64-(loc+56))) & 0xFFFFFFFFFFFFFFULL)
+#define	bVAL60(bits, loc)   \
+		((((u64)bits) >> (64-(loc+60))) & 0xFFFFFFFFFFFFFFFULL)
+#define	bVAL61(bits, loc)   \
+		((((u64)bits) >> (64-(loc+61))) & 0x1FFFFFFFFFFFFFFFULL)
+
+#define	VXGE_HAL_VPATH_BMAP_START	47
+#define	VXGE_HAL_VPATH_BMAP_END		63
+
+#define	VXGE_HAL_ALL_FOXES		0xFFFFFFFFFFFFFFFFULL
+
+#define	VXGE_HAL_INTR_MASK_ALL		0xFFFFFFFFFFFFFFFFULL
+
+#define	VXGE_HAL_MAX_VIRTUAL_PATHS	17
+
+#define	VXGE_HAL_MAX_FUNCTIONS		8
+
+#define	VXGE_HAL_MAX_ITABLE_ENTRIES	256
+
+#define	VXGE_HAL_MAX_RSS_KEY_SIZE	40
+
+#define	VXGE_HAL_MAC_MAX_WIRE_PORTS	2
+
+#define	VXGE_HAL_MAC_SWITCH_PORT	2
+
+#define	VXGE_HAL_MAC_MAX_AGGR_PORTS	2
+
+#define	VXGE_HAL_MAC_MAX_PORTS		3
+
+#define	VXGE_HAL_INTR_ALARM		(1<<4)
+
+#define	VXGE_HAL_INTR_TX		(1<<(3-VXGE_HAL_VPATH_INTR_TX))
+
+#define	VXGE_HAL_INTR_RX		(1<<(3-VXGE_HAL_VPATH_INTR_RX))
+
+#define	VXGE_HAL_INTR_EINTA		(1<<(3-VXGE_HAL_VPATH_INTR_EINTA))
+
+#define	VXGE_HAL_INTR_BMAP		(1<<(3-VXGE_HAL_VPATH_INTR_BMAP))
+
+#define	VXGE_HAL_PCI_CONFIG_SPACE_SIZE	VXGE_OS_PCI_CONFIG_SIZE
+
+#define	VXGE_HAL_DEFAULT_32		0xffffffff
+
+#define	VXGE_HAL_DEFAULT_64		0xffffffffffffffff
+
+#define	VXGE_HAL_DUMP_BUF_SIZE		0x10000
+
+#define	VXGE_HAL_VPD_BUFFER_SIZE	128
+
+#define	VXGE_HAL_VPD_LENGTH		80
+
+/* Check whether an address is multicast. */
+#define	VXGE_HAL_IS_NULL(Address)	(Address == 0x0000000000000000ULL)
+
+/* Check whether an address is multicast. */
+#define	VXGE_HAL_IS_MULTICAST(Address)	(Address & 0x0000010000000000ULL)
+
+/* Check whether an address is broadcast. */
+#define	VXGE_HAL_IS_BROADCAST(Address)	\
+	((Address & 0x0000FFFF00000000ULL) == 0x0000FFFF00000000ULL)
+
+#define	VXGE_HAL_IS_UNICAST(Address)		\
+	(!(VXGE_HAL_IS_NULL(Address) ||		\
+	VXGE_HAL_IS_MULTICAST(Address) ||	\
+	VXGE_HAL_IS_BROADCAST(Address)))
+
+/* frames sizes */
+#define	VXGE_HAL_HEADER_ETHERNET_II_802_3_SIZE		14
+#define	VXGE_HAL_HEADER_802_2_SIZE			3
+#define	VXGE_HAL_HEADER_SNAP_SIZE			5
+#define	VXGE_HAL_HEADER_VLAN_SIZE			4
+#define	VXGE_HAL_MAC_HEADER_MAX_SIZE \
+			(VXGE_HAL_HEADER_ETHERNET_II_802_3_SIZE + \
+			VXGE_HAL_HEADER_802_2_SIZE + \
+			VXGE_HAL_HEADER_SNAP_SIZE)
+
+#define	VXGE_HAL_TCPIP_HEADER_MAX_SIZE			(64 + 64)
+
+/* 32bit alignments */
+
+/* A receive data corruption can occur resulting in either a single-bit or
+double-bit ECC error being flagged in the ASIC if starting offset of a
+buffer in single buffer mode is 0x2 to 0xa. Single bit ECC error will not
+lock up the card but can hide the data corruption while the double-bit ECC
+error will lock up the card. Limiting the starting offset of the buffers to
+0x0, 0x1 or to a value greater than 0xF will workaround this issue.
+VXGE_HAL_HEADER_ETHERNET_II_802_3_ALIGN of 2 causes the starting offset of
+buffer to be 0x2, 0x12 and so on, to have the start of the ip header dword
+aligned. The start of buffer of 0x2 will cause this problem to occur.
+To avoid this problem in all cases, add 0x10 to 0x2, to ensure that the start
+of buffer is outside of the problem causing offsets.
+*/
+

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104281433.p3SEXGhh027089>