svn commit: r237923 - in projects/calloutng:
cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize
etc share/man/man4 sys/amd64/amd64 sys/amd64/conf
sys/amd64/include sys/arm/at91 sys/arm/...
Davide Italiano
davide at FreeBSD.org
Sun Jul 1 12:48:57 UTC 2012
Author: davide
Date: Sun Jul 1 12:48:56 2012
New Revision: 237923
URL: http://svn.freebsd.org/changeset/base/237923
Log:
MFC as per r237921
Added:
projects/calloutng/sys/arm/at91/std.atmel
- copied unchanged from r237922, head/sys/arm/at91/std.atmel
projects/calloutng/sys/arm/conf/ATMEL
- copied unchanged from r237922, head/sys/arm/conf/ATMEL
Replaced:
projects/calloutng/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/
- copied from r237922, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/
Modified:
projects/calloutng/etc/syslog.conf
projects/calloutng/share/man/man4/mps.4
projects/calloutng/sys/amd64/amd64/pmap.c
projects/calloutng/sys/amd64/conf/GENERIC
projects/calloutng/sys/amd64/include/cpufunc.h
projects/calloutng/sys/arm/at91/std.at91
projects/calloutng/sys/arm/at91/std.at91sam9
projects/calloutng/sys/arm/at91/std.ethernut5
projects/calloutng/sys/arm/at91/std.hl201
projects/calloutng/sys/arm/at91/std.qila9g20
projects/calloutng/sys/arm/at91/std.sam9g20ek
projects/calloutng/sys/arm/at91/std.sam9x25ek
projects/calloutng/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
projects/calloutng/sys/dev/ath/ah_osdep.c
projects/calloutng/sys/dev/ath/ah_osdep.h
projects/calloutng/sys/dev/ath/ath_hal/ah.h
projects/calloutng/sys/dev/ath/ath_hal/ah_debug.h
projects/calloutng/sys/dev/ath/ath_hal/ah_internal.h
projects/calloutng/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
projects/calloutng/sys/dev/cxgb/cxgb_adapter.h
projects/calloutng/sys/dev/cxgb/cxgb_main.c
projects/calloutng/sys/dev/cxgb/cxgb_sge.c
projects/calloutng/sys/dev/cxgbe/adapter.h
projects/calloutng/sys/dev/cxgbe/t4_l2t.c
projects/calloutng/sys/dev/cxgbe/t4_main.c
projects/calloutng/sys/dev/cxgbe/t4_sge.c
projects/calloutng/sys/geom/geom_map.c
projects/calloutng/sys/modules/cxgbe/if_cxgbe/Makefile
projects/calloutng/sys/net/if_lagg.c
projects/calloutng/sys/net80211/_ieee80211.h
projects/calloutng/sys/powerpc/conf/GENERIC
projects/calloutng/sys/powerpc/conf/GENERIC64
projects/calloutng/sys/sparc64/conf/GENERIC
projects/calloutng/sys/sys/proc.h
projects/calloutng/tools/tools/ath/common/dumpregs_5416.c
projects/calloutng/usr.bin/killall/killall.c
Directory Properties:
projects/calloutng/ (props changed)
projects/calloutng/cddl/contrib/opensolaris/ (props changed)
projects/calloutng/share/man/man4/ (props changed)
projects/calloutng/sys/ (props changed)
projects/calloutng/sys/cddl/contrib/opensolaris/ (props changed)
Modified: projects/calloutng/etc/syslog.conf
==============================================================================
--- projects/calloutng/etc/syslog.conf Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/etc/syslog.conf Sun Jul 1 12:48:56 2012 (r237923)
@@ -16,6 +16,7 @@ cron.* /var/log/cron
*.=debug /var/log/debug.log
*.emerg *
# uncomment this to log all writes to /dev/console to /var/log/console.log
+# touch /var/log/console.log and chmod it to mode 600 before it will work
#console.info /var/log/console.log
# uncomment this to enable logging of all log messages to /var/log/all.log
# touch /var/log/all.log and chmod it to mode 600 before it will work
Modified: projects/calloutng/share/man/man4/mps.4
==============================================================================
--- projects/calloutng/share/man/man4/mps.4 Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/share/man/man4/mps.4 Sun Jul 1 12:48:56 2012 (r237923)
@@ -34,7 +34,7 @@
.\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $
.\" $FreeBSD$
.\"
-.Dd February 7, 2012
+.Dd June 30, 2012
.Dt MPS 4
.Os
.Sh NAME
@@ -205,9 +205,6 @@ This man page was written by
This driver has a couple of known shortcomings:
.Bl -bullet -compact
.It
-Not endian safe.
-It only works on little endian machines (e.g. amd64 and i386).
-.It
No userland utility available (e.g.
.Xr mptutil 8 ) .
.It
Modified: projects/calloutng/sys/amd64/amd64/pmap.c
==============================================================================
--- projects/calloutng/sys/amd64/amd64/pmap.c Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/amd64/amd64/pmap.c Sun Jul 1 12:48:56 2012 (r237923)
@@ -264,7 +264,7 @@ static caddr_t crashdumpmap;
static void free_pv_chunk(struct pv_chunk *pc);
static void free_pv_entry(pmap_t pmap, pv_entry_t pv);
-static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try);
+static pv_entry_t get_pv_entry(pmap_t pmap, struct rwlock **lockp);
static int popcnt_pc_map_elem(uint64_t elem);
static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp);
static void reserve_pv_entries(pmap_t pmap, int needed,
@@ -2102,6 +2102,8 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_
* drastic measures to free some pages so we can allocate
* another pv entry chunk.
*
+ * Returns NULL if PV entries were reclaimed from the specified pmap.
+ *
* We do not, however, unmap 2mpages because subsequent accesses will
* allocate per-page pv entries until repromotion occurs, thereby
* exacerbating the shortage of free pv entries.
@@ -2123,6 +2125,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, str
rw_assert(&pvh_global_lock, RA_LOCKED);
PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED);
+ KASSERT(lockp != NULL, ("reclaim_pv_chunk: lockp is NULL"));
pmap = NULL;
free = m_pc = NULL;
TAILQ_INIT(&new_tail);
@@ -2287,16 +2290,19 @@ free_pv_chunk(struct pv_chunk *pc)
}
/*
- * get a new pv_entry, allocating a block from the system
- * when needed.
+ * Returns a new PV entry, allocating a new PV chunk from the system when
+ * needed. If this PV chunk allocation fails and a PV list lock pointer was
+ * given, a PV chunk is reclaimed from an arbitrary pmap. Otherwise, NULL is
+ * returned.
+ *
+ * The given PV list lock may be released.
*/
static pv_entry_t
-get_pv_entry(pmap_t pmap, boolean_t try)
+get_pv_entry(pmap_t pmap, struct rwlock **lockp)
{
int bit, field;
pv_entry_t pv;
struct pv_chunk *pc;
- struct rwlock *lock;
vm_page_t m;
rw_assert(&pvh_global_lock, RA_LOCKED);
@@ -2330,14 +2336,11 @@ retry:
m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ |
VM_ALLOC_WIRED);
if (m == NULL) {
- if (try) {
+ if (lockp == NULL) {
PV_STAT(pc_chunk_tryfail++);
return (NULL);
}
- lock = NULL;
- m = reclaim_pv_chunk(pmap, &lock);
- if (lock != NULL)
- rw_wunlock(lock);
+ m = reclaim_pv_chunk(pmap, lockp);
if (m == NULL)
goto retry;
}
@@ -2380,6 +2383,8 @@ popcnt_pc_map_elem(uint64_t elem)
/*
* Ensure that the number of spare PV entries in the specified pmap meets or
* exceeds the given count, "needed".
+ *
+ * The given PV list lock may be released.
*/
static void
reserve_pv_entries(pmap_t pmap, int needed, struct rwlock **lockp)
@@ -2391,6 +2396,7 @@ reserve_pv_entries(pmap_t pmap, int need
rw_assert(&pvh_global_lock, RA_LOCKED);
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
+ KASSERT(lockp != NULL, ("reserve_pv_entries: lockp is NULL"));
/*
* Newly allocated PV chunks must be stored in a private list until
@@ -2402,9 +2408,15 @@ reserve_pv_entries(pmap_t pmap, int need
retry:
avail = 0;
TAILQ_FOREACH(pc, &pmap->pm_pvchunk, pc_list) {
- free = popcnt_pc_map_elem(pc->pc_map[0]);
- free += popcnt_pc_map_elem(pc->pc_map[1]);
- free += popcnt_pc_map_elem(pc->pc_map[2]);
+ if ((cpu_feature2 & CPUID2_POPCNT) == 0) {
+ free = popcnt_pc_map_elem(pc->pc_map[0]);
+ free += popcnt_pc_map_elem(pc->pc_map[1]);
+ free += popcnt_pc_map_elem(pc->pc_map[2]);
+ } else {
+ free = popcntq(pc->pc_map[0]);
+ free += popcntq(pc->pc_map[1]);
+ free += popcntq(pc->pc_map[2]);
+ }
if (free == 0)
break;
avail += free;
@@ -2584,7 +2596,8 @@ pmap_pvh_free(struct md_page *pvh, pmap_
}
/*
- * Conditionally create a pv entry.
+ * Conditionally create the PV entry for a 4KB page mapping if the required
+ * memory can be allocated without resorting to reclamation.
*/
static boolean_t
pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m,
@@ -2594,7 +2607,8 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm
rw_assert(&pvh_global_lock, RA_LOCKED);
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
- if ((pv = get_pv_entry(pmap, TRUE)) != NULL) {
+ /* Pass NULL instead of the lock pointer to disable reclamation. */
+ if ((pv = get_pv_entry(pmap, NULL)) != NULL) {
pv->pv_va = va;
CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m);
TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list);
@@ -2604,7 +2618,8 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm
}
/*
- * Create the pv entry for a 2MB page mapping.
+ * Conditionally create the PV entry for a 2MB page mapping if the required
+ * memory can be allocated without resorting to reclamation.
*/
static boolean_t
pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa,
@@ -2614,7 +2629,9 @@ pmap_pv_insert_pde(pmap_t pmap, vm_offse
pv_entry_t pv;
rw_assert(&pvh_global_lock, RA_LOCKED);
- if ((pv = get_pv_entry(pmap, TRUE)) != NULL) {
+ PMAP_LOCK_ASSERT(pmap, MA_OWNED);
+ /* Pass NULL instead of the lock pointer to disable reclamation. */
+ if ((pv = get_pv_entry(pmap, NULL)) != NULL) {
pv->pv_va = va;
CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, pa);
pvh = pa_to_pvh(pa);
@@ -3513,7 +3530,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va,
KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva,
("pmap_enter: managed mapping within the clean submap"));
if (pv == NULL)
- pv = get_pv_entry(pmap, FALSE);
+ pv = get_pv_entry(pmap, &lock);
CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, m);
pv->pv_va = va;
TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list);
@@ -3785,6 +3802,10 @@ pmap_enter_quick_locked(pmap_t pmap, vm_
mpte = PHYS_TO_VM_PAGE(*ptepa & PG_FRAME);
mpte->wire_count++;
} else {
+ /*
+ * Pass NULL instead of the PV list lock
+ * pointer, because we don't intend to sleep.
+ */
mpte = _pmap_allocpte(pmap, ptepindex, NULL);
if (mpte == NULL)
return (mpte);
Modified: projects/calloutng/sys/amd64/conf/GENERIC
==============================================================================
--- projects/calloutng/sys/amd64/conf/GENERIC Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/amd64/conf/GENERIC Sun Jul 1 12:48:56 2012 (r237923)
@@ -152,6 +152,7 @@ device iir # Intel Integrated RAID
device ips # IBM (Adaptec) ServeRAID
device mly # Mylex AcceleRAID/eXtremeRAID
device twa # 3ware 9000 series PATA/SATA RAID
+device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller
# RAID controllers
device aac # Adaptec FSA RAID
@@ -162,7 +163,6 @@ device mlx # Mylex DAC960 family
#XXX pointer/int warnings
#device pst # Promise Supertrak SX6000
device twe # 3ware ATA RAID
-device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller
# atkbdc0 controls both the keyboard and the PS/2 mouse
device atkbdc # AT keyboard controller
Modified: projects/calloutng/sys/amd64/include/cpufunc.h
==============================================================================
--- projects/calloutng/sys/amd64/include/cpufunc.h Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/amd64/include/cpufunc.h Sun Jul 1 12:48:56 2012 (r237923)
@@ -273,6 +273,15 @@ outw(u_int port, u_short data)
__asm __volatile("outw %0, %w1" : : "a" (data), "Nd" (port));
}
+static __inline u_long
+popcntq(u_long mask)
+{
+ u_long result;
+
+ __asm __volatile("popcntq %1,%0" : "=r" (result) : "rm" (mask));
+ return (result);
+}
+
static __inline void
mfence(void)
{
Modified: projects/calloutng/sys/arm/at91/std.at91
==============================================================================
--- projects/calloutng/sys/arm/at91/std.at91 Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/arm/at91/std.at91 Sun Jul 1 12:48:56 2012 (r237923)
@@ -1,6 +1,6 @@
# $FreeBSD$
-files "../at91/files.at91"
+files "../at91/files.at91"
cpu CPU_ARM9
makeoptions CONF_CFLAGS=-mcpu=arm9
options PHYSADDR=0x20000000
Modified: projects/calloutng/sys/arm/at91/std.at91sam9
==============================================================================
--- projects/calloutng/sys/arm/at91/std.at91sam9 Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/arm/at91/std.at91sam9 Sun Jul 1 12:48:56 2012 (r237923)
@@ -1,13 +1,9 @@
# $FreeBSD$
-files "../at91/files.at91"
+files "../at91/files.at91"
cpu CPU_ARM9
makeoptions CONF_CFLAGS=-mcpu=arm9
options PHYSADDR=0x20000000
# bring in the sam specific timers and such
device at91sam9
-
-device at91sam9260
-device at91sam9g20
-device at91sam9x25
Copied: projects/calloutng/sys/arm/at91/std.atmel (from r237922, head/sys/arm/at91/std.atmel)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/calloutng/sys/arm/at91/std.atmel Sun Jul 1 12:48:56 2012 (r237923, copy of r237922, head/sys/arm/at91/std.atmel)
@@ -0,0 +1,15 @@
+# $FreeBSD$
+
+files "../at91/files.at91"
+cpu CPU_ARM9
+makeoptions CONF_CFLAGS=-mcpu=arm9
+options PHYSADDR=0x20000000
+
+# Supported SoCs for the at91 platform
+device at91rm9200
+device at91sam9260
+device at91sam9g20
+device at91sam9x25
+
+# bring in the sam specific timers and such
+device at91sam9
Modified: projects/calloutng/sys/arm/at91/std.ethernut5
==============================================================================
--- projects/calloutng/sys/arm/at91/std.ethernut5 Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/arm/at91/std.ethernut5 Sun Jul 1 12:48:56 2012 (r237923)
@@ -8,4 +8,4 @@ options KERNPHYSADDR=0x20000000
options KERNVIRTADDR=0xc0000000
device at91_board_ethernut5
-nodevice at91sam9g20
+device at91sam9260
Modified: projects/calloutng/sys/arm/at91/std.hl201
==============================================================================
--- projects/calloutng/sys/arm/at91/std.hl201 Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/arm/at91/std.hl201 Sun Jul 1 12:48:56 2012 (r237923)
@@ -8,3 +8,4 @@ options KERNPHYSADDR=0x20000000
options KERNVIRTADDR=0xc0000000
device at91_board_hl201
+device at91sam9g20
Modified: projects/calloutng/sys/arm/at91/std.qila9g20
==============================================================================
--- projects/calloutng/sys/arm/at91/std.qila9g20 Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/arm/at91/std.qila9g20 Sun Jul 1 12:48:56 2012 (r237923)
@@ -8,3 +8,4 @@ options KERNPHYSADDR=0x20000000
options KERNVIRTADDR=0xc0000000
device at91_board_qila9g20
+device at91sam9g20
Modified: projects/calloutng/sys/arm/at91/std.sam9g20ek
==============================================================================
--- projects/calloutng/sys/arm/at91/std.sam9g20ek Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/arm/at91/std.sam9g20ek Sun Jul 1 12:48:56 2012 (r237923)
@@ -8,3 +8,4 @@ options KERNPHYSADDR=0x20000000
options KERNVIRTADDR=0xc0000000
device at91_board_sam9g20ek
+device at91sam9g20
Modified: projects/calloutng/sys/arm/at91/std.sam9x25ek
==============================================================================
--- projects/calloutng/sys/arm/at91/std.sam9x25ek Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/arm/at91/std.sam9x25ek Sun Jul 1 12:48:56 2012 (r237923)
@@ -8,5 +8,4 @@ options KERNPHYSADDR=0x20000000
options KERNVIRTADDR=0xc0000000
device at91_board_sam9x25ek
-nodevice at91sam9g20
-nodevice at91sam9260
+device at91sam9x25
Copied: projects/calloutng/sys/arm/conf/ATMEL (from r237922, head/sys/arm/conf/ATMEL)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/calloutng/sys/arm/conf/ATMEL Sun Jul 1 12:48:56 2012 (r237923, copy of r237922, head/sys/arm/conf/ATMEL)
@@ -0,0 +1,166 @@
+# Kernel configuration to test compile all the atmel bits with one
+# configuration. This kernel will not (presently) boot. Do not copy
+# it to create your own custom config file.
+#
+# $FreeBSD$
+
+ident ATMEL
+
+include "../at91/std.atmel"
+
+# Arbitrary values for testing purposes.
+options STARTUP_PAGETABLE_ADDR=0x20800000
+makeoptions KERNPHYSADDR=0x20000000
+makeoptions KERNVIRTADDR=0xc0000000
+options KERNPHYSADDR=0x20000000
+options KERNVIRTADDR=0xc0000000
+
+makeoptions MODULES_OVERRIDE=""
+
+# list all boards here, but not just yet (no multiboard in mainline).
+#device at91_board_bwct
+#device at91_board_ethernut5
+#device at91_board_hl200
+#device at91_board_hl201
+#device at91_board_kb920x
+#device at91_board_qila9g20
+device at91_board_sam9g20ek
+#device at91_board_sam9x25ek
+#device at91_board_tsc4370
+
+#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
+
+options SCHED_4BSD # 4BSD scheduler
+#options PREEMPTION # Enable kernel thread preemption
+options INET # InterNETworking
+options INET6 # IPv6 communications protocols
+options SCTP # Stream Control Transmission Protocol
+options FFS # Berkeley Fast Filesystem
+options SOFTUPDATES # Enable FFS soft updates support
+options UFS_ACL # Support for access control lists
+options UFS_DIRHASH # Improve performance on big directories
+options UFS_GJOURNAL # Enable gjournal-based UFS journaling
+options MD_ROOT # MD is a potential root device
+options NFSCL # New Network Filesystem Client
+options NFSD # New Network Filesystem Server
+options NFSLOCKD # Network Lock Manager
+options NFS_ROOT # NFS usable as /, requires NFSCL
+options MSDOSFS # MSDOS Filesystem
+options CD9660 # ISO 9660 Filesystem
+options PROCFS # Process filesystem (requires PSEUDOFS)
+options PSEUDOFS # Pseudo-filesystem framework
+options GEOM_PART_GPT # GUID Partition Tables.
+options GEOM_LABEL # Provides labelization
+options COMPAT_FREEBSD5 # Compatible with FreeBSD5
+options COMPAT_FREEBSD6 # Compatible with FreeBSD6
+options COMPAT_FREEBSD7 # Compatible with FreeBSD7
+options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI
+options KTRACE # ktrace(1) support
+options STACK # stack(9) support
+options SYSVSHM # SYSV-style shared memory
+options SYSVMSG # SYSV-style message queues
+options SYSVSEM # SYSV-style semaphores
+options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
+options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed.
+#options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4)
+#options AUDIT # Security event auditing
+#options CAPABILITY_MODE # Capsicum capability mode
+#options CAPABILITIES # Capsicum capabilities
+#options MAC # TrustedBSD MAC Framework
+#options INCLUDE_CONFIG_FILE # Include this file in kernel
+
+# required for netbooting
+options BOOTP
+options BOOTP_COMPAT
+options BOOTP_NFSROOT
+options BOOTP_NFSV3
+options BOOTP_WIRED_TO=ate0
+
+# alternatively, boot from a MMC/SD memory card
+#options ROOTDEVNAME=\"ufs:/dev/mmcsd0a\"
+
+# kernel/memory size reduction
+options MUTEX_NOINLINE
+options NO_FFS_SNAPSHOT
+options NO_SWAPPING
+options NO_SYSCTL_DESCR
+options RWLOCK_NOINLINE
+
+# Debugging support. Always need this:
+options KDB # Enable kernel debugger support.
+# For minimum debugger support (stable branch) use:
+options KDB_TRACE # Print a stack trace for a panic.
+# For full debugger support use this instead:
+options DDB # Support DDB.
+options GDB # Support remote GDB.
+#options DEADLKRES # Enable the deadlock resolver
+#options INVARIANTS # Enable calls of extra sanity checking
+#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS
+#options WITNESS # Enable checks to detect deadlocks and cycles
+#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed
+#options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones
+
+# The `bpf' device enables the Berkeley Packet Filter.
+# Be aware of the administrative consequences of enabling this!
+# Note that 'bpf' is required for DHCP.
+device bpf # Berkeley packet filter
+
+# Ethernet
+device mii # Minimal MII support
+device ate # Atmel AT91 Ethernet friver
+
+# I2C
+device at91_twi # Atmel AT91 Two-wire Interface
+device iic # I2C generic I/O device driver
+device iicbus # I2C bus system
+device pcf8563 # NXP PCF8563 clock/calendar
+
+# MMC/SD
+device at91_mci # Atmel AT91 Multimedia Card Interface
+options AT91_MCI_HAS_4WIRE
+device mmc # MMC/SD bus
+device mmcsd # MMC/SD memory card
+
+# DataFlash
+device at91_spi # Atmel AT91 Serial Peripheral Interface
+device spibus # SPI bus
+device at45d # Atmel AT45D
+device geom_map # GEOM partition mapping
+
+# Pseudo devices.
+device loop # Network loopback
+device random # Entropy device
+device ether # Ethernet support
+device vlan # 802.1Q VLAN support
+device tun # Packet tunnel.
+device md # Memory "disks"
+device gif # IPv6 and IPv4 tunneling
+device faith # IPv6-to-IPv4 relaying (translation)
+#device firmware # firmware assist module
+
+# SCSI peripherals
+device scbus # SCSI bus (required for ATA/SCSI)
+device ch # SCSI media changers
+device da # Direct Access (disks)
+device sa # Sequential Access (tape etc)
+device cd # CD
+device pass # Passthrough device (direct ATA/SCSI access)
+device ses # Enclosure Services (SES and SAF-TE)
+device ctl # CAM Target Layer
+
+# Serial (COM) ports
+device uart # Multi-uart driver
+options ALT_BREAK_TO_DEBUGGER
+
+# USB support
+options USB_DEBUG # enable debug msgs
+device ohci # OHCI PCI->USB interface
+device usb # USB Bus (required)
+device umass # Disks/Mass storage - Requires scbus and da
+
+# watchdog
+device at91_wdt # Atmel AT91 Watchdog Timer
+
+device at91_rtc
+device at91_ssc
+#device at91_tc # missing?
Modified: projects/calloutng/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
==============================================================================
--- projects/calloutng/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jul 1 12:48:56 2012 (r237923)
@@ -157,7 +157,7 @@ dtrace_optval_t dtrace_dof_maxsize = (25
size_t dtrace_global_maxsize = (16 * 1024);
size_t dtrace_actions_max = (16 * 1024);
size_t dtrace_retain_max = 1024;
-dtrace_optval_t dtrace_helper_actions_max = 32;
+dtrace_optval_t dtrace_helper_actions_max = 128;
dtrace_optval_t dtrace_helper_providers_max = 32;
dtrace_optval_t dtrace_dstate_defsize = (1 * 1024 * 1024);
size_t dtrace_strsize_default = 256;
Modified: projects/calloutng/sys/dev/ath/ah_osdep.c
==============================================================================
--- projects/calloutng/sys/dev/ath/ah_osdep.c Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/dev/ath/ah_osdep.c Sun Jul 1 12:48:56 2012 (r237923)
@@ -47,6 +47,7 @@
#include <net/ethernet.h> /* XXX for ether_sprintf */
#include <dev/ath/ath_hal/ah.h>
+#include <dev/ath/ath_hal/ah_debug.h>
/*
* WiSoC boards overload the bus tag with information about the
@@ -137,8 +138,6 @@ ath_hal_ether_sprintf(const u_int8_t *ma
#ifdef AH_DEBUG
-/* This must match the definition in ath_hal/ah_debug.h */
-#define HAL_DEBUG_UNMASKABLE 0xf0000000
void
DO_HALDEBUG(struct ath_hal *ah, u_int mask, const char* fmt, ...)
{
Modified: projects/calloutng/sys/dev/ath/ah_osdep.h
==============================================================================
--- projects/calloutng/sys/dev/ath/ah_osdep.h Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/dev/ath/ah_osdep.h Sun Jul 1 12:48:56 2012 (r237923)
@@ -63,6 +63,7 @@ typedef bus_space_handle_t HAL_BUS_HANDL
#define OS_INLINE __inline
#define OS_MEMZERO(_a, _n) bzero((_a), (_n))
#define OS_MEMCPY(_d, _s, _n) memcpy(_d,_s,_n)
+#define OS_MEMCMP(_a, _b, _l) memcmp((_a), (_b), (_l))
#define abs(_a) __builtin_abs(_a)
Modified: projects/calloutng/sys/dev/ath/ath_hal/ah.h
==============================================================================
--- projects/calloutng/sys/dev/ath/ath_hal/ah.h Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/dev/ath/ath_hal/ah.h Sun Jul 1 12:48:56 2012 (r237923)
@@ -73,6 +73,7 @@ typedef enum {
HAL_EINPROGRESS = 15, /* Operation incomplete */
HAL_EEBADREG = 16, /* EEPROM invalid regulatory contents */
HAL_EEBADCC = 17, /* EEPROM invalid country code */
+ HAL_INV_PMODE = 18, /* Couldn't bring out of sleep state */
} HAL_STATUS;
typedef enum {
@@ -180,10 +181,19 @@ typedef enum {
HAL_TX_QUEUE_CAB = 3, /* "crap after beacon" xmit q */
HAL_TX_QUEUE_UAPSD = 4, /* u-apsd power save xmit q */
HAL_TX_QUEUE_PSPOLL = 5, /* power save poll xmit q */
+ HAL_TX_QUEUE_CFEND = 6,
+ HAL_TX_QUEUE_PAPRD = 7,
} HAL_TX_QUEUE;
#define HAL_NUM_TX_QUEUES 10 /* max possible # of queues */
+typedef enum {
+ HAL_RX_QUEUE_HP = 0, /* high priority recv queue */
+ HAL_RX_QUEUE_LP = 0, /* low priority recv queue */
+} HAL_RX_QUEUE;
+
+#define HAL_NUM_RX_QUEUES 2 /* max possible # of queues */
+
/*
* Transmit queue subtype. These map directly to
* WME Access Categories (except for UPSD). Refer
@@ -592,7 +602,7 @@ typedef enum {
typedef struct {
uint8_t kv_type; /* one of HAL_CIPHER */
- uint8_t kv_pad;
+ uint8_t kv_apsd; /* Mask for APSD enabled ACs */
uint16_t kv_len; /* length in bits */
uint8_t kv_val[16]; /* enough for 128-bit keys */
uint8_t kv_mic[8]; /* TKIP MIC key */
@@ -721,6 +731,7 @@ typedef enum {
HAL_ANI_SPUR_IMMUNITY_LEVEL = 5, /* set level */
HAL_ANI_MODE = 6, /* 0 => manual, 1 => auto (XXX do not change) */
HAL_ANI_PHYERR_RESET = 7, /* reset phy error stats */
+ HAL_ANI_MRC_CCK = 8,
} HAL_ANI_CMD;
/*
@@ -738,6 +749,7 @@ typedef enum {
HAL_CAP_INTMIT_SPUR_IMMUNITY_LEVEL = 6
} HAL_CAP_INTMIT_CMD;
+/* DFS defines */
typedef struct {
int32_t pe_firpwr; /* FIR pwr out threshold */
int32_t pe_rrssi; /* Radar rssi thresh */
Modified: projects/calloutng/sys/dev/ath/ath_hal/ah_debug.h
==============================================================================
--- projects/calloutng/sys/dev/ath/ath_hal/ah_debug.h Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/dev/ath/ath_hal/ah_debug.h Sun Jul 1 12:48:56 2012 (r237923)
@@ -48,7 +48,7 @@ enum {
HAL_DEBUG_DFS = 0x00200000, /* DFS debugging */
HAL_DEBUG_HANG = 0x00400000, /* BB/MAC hang debugging */
- HAL_DEBUG_UNMASKABLE = 0xf0000000, /* always printed */
+ HAL_DEBUG_UNMASKABLE = 0x80000000, /* always printed */
HAL_DEBUG_ANY = 0xffffffff
};
#endif /* _ATH_AH_DEBUG_H_ */
Modified: projects/calloutng/sys/dev/ath/ath_hal/ah_internal.h
==============================================================================
--- projects/calloutng/sys/dev/ath/ath_hal/ah_internal.h Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/dev/ath/ath_hal/ah_internal.h Sun Jul 1 12:48:56 2012 (r237923)
@@ -212,10 +212,24 @@ typedef struct {
halBssidMatchSupport : 1,
hal4kbSplitTransSupport : 1,
halHasRxSelfLinkedTail : 1,
- halSupportsFastClock5GHz : 1, /* Hardware supports 5ghz fast clock; check eeprom/channel before using */
+ halSupportsFastClock5GHz : 1,
halHasLongRxDescTsf : 1,
halHasBBReadWar : 1,
- halSerialiseRegWar : 1;
+ halSerialiseRegWar : 1,
+ halMciSupport : 1,
+ halRxTxAbortSupport : 1,
+ halPaprdEnabled : 1,
+ halHasUapsdSupport : 1,
+ halWpsPushButtonSupport : 1,
+ halBtCoexApsmWar : 1,
+ halGenTimerSupport : 1,
+ halLDPCSupport : 1,
+ halHwBeaconProcSupport : 1,
+ halEnhancedDmaSupport : 1;
+ uint32_t halIsrRacSupport : 1,
+ halApmEnable : 1,
+ halIntrMitigation : 1;
+
uint32_t halWirelessModes;
uint16_t halTotalQueues;
uint16_t halKeyCacheSize;
@@ -231,6 +245,13 @@ typedef struct {
uint32_t halIntrMask;
uint8_t halTxStreams;
uint8_t halRxStreams;
+
+ int halNumTxMaps;
+ int halTxDescLen;
+ int halTxStatusLen;
+ int halRxStatusLen;
+ int halRxHpFifoDepth;
+ int halRxLpFifoDepth;
} HAL_CAPABILITIES;
struct regDomain;
@@ -628,6 +649,46 @@ extern HAL_BOOL ath_hal_setcapability(st
/* The diagnostic codes used to be internally defined here -adrian */
#include "ah_diagcodes.h"
+/*
+ * The AR5416 and later HALs have MAC and baseband hang checking.
+ */
+typedef struct {
+ uint32_t hang_reg_offset;
+ uint32_t hang_val;
+ uint32_t hang_mask;
+ uint32_t hang_offset;
+} hal_hw_hang_check_t;
+
+typedef struct {
+ uint32_t dma_dbg_3;
+ uint32_t dma_dbg_4;
+ uint32_t dma_dbg_5;
+ uint32_t dma_dbg_6;
+} mac_dbg_regs_t;
+
+typedef enum {
+ dcu_chain_state = 0x1,
+ dcu_complete_state = 0x2,
+ qcu_state = 0x4,
+ qcu_fsp_ok = 0x8,
+ qcu_fsp_state = 0x10,
+ qcu_stitch_state = 0x20,
+ qcu_fetch_state = 0x40,
+ qcu_complete_state = 0x80
+} hal_mac_hangs_t;
+
+typedef struct {
+ int states;
+ uint8_t dcu_chain_state;
+ uint8_t dcu_complete_state;
+ uint8_t qcu_state;
+ uint8_t qcu_fsp_ok;
+ uint8_t qcu_fsp_state;
+ uint8_t qcu_stitch_state;
+ uint8_t qcu_fetch_state;
+ uint8_t qcu_complete_state;
+} hal_mac_hang_check_t;
+
enum {
HAL_BB_HANG_DFS = 0x0001,
HAL_BB_HANG_RIFS = 0x0002,
Modified: projects/calloutng/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
==============================================================================
--- projects/calloutng/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sun Jul 1 12:48:56 2012 (r237923)
@@ -493,36 +493,6 @@ ar5416GetDiagState(struct ath_hal *ah, i
args, argsize, result, resultsize);
}
-typedef struct {
- uint32_t dma_dbg_3;
- uint32_t dma_dbg_4;
- uint32_t dma_dbg_5;
- uint32_t dma_dbg_6;
-} mac_dbg_regs_t;
-
-typedef enum {
- dcu_chain_state = 0x1,
- dcu_complete_state = 0x2,
- qcu_state = 0x4,
- qcu_fsp_ok = 0x8,
- qcu_fsp_state = 0x10,
- qcu_stitch_state = 0x20,
- qcu_fetch_state = 0x40,
- qcu_complete_state = 0x80
-} hal_mac_hangs_t;
-
-typedef struct {
- int states;
- uint8_t dcu_chain_state;
- uint8_t dcu_complete_state;
- uint8_t qcu_state;
- uint8_t qcu_fsp_ok;
- uint8_t qcu_fsp_state;
- uint8_t qcu_stitch_state;
- uint8_t qcu_fetch_state;
- uint8_t qcu_complete_state;
-} hal_mac_hang_check_t;
-
HAL_BOOL
ar5416SetRifsDelay(struct ath_hal *ah, const struct ieee80211_channel *chan,
HAL_BOOL enable)
Modified: projects/calloutng/sys/dev/cxgb/cxgb_adapter.h
==============================================================================
--- projects/calloutng/sys/dev/cxgb/cxgb_adapter.h Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/dev/cxgb/cxgb_adapter.h Sun Jul 1 12:48:56 2012 (r237923)
@@ -265,15 +265,6 @@ struct sge_txq {
struct sg_ent txq_sgl[TX_MAX_SEGS / 2 + 1];
};
-
-enum {
- SGE_PSTAT_TSO, /* # of TSO requests */
- SGE_PSTAT_RX_CSUM_GOOD, /* # of successful RX csum offloads */
- SGE_PSTAT_TX_CSUM, /* # of TX checksum offloads */
- SGE_PSTAT_VLANEX, /* # of VLAN tag extractions */
- SGE_PSTAT_VLANINS, /* # of VLAN tag insertions */
-};
-
#define SGE_PSTAT_MAX (SGE_PSTAT_VLANINS+1)
#define QS_EXITING 0x1
@@ -288,7 +279,6 @@ struct sge_qset {
struct lro_state lro;
struct sge_txq txq[SGE_TXQ_PER_SET];
uint32_t txq_stopped; /* which Tx queues are stopped */
- uint64_t port_stats[SGE_PSTAT_MAX];
struct port_info *port;
struct adapter *adap;
int idx; /* qset # */
@@ -538,7 +528,7 @@ int t3_sge_reset_adapter(adapter_t *);
int t3_sge_init_port(struct port_info *);
void t3_free_tx_desc(struct sge_qset *qs, int n, int qid);
-void t3_rx_eth(struct adapter *adap, struct sge_rspq *rq, struct mbuf *m, int ethpad);
+void t3_rx_eth(struct adapter *adap, struct mbuf *m, int ethpad);
void t3_add_attach_sysctls(adapter_t *sc);
void t3_add_configured_sysctls(adapter_t *sc);
Modified: projects/calloutng/sys/dev/cxgb/cxgb_main.c
==============================================================================
--- projects/calloutng/sys/dev/cxgb/cxgb_main.c Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/dev/cxgb/cxgb_main.c Sun Jul 1 12:48:56 2012 (r237923)
@@ -986,7 +986,7 @@ cxgb_makedev(struct port_info *pi)
#define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \
IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \
- IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE)
+ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6)
#define CXGB_CAP_ENABLE CXGB_CAP
static int
@@ -1027,7 +1027,8 @@ cxgb_port_attach(device_t dev)
ifp->if_capabilities |= IFCAP_TOE4;
#endif
ifp->if_capenable = CXGB_CAP_ENABLE;
- ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO;
+ ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO |
+ CSUM_UDP_IPV6 | CSUM_TCP_IPV6;
/*
* Disable TSO on 4-port - it isn't supported by the firmware.
@@ -1950,31 +1951,52 @@ fail:
ifp->if_capenable ^= IFCAP_TXCSUM;
ifp->if_hwassist ^= (CSUM_TCP | CSUM_UDP | CSUM_IP);
- if (IFCAP_TSO & ifp->if_capenable &&
+ if (IFCAP_TSO4 & ifp->if_capenable &&
!(IFCAP_TXCSUM & ifp->if_capenable)) {
- ifp->if_capenable &= ~IFCAP_TSO;
- ifp->if_hwassist &= ~CSUM_TSO;
+ ifp->if_capenable &= ~IFCAP_TSO4;
if_printf(ifp,
- "tso disabled due to -txcsum.\n");
+ "tso4 disabled due to -txcsum.\n");
+ }
+ }
+ if (mask & IFCAP_TXCSUM_IPV6) {
+ ifp->if_capenable ^= IFCAP_TXCSUM_IPV6;
+ ifp->if_hwassist ^= (CSUM_UDP_IPV6 | CSUM_TCP_IPV6);
+
+ if (IFCAP_TSO6 & ifp->if_capenable &&
+ !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) {
+ ifp->if_capenable &= ~IFCAP_TSO6;
+ if_printf(ifp,
+ "tso6 disabled due to -txcsum6.\n");
}
}
if (mask & IFCAP_RXCSUM)
ifp->if_capenable ^= IFCAP_RXCSUM;
- if (mask & IFCAP_TSO) {
- ifp->if_capenable ^= IFCAP_TSO;
+ if (mask & IFCAP_RXCSUM_IPV6)
+ ifp->if_capenable ^= IFCAP_RXCSUM_IPV6;
- if (IFCAP_TSO & ifp->if_capenable) {
- if (IFCAP_TXCSUM & ifp->if_capenable)
- ifp->if_hwassist |= CSUM_TSO;
- else {
- ifp->if_capenable &= ~IFCAP_TSO;
- ifp->if_hwassist &= ~CSUM_TSO;
- if_printf(ifp,
- "enable txcsum first.\n");
- error = EAGAIN;
- }
- } else
- ifp->if_hwassist &= ~CSUM_TSO;
+ /*
+ * Note that we leave CSUM_TSO alone (it is always set). The
+ * kernel takes both IFCAP_TSOx and CSUM_TSO into account before
+ * sending a TSO request our way, so it's sufficient to toggle
+ * IFCAP_TSOx only.
+ */
+ if (mask & IFCAP_TSO4) {
+ if (!(IFCAP_TSO4 & ifp->if_capenable) &&
+ !(IFCAP_TXCSUM & ifp->if_capenable)) {
+ if_printf(ifp, "enable txcsum first.\n");
+ error = EAGAIN;
+ goto fail;
+ }
+ ifp->if_capenable ^= IFCAP_TSO4;
+ }
+ if (mask & IFCAP_TSO6) {
+ if (!(IFCAP_TSO6 & ifp->if_capenable) &&
+ !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) {
+ if_printf(ifp, "enable txcsum6 first.\n");
+ error = EAGAIN;
+ goto fail;
+ }
+ ifp->if_capenable ^= IFCAP_TSO6;
}
if (mask & IFCAP_LRO) {
ifp->if_capenable ^= IFCAP_LRO;
Modified: projects/calloutng/sys/dev/cxgb/cxgb_sge.c
==============================================================================
--- projects/calloutng/sys/dev/cxgb/cxgb_sge.c Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/dev/cxgb/cxgb_sge.c Sun Jul 1 12:48:56 2012 (r237923)
@@ -1432,7 +1432,8 @@ t3_encap(struct sge_qset *qs, struct mbu
cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT);
if (__predict_false(!(cflags & CSUM_IP)))
cntrl |= F_TXPKT_IPCSUM_DIS;
- if (__predict_false(!(cflags & (CSUM_TCP | CSUM_UDP))))
+ if (__predict_false(!(cflags & (CSUM_TCP | CSUM_UDP |
+ CSUM_UDP_IPV6 | CSUM_TCP_IPV6))))
cntrl |= F_TXPKT_L4CSUM_DIS;
hflit[0] = htonl(cntrl);
@@ -1547,7 +1548,8 @@ t3_encap(struct sge_qset *qs, struct mbu
cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT);
if (__predict_false(!(m0->m_pkthdr.csum_flags & CSUM_IP)))
cntrl |= F_TXPKT_IPCSUM_DIS;
- if (__predict_false(!(m0->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP))))
+ if (__predict_false(!(m0->m_pkthdr.csum_flags & (CSUM_TCP |
+ CSUM_UDP | CSUM_UDP_IPV6 | CSUM_TCP_IPV6))))
cntrl |= F_TXPKT_L4CSUM_DIS;
cpl->cntrl = htonl(cntrl);
cpl->len = htonl(mlen | 0x80000000);
@@ -2620,20 +2622,12 @@ err:
* will also be taken into account here.
*/
void
-t3_rx_eth(struct adapter *adap, struct sge_rspq *rq, struct mbuf *m, int ethpad)
+t3_rx_eth(struct adapter *adap, struct mbuf *m, int ethpad)
{
struct cpl_rx_pkt *cpl = (struct cpl_rx_pkt *)(mtod(m, uint8_t *) + ethpad);
struct port_info *pi = &adap->port[adap->rxpkt_map[cpl->iff]];
struct ifnet *ifp = pi->ifp;
- if ((ifp->if_capenable & IFCAP_RXCSUM) && !cpl->fragment &&
- cpl->csum_valid && cpl->csum == 0xffff) {
- m->m_pkthdr.csum_flags = (CSUM_IP_CHECKED|CSUM_IP_VALID);
- rspq_to_qset(rq)->port_stats[SGE_PSTAT_RX_CSUM_GOOD]++;
- m->m_pkthdr.csum_flags = (CSUM_IP_CHECKED|CSUM_IP_VALID|CSUM_DATA_VALID|CSUM_PSEUDO_HDR);
- m->m_pkthdr.csum_data = 0xffff;
- }
-
if (cpl->vlan_valid) {
m->m_pkthdr.ether_vtag = ntohs(cpl->vlan);
m->m_flags |= M_VLANTAG;
@@ -2647,6 +2641,30 @@ t3_rx_eth(struct adapter *adap, struct s
m->m_pkthdr.len -= (sizeof(*cpl) + ethpad);
m->m_len -= (sizeof(*cpl) + ethpad);
m->m_data += (sizeof(*cpl) + ethpad);
+
+ if (!cpl->fragment && cpl->csum_valid && cpl->csum == 0xffff) {
+ struct ether_header *eh = mtod(m, void *);
+ uint16_t eh_type;
+
+ if (eh->ether_type == htons(ETHERTYPE_VLAN)) {
+ struct ether_vlan_header *evh = mtod(m, void *);
+
+ eh_type = evh->evl_proto;
+ } else
+ eh_type = eh->ether_type;
+
+ if (ifp->if_capenable & IFCAP_RXCSUM &&
+ eh_type == htons(ETHERTYPE_IP)) {
+ m->m_pkthdr.csum_flags = (CSUM_IP_CHECKED |
+ CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR);
+ m->m_pkthdr.csum_data = 0xffff;
+ } else if (ifp->if_capenable & IFCAP_RXCSUM_IPV6 &&
+ eh_type == htons(ETHERTYPE_IPV6)) {
+ m->m_pkthdr.csum_flags = (CSUM_DATA_VALID_IPV6 |
+ CSUM_PSEUDO_HDR);
+ m->m_pkthdr.csum_data = 0xffff;
+ }
+ }
}
/**
@@ -2913,7 +2931,7 @@ process_responses(adapter_t *adap, struc
} else if (eth && eop) {
struct mbuf *m = mh->mh_head;
- t3_rx_eth(adap, rspq, m, ethpad);
+ t3_rx_eth(adap, m, ethpad);
/*
* The T304 sends incoming packets on any qset. If LRO
Modified: projects/calloutng/sys/dev/cxgbe/adapter.h
==============================================================================
--- projects/calloutng/sys/dev/cxgbe/adapter.h Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/dev/cxgbe/adapter.h Sun Jul 1 12:48:56 2012 (r237923)
@@ -392,7 +392,7 @@ struct sge_txq {
/* stats for common events first */
uint64_t txcsum; /* # of times hardware assisted with checksum */
- uint64_t tso_wrs; /* # of IPv4 TSO work requests */
+ uint64_t tso_wrs; /* # of TSO work requests */
uint64_t vlan_insertion;/* # of times VLAN tag was inserted */
uint64_t imm_wrs; /* # of work requests with immediate data */
uint64_t sgl_wrs; /* # of work requests with direct SGL */
@@ -412,7 +412,7 @@ struct sge_rxq {
struct sge_fl fl; /* MUST follow iq */
struct ifnet *ifp; /* the interface this rxq belongs to */
-#ifdef INET
+#if defined(INET) || defined(INET6)
struct lro_ctrl lro; /* LRO state */
#endif
Modified: projects/calloutng/sys/dev/cxgbe/t4_l2t.c
==============================================================================
--- projects/calloutng/sys/dev/cxgbe/t4_l2t.c Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/dev/cxgbe/t4_l2t.c Sun Jul 1 12:48:56 2012 (r237923)
@@ -27,6 +27,7 @@
__FBSDID("$FreeBSD$");
#include "opt_inet.h"
+#include "opt_inet6.h"
#include <sys/param.h>
#include <sys/systm.h>
Modified: projects/calloutng/sys/dev/cxgbe/t4_main.c
==============================================================================
--- projects/calloutng/sys/dev/cxgbe/t4_main.c Sun Jul 1 12:44:29 2012 (r237922)
+++ projects/calloutng/sys/dev/cxgbe/t4_main.c Sun Jul 1 12:48:56 2012 (r237923)
@@ -29,6 +29,7 @@
__FBSDID("$FreeBSD$");
#include "opt_inet.h"
+#include "opt_inet6.h"
#include <sys/param.h>
#include <sys/conf.h>
@@ -822,8 +823,8 @@ cxgbe_probe(device_t dev)
#define T4_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \
IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \
- IFCAP_VLAN_HWTSO | IFCAP_HWCSUM_IPV6)
-#define T4_CAP_ENABLE (T4_CAP & ~IFCAP_TSO6)
+ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6)
+#define T4_CAP_ENABLE (T4_CAP)
static int
cxgbe_attach(device_t dev)
@@ -1027,11 +1028,11 @@ fail:
ifp->if_capenable ^= IFCAP_TXCSUM;
ifp->if_hwassist ^= (CSUM_TCP | CSUM_UDP | CSUM_IP);
- if (IFCAP_TSO & ifp->if_capenable &&
+ if (IFCAP_TSO4 & ifp->if_capenable &&
!(IFCAP_TXCSUM & ifp->if_capenable)) {
ifp->if_capenable &= ~IFCAP_TSO4;
if_printf(ifp,
- "tso disabled due to -txcsum.\n");
+ "tso4 disabled due to -txcsum.\n");
}
}
if (mask & IFCAP_TXCSUM_IPV6) {
@@ -1075,7 +1076,7 @@ fail:
ifp->if_capenable ^= IFCAP_TSO6;
}
if (mask & IFCAP_LRO) {
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list