OPNsense - FreeBSD source
Find a file
John Baldwin cc44e4e55b cxgbei: Support iSCSI offload on T6.
T6 makes several changes relative to T5 for receive of iSCSI PDUs.

First, earlier adapters issue either 2 or 3 messages to the host for
each PDU received: CPL_ISCSI_HDR contains the BHS of the PDU,
CPL_ISCSI_DATA (when DDP is not used for zero-copy receive) contains
the PDU data as buffers on the freelist, and CPL_RX_ISCSI_DDP with
status of the PDU such as result of CRC checks.  In T6, a new
CPL_RX_ISCSI_CMP combines CPL_ISCSI_HDR and CPL_RX_ISCSI_DDP.  Data
PDUs which are directly placed via DDP only report a single
CPL_RX_ISCSI_CMP message.  Data PDUs received on the free lists are
reported as CPL_ISCSI_DATA followed by CPL_RX_ISCSI_CMP.  Control PDUs
such as R2T are still reported via CPL_ISCSI_HDR and CPL_RX_ISCSI_DDP.

Supporting this requires changing the CPL_ISCSI_DATA handler to
allocate a PDU structure if it is not preceded by a CPL_ISCSI_HDR as
well as support for the new CPL_RX_ISCSI_CMP.

Second, when using DDP for zero-copy receive, T6 will only issue a
CPL_RX_ISCSI_CMP after a burst of PDUs have been received (indicated
by the F flag in the BHS).  In this case, the CPL_RX_ISCSI_CMP can
reflect the completion of multiple PDUs and the BHS and TCP sequence
number included in the message are from the last PDU received in the
burst.  Notably, the message does not include any information about
earlier PDUs received as part of the burst.  Instead, the driver must
track the amount of data already received for a given transfer and use
this to compute the amount of data received in a burst.  In addition,
the iSCSI layer currently has no way to permit receiving a logical PDU
which spans multiple PDUs.  Instead, the driver presents each burst as
a single, "large" PDU to the iSCSI target and initiators.  This is
done by rewriting the buffer offset and data length fields in the BHS
of the final PDU as well as rewriting the DataSN so that the received
PDUs appear to be in order.

To track all this, cxgbei maintains a hash table of 'cxgbei_cmp'
structures indexed by transfer tags for each offloaded iSCSI
connection.  When a SCSI_DATA_IN message is received, the ITT from the
received BHS is used to find the necessary state in the hash table,
whereas SCSI_DATA_OUT replies use the TTT as the key.  The structure
tracks the expected starting offset and DataSN of the next burst as
well as the rewritten DataSN value used for the previously received
PDU.

Discussed with:	np
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D30458

(cherry picked from commit 67360f7bb0)
2021-10-29 16:07:26 -07:00
.cirrus-ci Cirrus-CI: retry pkg installation on failure 2021-06-10 08:54:52 -04:00
.github/workflows .github: Attempt to un-break Clang 9 action 2021-05-29 04:38:07 +01:00
bin freebsd-version(1): Add -j flag to support jails 2021-10-08 11:29:07 -05:00
cddl libctf: Improve check for duplicate SOU definitions in ctf_add_type() 2021-10-18 09:09:02 -04:00
contrib Fix clang's internal assembler adding unwanted prefix to VIA xstore 2021-10-26 12:03:22 +02:00
crypto OpenSSH: cherry-pick "need initgroups() before setresgid()" 2021-10-12 11:37:55 -04:00
etc Register /usr/tests/usr.bin/diff3 2021-09-25 10:34:39 +02:00
gnu Bump shared library versions after ncurses bump in 13. 2021-02-04 17:51:45 -08:00
include time.h: reduce CLOCK_ namespace pollution, move to _clock_id.h 2021-09-12 09:56:16 -06:00
kerberos5 kerberos5: Silence compiler warnings 2021-03-17 09:53:08 +00:00
lib procctl: actually require debug privileges over target 2021-10-26 05:26:27 +03:00
libexec rtld: Print currently configured search path for libraries for -v 2021-10-28 03:35:53 +03:00
release EC2: Default to UEFI booting 2021-09-25 09:20:58 -07:00
rescue Fix building rescue/rescue when sanitizers are enabled 2021-08-05 09:59:51 +01:00
sbin Update old iSCSI initiator man pages for removal from 14 and later 2021-10-26 16:23:41 -04:00
secure caroot: cumulative cert update 2021-09-04 02:39:07 -05:00
share pthread_np.3: Add a manpage summarizing all of the pthread extensions. 2021-10-26 13:59:28 -07:00
stand crypto: Permit variable-sized IVs for ciphers with a reinit hook. 2021-10-21 13:47:58 -07:00
sys cxgbei: Support iSCSI offload on T6. 2021-10-29 16:07:26 -07:00
targets Fix bootstrapping to actually build lldb-tblgen for later use 2021-09-07 13:08:18 +01:00
tests pf tests: ensure that $nr expansion is correct 2021-10-22 09:34:33 +02:00
tools crypto: Support Chacha20-Poly1305 with a nonce size of 8 bytes. 2021-10-21 14:19:30 -07:00
usr.bin ldd: do not use dlopen(RTLD_TRACE) for dso when format is specified 2021-10-28 03:35:54 +03:00
usr.sbin wpa: Reconnect ndis_events build 2021-10-25 06:29:45 -07:00
.arcconfig arcconfig: add callsign again 2020-11-23 04:39:29 +00:00
.arclint
.cirrus.yml Cirrus-CI: reduce VM memory to 8G 2021-09-02 15:14:45 -04:00
.clang-format clang-format: Avoid breaking after the opening paren of function definitions 2020-10-28 11:54:00 +00:00
.gitattributes Add a basic clang-format configuration file 2019-06-07 15:23:52 +00:00
.gitignore Revert "bc: Vendor import of Gavin Howard's bc version 3.2.6" 2021-02-05 20:53:34 +01:00
COPYRIGHT copyrights: Happy New Year 2021 2020-12-31 10:29:44 -05:00
LOCKS LOCKS: update current locks 2018-06-09 03:08:04 +00:00
MAINTAINERS Add a pointer to csprng@ for the CSPRNG driver. This is enforced anyway by 2020-09-01 08:02:12 +00:00
Makefile Remove 'make update'. 2021-10-19 16:53:24 -07:00
Makefile.inc1 Remove 'make update'. 2021-10-19 16:53:24 -07:00
Makefile.libcompat Prefer MK_SSP=no to SSP_CFLAGS= 2021-08-11 13:56:28 -03:00
Makefile.sys.inc
ObsoleteFiles.inc ObsoleteFiles.inc: stop removing pthread_mutexattr_get/setpshared.3 2021-10-12 10:00:10 +03:00
README Mark the repository has been converted to Git 2020-12-23 12:27:27 +08:00
README.md Revert "bc: Vendor import of Gavin Howard's bc version 3.2.6" 2021-02-05 20:53:34 +01:00
RELNOTES RELNOTES: Add entry for just-MFC'ed HiFive Unmatched support 2021-09-07 13:15:18 +01:00
UPDATING UPDATING: Add entry for commit a599f9f762 2021-10-03 15:54:33 -07:00

FreeBSD Source:

This is the top level of the FreeBSD source directory. This file was last revised on: FreeBSD

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html, and https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html for more information, including setting make(1) variables.

Source Roadmap:

bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

stand		Boot loader sources.

sys		Kernel sources.

sys/<arch>/conf Kernel configuration files. GENERIC is the configuration
		used in release builds. NOTES contains documentation of
		all possible entries.

tests		Regression tests which can be run by Kyua.  See tests/README
		for additional information.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html