FreeBSD src
Go to file
Navdeep Parhar 43bbae1948 cxgbe(4): Separate the sw- and hw-specific parts of resource allocations
The driver uses both software resources (locks, callouts, memory for
descriptors and for bookkeeping, sysctls, etc.) and hardware resources
(VIs, DMA queues, TCAM entries, etc.) to operate the NIC.  This commit
splits the single *_ALLOCATED flag used to track all these resources
into separate *_SW_ALLOCATED and *_HW_ALLOCATED flags.

This is the simplified pseudocode that now applies to most queues (foo
can be ctrlq/txq/rxq/ofld_txq/ofld_rxq):

/* Idempotent */
alloc_foo
{
	if (!SW_ALLOCATED)
		init_iq/init_eq/init_fl		no-fail sw init
		alloc_iq_fl/alloc_eq/alloc_wrq	may-fail sw alloc
		add_foo_sysctls, etc.		no-fail post-alloc items
	if (!HW_ALLOCATED)
		alloc_iq_fl_hwq/alloc_eq_hwq	hw resource allocation
}

/* Idempotent */
free_foo
{
	if (!HW_ALLOCATED)
		free_iq_fl_hwq/free_eq_hwq	release hw resources
	if (!SW_ALLOCATED)
		free_iq_fl/free_eq/free_wrq	release sw resources
}

The routines that take the driver to FULL_INIT_DONE and VI_INIT_DONE and
back are now all idempotent.  The quiesce routines pay attention to the
HW_ALLOCATED flag and will not wait on the hardware for pidx/cidx
updates and other completions if this flag is not set.

MFC after:	1 month
Sponsored by:	Chelsio Communications
2021-04-26 14:09:59 -07:00
.github/workflows Enable GitHub actions CI for stable/13 as well 2021-04-20 09:51:33 +01:00
bin sh: fix debug build 2021-04-11 09:23:14 +02:00
cddl dtrace tests: Fix tst.system.d after ping/ping6 unification 2021-04-23 10:28:09 -04:00
contrib Merge commit 'bd136720030ebb0b31e6d5a2236b9d0ddac71b94' 2021-04-25 08:42:31 +02:00
crypto Revert "Add workaround for a QoS-related bug in VMWare Workstation." 2021-04-25 17:17:22 -04:00
etc base: remove if_wg(4) and associated utilities, manpage 2021-03-17 09:14:48 -05:00
gnu dialog: fix macro redefinition 2021-03-01 16:01:44 +01:00
include Vendor import of Gavin D. Howards bc version 4.0.1 2021-04-25 08:36:50 +02:00
kerberos5 kerberos5: fix the WITH_OPENLDAP build 2021-01-30 00:07:50 -06:00
lib pf: Fix parsing of long table names 2021-04-26 18:08:15 +02:00
libexec rc: remove the 'addswap' script. 2021-04-26 10:22:47 +01:00
release pkgbase: Remove package name mangling in generate-ucl.sh 2021-04-26 15:16:04 -04:00
rescue ping: add a ping6 hard link for backwards compatibility 2020-11-26 18:33:04 +00:00
sbin pfsync: Expose PFSYNCF_OK flag to userspace 2021-04-26 14:31:17 +02:00
secure Revert "Add workaround for a QoS-related bug in VMWare Workstation." 2021-04-25 17:17:22 -04:00
share tcp: fix man page 2021-04-24 22:40:34 +02:00
stand loader: do not output empty menu title 2021-04-21 14:50:23 +03:00
sys cxgbe(4): Separate the sw- and hw-specific parts of resource allocations 2021-04-26 14:09:59 -07:00
targets Remove kgmon(8) 2021-04-04 00:50:28 +03:00
tests pf tests: Test automatically generated tables 2021-04-26 18:08:15 +02:00
tools tools/build/bootstrap-m4: regenerate after d37f81e35b 2021-04-21 10:57:51 +01:00
usr.bin systat: Handle SIGWINCH to properly window resizing and adjust 2021-04-21 20:31:58 +02:00
usr.sbin etcupdate: Add -D destdir to usage for 'extract'. 2021-04-26 09:49:34 -07:00
.arcconfig Remove history.immutable from .arcconfig 2021-04-13 12:36:25 +01:00
.arclint arc lint: ignore /tests/ in chmod 2017-12-19 03:38:06 +00:00
.cirrus.yml Cirrus-CI: use FreeBSD 13.0 image for base system CI build 2021-04-19 15:23:14 -04:00
.clang-format clang-format: Avoid breaking after the opening paren of function definitions 2020-10-28 11:54:00 +00:00
.gitattributes Vendor import of Gavin D. Howards bc version 4.0.1 2021-04-25 08:36:50 +02:00
.gitignore Vendor import of Gavin D. Howards bc version 4.0.1 2021-04-25 08:36:50 +02: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 Fix 'make bmake' top-level bootstrapping. 2021-03-06 09:45:08 -08:00
Makefile.inc1 Makefile.inc1: unbreak bootstrap when kbdcontrol does not exist 2021-03-23 20:47:14 -04:00
Makefile.libcompat libcompat: remove redundant path for ncurses 2021-01-07 15:14:52 +01:00
Makefile.sys.inc AUTO_OBJ: For all top-level targets enforce using an OBJDIR. 2017-12-05 21:29:47 +00:00
ObsoleteFiles.inc rc: remove the 'addswap' script. 2021-04-26 10:22:47 +01:00
README.md Vendor import of Gavin D. Howards bc version 4.0.1 2021-04-25 08:36:50 +02:00
RELNOTES Spellcheck. 2021-04-12 15:12:19 -07:00
UPDATING Remove extra space at start of file. 2021-04-16 15:14:29 -06:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

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), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

Source Roadmap:

Directory Description
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 and gnu/COPYING.LIB 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 FreeBSD Handbook.