head	1.5;
access;
symbols
	RELENG_9_1_0_RELEASE:1.1.2.2.2.2
	RELENG_9_1:1.1.2.2.0.2
	RELENG_9_1_BP:1.1.2.2
	RELENG_9:1.1.0.2;
locks; strict;
comment	@# @;


1.5
date	2013.01.15.00.51.03;	author svnexp;	state Exp;
branches;
next	1.4;

1.4
date	2012.11.17.01.52.54;	author svnexp;	state Exp;
branches;
next	1.3;

1.3
date	2012.08.17.00.49.29;	author np;	state Exp;
branches;
next	1.2;

1.2
date	2012.08.14.23.08.49;	author np;	state Exp;
branches;
next	1.1;

1.1
date	2012.06.19.07.34.13;	author np;	state Exp;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2012.07.01.12.00.36;	author np;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2012.07.01.12.00.36;	author np;	state Exp;
branches
	1.1.2.2.2.1;
next	1.1.2.3;

1.1.2.3
date	2012.09.06.17.28.47;	author np;	state Exp;
branches;
next	1.1.2.4;

1.1.2.4
date	2012.11.17.11.37.16;	author svnexp;	state Exp;
branches;
next	1.1.2.5;

1.1.2.5
date	2013.02.28.01.11.09;	author svnexp;	state Exp;
branches;
next	;

1.1.2.2.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.1.2.2.2.2;

1.1.2.2.2.2
date	2012.11.17.08.48.04;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.5
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/245434
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@#
# $FreeBSD: head/sys/modules/cxgbe/tom/Makefile 245434 2013-01-14 20:36:22Z np $
#

.include <bsd.own.mk>

CXGBE = ${.CURDIR}/../../../dev/cxgbe
.PATH: ${CXGBE}/tom

KMOD = t4_tom
SRCS = t4_tom.c t4_connect.c t4_listen.c t4_cpl_io.c t4_tom_l2t.c t4_ddp.c
SRCS+= device_if.h bus_if.h pci_if.h
SRCS+= opt_inet.h opt_inet6.h

CFLAGS+= -I${CXGBE}

.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
	@@echo "#define INET 1" > ${.TARGET}
	@@echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
.endif

.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
	@@echo "#define INET6 1" > ${.TARGET}
.endif
.endif

.include <bsd.kmod.mk>
@


1.4
log
@Switching exporter and resync
@
text
@d2 1
a2 1
# $FreeBSD: head/sys/modules/cxgbe/tom/Makefile 239344 2012-08-17 00:49:29Z np $
d13 1
a13 1
SRCS+= opt_inet.h
d20 7
a26 2
	echo "#define INET 1" > ${.TARGET}
	echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
@


1.3
log
@SVN rev 239344 on 2012-08-17 00:49:29Z by np

Support for TCP DDP (Direct Data Placement) in the T4 TOE module.

Basically, this is automatic rx zero copy when feasible.  TCP payload is
DMA'd directly into the userspace buffer described by the uio submitted
in soreceive by an application.

- Works with sockets that are being handled by the TCP offload engine
  of a T4 chip (you need t4_tom.ko module loaded after cxgbe, and an
  "ifconfig +toe" on the cxgbe interface).
- Does not require any modification to the application.
- Not enabled by default.  Use hw.t4nex.<X>.toe.ddp="1" to enable it.
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.2
log
@SVN rev 239264 on 2012-08-14 23:08:49Z by np

Assume INET, INET6, and TCP_OFFLOAD when the driver is built out of tree and
KERNBUILDDIR is not set.

MFC after:	2 weeks
@
text
@d11 1
a11 1
SRCS = t4_tom.c t4_connect.c t4_listen.c t4_cpl_io.c t4_tom_l2t.c
@


1.1
log
@SVN rev 237263 on 2012-06-19 07:34:13Z by np

- Updated TOE support in the kernel.

- Stateful TCP offload drivers for Terminator 3 and 4 (T3 and T4) ASICs.
  These are available as t3_tom and t4_tom modules that augment cxgb(4)
  and cxgbe(4) respectively.  The cxgb/cxgbe drivers continue to work as
  usual with or without these extra features.

- iWARP driver for Terminator 3 ASIC (kernel verbs).  T4 iWARP in the
  works and will follow soon.

Build-tested with make universe.

30s overview
============
What interfaces support TCP offload?  Look for TOE4 and/or TOE6 in the
capabilities of an interface:
# ifconfig -m | grep TOE

Enable/disable TCP offload on an interface (just like any other ifnet
capability):
# ifconfig cxgbe0 toe
# ifconfig cxgbe0 -toe

Which connections are offloaded?  Look for toe4 and/or toe6 in the
output of netstat and sockstat:
# netstat -np tcp | grep toe
# sockstat -46c | grep toe

Reviewed by:	bz, gnn
Sponsored by:	Chelsio communications.
MFC after:	~3 months (after 9.1, and after ensuring MFC is feasible)
@
text
@d5 2
d17 8
@


1.1.2.1
log
@file Makefile was added on branch RELENG_9 on 2012-07-01 12:01:11 +0000
@
text
@d1 15
@


1.1.2.2
log
@SVN rev 237920 on 2012-07-01 12:00:36Z by np

Backport just the sys/{dev,modules}/cxgb{,e}/ parts of r237263, and then
disable the TOE and iWARP modules in the Makefiles (they won't compile
without the rest of r237263).

This reduces diffs between the cxgb/cxgbe drivers in head and 9 and
makes it easy to MFC other fixes to 9.
@
text
@a0 15
#
# $FreeBSD$
#

CXGBE = ${.CURDIR}/../../../dev/cxgbe
.PATH: ${CXGBE}/tom

KMOD = t4_tom
SRCS = t4_tom.c t4_connect.c t4_listen.c t4_cpl_io.c t4_tom_l2t.c
SRCS+= device_if.h bus_if.h pci_if.h
SRCS+= opt_inet.h

CFLAGS+= -I${CXGBE}

.include <bsd.kmod.mk>
@


1.1.2.2.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.1.2.2.2.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/9.1/sys/modules/cxgbe/tom/Makefile 237263 2012-06-19 07:34:13Z np $
@


1.1.2.3
log
@SVN rev 240169 on 2012-09-06 17:28:47Z by np

MFC many cxgb and cxgbe features and fixes (r239258, r239259, r239264,
r239266, r239336, r239338, r239339, r239341, r239344, r239514, r239527,
r239528, r239544.

r239258:
Convert some fixed parameters to tunables (with reasonable default
values).

- cong_drop specifies what to do on congestion: nothing, backpressure,
  or drop.
- fl_pktshift specifies the padding before Ethernet payload.
- fl_pad specifies the boundary upto which to pad Ethernet payload.
- spg_len controls the length of the status page.

r239259:
if_iqdrops should include frames truncated within the chip.

r239264:
Assume INET, INET6, and TCP_OFFLOAD when the driver is built out of tree and
KERNBUILDDIR is not set.

r239266:
The size of the buffers in an Ethernet freelist has to be higher than the
interface's MTU.  Initialize such freelists with correct values.

This wasn't a problem for common MTUs (1500 and 9000) as the buffers (2048
and 9216 in size) happened to have enough spare room.  I ran into it when
playing around with unusual MTUs.

r239336:
Allow for a different handler for each type of firmware message.

r239338:
Add a routine (t4_set_tcb_field) to update arbitrary parts of a hardware
TCB.  Filters are programmed by modifying the TCB too (via a different
routine) and the reply to any TCB update is delivered via a
CPL_SET_TCB_RPL.  Figure out whether the reply is for a filter-write or
something else and route it appropriately.

r239339:
Make room for DDP page pods in the default configuration profile.  While
here, bump up the L2 table's size to 4K entries.

r239341:
Initialize various DDP parameters in the main cxgbe(4) driver:

- Setup multiple DDP page sizes.  When the driver attempts DDP it will
  try to combine physically contiguous pages into regions of these sizes.

- Set the indicate size such that the payload carried in the indicate can
  be copied in the header mbuf (and the 16K rx buffer can be recycled).

- Set DDP threshold to the max payload that the chip will coalesce and
  deliver to the driver (this is ~16K by default, which is also why the
  offload rx queue is backed by 16K buffers).  If the chip is able to
  coalesce up to the max it's allowed to, it's a good sign that the peer
  is transmitting in bulk without any TCP PSH.

r239344:
Support for TCP DDP (Direct Data Placement) in the T4 TOE module.

Basically, this is automatic rx zero copy when feasible.  TCP payload is
DMA'd directly into the userspace buffer described by the uio submitted
in soreceive by an application.

- Works with sockets that are being handled by the TCP offload engine
  of a T4 chip (you need t4_tom.ko module loaded after cxgbe, and an
  "ifconfig +toe" on the cxgbe interface).
- Does not require any modification to the application.
- Not enabled by default.  Use hw.t4nex.<X>.toe.ddp="1" to enable it.

r239514:
Minor cleanup: use bitwise ops instead of pointless wrappers around
setbit/clrbit.

r239527:
Cannot hold a mutex around vm_fault_quick_hold_pages, so don't.  Tweak
some comments while here.

r239528:
Avoid a NULL pointer dereference.

r239544:
Deal with the case where a syncache entry added by the TOE driver is
evicted from the syncache but a later syncache_expand succeeds because
of syncookies.  The TOE driver has to resort to more direct means to
install its hooks in the socket in this case.
@
text
@a4 2
.include <bsd.own.mk>

d9 1
a9 1
SRCS = t4_tom.c t4_connect.c t4_listen.c t4_cpl_io.c t4_tom_l2t.c t4_ddp.c
a14 8
.if !defined(KERNBUILDDIR)
.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
	echo "#define INET 1" > ${.TARGET}
	echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
.endif
.endif

@


1.1.2.4
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d2 1
a2 1
# $FreeBSD: stable/9/sys/modules/cxgbe/tom/Makefile 240169 2012-09-06 17:28:47Z np $
@


1.1.2.5
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/247434
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d2 1
a2 1
# $FreeBSD: stable/9/sys/modules/cxgbe/tom/Makefile 247434 2013-02-28 00:44:54Z np $
d13 1
a13 1
SRCS+= opt_inet.h opt_inet6.h
d20 2
a21 7
	@@echo "#define INET 1" > ${.TARGET}
	@@echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
.endif

.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
	@@echo "#define INET6 1" > ${.TARGET}
@


