<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test/sys/net/vnet.c, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/'/>
<updated>2020-02-17T11:08:50Z</updated>
<entry>
<title>Partially revert VNET change and expand VNET structure.</title>
<updated>2020-02-17T11:08:50Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2020-02-17T11:08:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=10108cb6737ba39ad0289e84255f039a8258a6cc'/>
<id>urn:sha1:10108cb6737ba39ad0289e84255f039a8258a6cc</id>
<content type='text'>
Revert parts of r353274 replacing vnet_state with a shutdown flag.

Not having the state flag for the current SI_SUB_* makes it harder to debug
kernel or module panics related to VNET bringup or teardown.
Not having the state also does not allow us to check for other dependency
levels between components, e.g. for moving interfaces.

Expand the VNET structure with the new boolean flag indicating that we are
doing a shutdown of a given vnet and update the vnet magic cookie for the
change.

Update libkvm to compile with a bool in the kernel struct.

Bump __FreeBSD_version for (external) module builds to more easily detect
the change.

Reviewed by:	hselasky
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23097
</content>
</entry>
<entry>
<title>Fix regression issue after r353274:</title>
<updated>2019-10-08T11:06:24Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2019-10-08T11:06:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=a362cf527eeb1226c5e0182c01d51b681e755968'/>
<id>urn:sha1:a362cf527eeb1226c5e0182c01d51b681e755968</id>
<content type='text'>
Make sure the vnet_shutdown field is not set until after all
VNET_SYSUNINIT()'s in the SI_SUB_VNET_DONE subsystem have been
executed. Especially the vnet_if_return() functions requires that
if_move() is still operational.

Reported by:	lwhsu@
MFC after:	1 week
Sponsored by:	Mellanox Technologies
</content>
</entry>
<entry>
<title>Factor out VNET shutdown check into an own vnet structure field.</title>
<updated>2019-10-07T14:15:41Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2019-10-07T14:15:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=204e2f30d96e15c3191cb775e7ec533066b90cda'/>
<id>urn:sha1:204e2f30d96e15c3191cb775e7ec533066b90cda</id>
<content type='text'>
Remove the now obsolete vnet_state field. This greatly simplifies the
detection of VNET shutdown and avoids code duplication.

Discussed with:	bz@
MFC after:	1 week
Sponsored by:	Mellanox Technologies
</content>
</entry>
<entry>
<title>With more excessive use of modules, more kernel parts working with</title>
<updated>2018-10-30T20:45:15Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2018-10-30T20:45:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=c955c6cd089dc93b9e96172514e4687a1c4e2598'/>
<id>urn:sha1:c955c6cd089dc93b9e96172514e4687a1c4e2598</id>
<content type='text'>
VIMAGE, and feature richness and global state increasing the 8k of
vnet module space are no longer sufficient for people and loading
multiple modules, e.g., pf(4) and ipl(4) or ipsec(4) will fail on
the second module.

Increase the module space to 8 * PAGE_SIZE which should be enough
to hold multiple firewalls, ipsec, multicast (as in the old days was
a problem), epair, carp, and any kind of other vnet enabled modules.

Sadly this is a global byte array part of the vnet_set, so we cannot
dynamically change its size;  otherwise a TUNABLE would have been
a better solution.

PR:			228854
Reported by:		Ernie Luzar, Marek Zarychta
Discussed with:		rgrimes on current
MFC after:		3 days
</content>
</entry>
<entry>
<title>Ensure the DPCPU and VNET module spaces are aligned to hold a pointer.</title>
<updated>2018-07-30T14:25:17Z</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2018-07-30T14:25:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=cd2106eaeae07920decf8d9535bac49bbd816f7b'/>
<id>urn:sha1:cd2106eaeae07920decf8d9535bac49bbd816f7b</id>
<content type='text'>
Previously they may have been aligned to a char, leading to misaligned
DPCPU and VNET variables.

Sponsored by:	DARPA, AFRL
</content>
</entry>
<entry>
<title>Use the new VNET_DEFINE_STATIC macro when we are defining static VNET</title>
<updated>2018-07-24T16:35:52Z</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2018-07-24T16:35:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=5f901c92a8d99227901f548f0b755b31d9dd8525'/>
<id>urn:sha1:5f901c92a8d99227901f548f0b755b31d9dd8525</id>
<content type='text'>
variables.

Reviewed by:	bz
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D16147
</content>
</entry>
<entry>
<title>Use NULL for SYSINIT's last arg, which is a pointer type</title>
<updated>2018-05-18T17:58:09Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2018-05-18T17:58:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=891cf3ed448259522b32dec2bf068454d970ecf8'/>
<id>urn:sha1:891cf3ed448259522b32dec2bf068454d970ecf8</id>
<content type='text'>
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>sys: general adoption of SPDX licensing ID tags.</title>
<updated>2017-11-27T15:23:17Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-27T15:23:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=fe267a559009cbf34f9341666fe4d88a92c02d5e'/>
<id>urn:sha1:fe267a559009cbf34f9341666fe4d88a92c02d5e</id>
<content type='text'>
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
</content>
</entry>
<entry>
<title>With r181803 on 2008-08-17 23:27:27Z the first VIMAGE commit went into</title>
<updated>2017-10-20T21:40:59Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2017-10-20T21:40:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=8e94025b413ebc581da6b27887f6d408bc8a757e'/>
<id>urn:sha1:8e94025b413ebc581da6b27887f6d408bc8a757e</id>
<content type='text'>
HEAD.  Enable VIMAGE in GENERIC kernels and some others (where GENERIC does
not exist) on HEAD.

Disable building LINT-VIMAGE with VIMAGE being default.

This should give it a lot more exposure in the run-up to 12 to help
us evaluate whether to keep it on by default or not.
We are also hoping to get better performance testing.
The feature can be disabled using nooptions.

Requested by:		many
Reviewed by:		kristof, emaste, hiren
X-MFC after:		never
Relnotes:		yes
Differential Revision:	https://reviews.freebsd.org/D12639
</content>
</entry>
<entry>
<title>Get closer to a VIMAGE network stack teardown from top to bottom rather</title>
<updated>2016-06-21T13:48:49Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2016-06-21T13:48:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=89856f7e2d63bcaaacf105f679ade0bf5d40e821'/>
<id>urn:sha1:89856f7e2d63bcaaacf105f679ade0bf5d40e821</id>
<content type='text'>
than removing the network interfaces first. This change is rather larger
and convoluted as the ordering requirements cannot be separated.

Move the pfil(9) framework to SI_SUB_PROTO_PFIL, move Firewalls and
related modules to their own SI_SUB_PROTO_FIREWALL.
Move initialization of "physical" interfaces to SI_SUB_DRIVERS,
move virtual (cloned) interfaces to SI_SUB_PSEUDO.
Move Multicast to SI_SUB_PROTO_MC.

Re-work parts of multicast initialisation and teardown, not taking the
huge amount of memory into account if used as a module yet.

For interface teardown we try to do as many of them as we can on
SI_SUB_INIT_IF, but for some this makes no sense, e.g., when tunnelling
over a higher layer protocol such as IP. In that case the interface
has to go along (or before) the higher layer protocol is shutdown.

Kernel hhooks need to go last on teardown as they may be used at various
higher layers and we cannot remove them before we cleaned up the higher
layers.

For interface teardown there are multiple paths:
(a) a cloned interface is destroyed (inside a VIMAGE or in the base system),
(b) any interface is moved from a virtual network stack to a different
network stack ("vmove"), or (c) a virtual network stack is being shut down.
All code paths go through if_detach_internal() where we, depending on the
vmove flag or the vnet state, make a decision on how much to shut down;
in case we are destroying a VNET the individual protocol layers will
cleanup their own parts thus we cannot do so again for each interface as
we end up with, e.g., double-frees, destroying locks twice or acquiring
already destroyed locks.
When calling into protocol cleanups we equally have to tell them
whether they need to detach upper layer protocols ("ulp") or not
(e.g., in6_ifdetach()).

Provide or enahnce helper functions to do proper cleanup at a protocol
rather than at an interface level.

Approved by:		re (hrs)
Obtained from:		projects/vnet
Reviewed by:		gnn, jhb
Sponsored by:		The FreeBSD Foundation
MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D6747
</content>
</entry>
</feed>
