<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/netinet6/ip6_input.c, branch upstream/11.0.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=upstream%2F11.0.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=upstream%2F11.0.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2016-06-21T13:48:49Z</updated>
<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/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>
<entry>
<title>Cleanup unneded include "opt_ipfw.h".</title>
<updated>2016-06-09T05:48:34Z</updated>
<author>
<name>Andrey V. Elsukov</name>
<email>ae@FreeBSD.org</email>
</author>
<published>2016-06-09T05:48:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4c1054027451b2e0cf9b3c4f390763cba5fdf383'/>
<id>urn:sha1:4c1054027451b2e0cf9b3c4f390763cba5fdf383</id>
<content type='text'>
It was used for conditional build IPFIREWALL_FORWARD support.
But IPFIREWALL_FORWARD option was removed a long time ago.
</content>
</entry>
<entry>
<title>Introduce a per-VNET flag to enable/disable netisr prcessing on that VNET.</title>
<updated>2016-06-03T13:57:10Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2016-06-03T13:57:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=484149def80975bda4e583a1d77c4c6ee2baf074'/>
<id>urn:sha1:484149def80975bda4e583a1d77c4c6ee2baf074</id>
<content type='text'>
Add accessor functions to toggle the state per VNET.
The base system (vnet0) will always enable itself with the normal
registration. We will share the registered protocol handlers in all
VNETs minimising duplication and management.
Upon disabling netisr processing for a VNET drain the netisr queue from
packets for that VNET.

Update netisr consumers to (de)register on a per-VNET start/teardown using
VNET_SYS(UN)INIT functionality.

The change should be transparent for non-VIMAGE kernels.

Reviewed by:	gnn (, hiren)
Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6691
</content>
</entry>
<entry>
<title>The pr_destroy field does not allow us to run the teardown code in a</title>
<updated>2016-06-01T10:14:04Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2016-06-01T10:14:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3f58662dd929456a0949339d6d4a414f6eacc5b8'/>
<id>urn:sha1:3f58662dd929456a0949339d6d4a414f6eacc5b8</id>
<content type='text'>
specific order.  VNET_SYSUNINITs however are doing exactly that.
Thus remove the VIMAGE conditional field from the domain(9) protosw
structure and replace it with VNET_SYSUNINITs.
This also allows us to change some order and to make the teardown functions
file local static.
Also convert divert(4) as it uses the same mechanism ip(4) and ip6(4) use
internally.

Slightly reshuffle the SI_SUB_* fields in kernel.h and add a new ones, e.g.,
for pfil consumers (firewalls), partially for this commit and for others
to come.

Reviewed by:		gnn, tuexen (sctp), jhb (kernel.h)
Obtained from:		projects/vnet
MFC after:		2 weeks
X-MFC:			do not remove pr_destroy
Sponsored by:		The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6652
</content>
</entry>
<entry>
<title>Mfp4 @180378:</title>
<updated>2016-03-22T15:43:47Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2016-03-22T15:43:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9901091ebac799a0835ba5b9ef9d418f192f47eb'/>
<id>urn:sha1:9901091ebac799a0835ba5b9ef9d418f192f47eb</id>
<content type='text'>
  Factor out nd6 and in6_attach initialization to their own files.
  Also move destruction into those files though still called from
  the central initialization.

  Sponsored by:	CK Software GmbH
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Reviewed by:	gnn
Differential Revision:	https://reviews.freebsd.org/D5033
</content>
</entry>
<entry>
<title>Overhaul if_enc(4) and make it loadable in run-time.</title>
<updated>2015-11-25T07:31:59Z</updated>
<author>
<name>Andrey V. Elsukov</name>
<email>ae@FreeBSD.org</email>
</author>
<published>2015-11-25T07:31:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ef91a9765de04e47ad6812d9be6e76fc955ffd87'/>
<id>urn:sha1:ef91a9765de04e47ad6812d9be6e76fc955ffd87</id>
<content type='text'>
Use hhook(9) framework to achieve ability of loading and unloading
if_enc(4) kernel module. INET and INET6 code on initialization registers
two helper hooks points in the kernel. if_enc(4) module uses these helper
hook points and registers its hooks. IPSEC code uses these hhook points
to call helper hooks implemented in if_enc(4).
</content>
</entry>
<entry>
<title>[netinet6]: Create a new IPv6 netisr which expects the frames to have been verified.</title>
<updated>2015-11-06T23:07:43Z</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2015-11-06T23:07:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=aaa46574b048573f1c81fde37cacc5f6003bcaa9'/>
<id>urn:sha1:aaa46574b048573f1c81fde37cacc5f6003bcaa9</id>
<content type='text'>
This is required for fragments and encapsulated data (eg tunneling) to be redistributed
to the RSS bucket based on the eventual IPv6 header and protocol (TCP, UDP, etc) header.

* Add an mbuf tag with the state of IPv6 options parsing before the frame is queued
  into the direct dispatch handler;
* Continue processing and complete the frame reception in the correct RSS bucket /
  netisr context.

Testing results are in the phabricator review.

Differential Revision:	https://reviews.freebsd.org/D3563
Submitted by:	Tiwei Bie &lt;btw@mail.ustc.edu.cn&gt;
</content>
</entry>
<entry>
<title>Add support for receiving flowtype, flowid and RSS bucket information as part of recvmsg().</title>
<updated>2015-09-06T20:57:57Z</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2015-09-06T20:57:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=68bb8d624984fbbba6cdea181846242cdd5e2968'/>
<id>urn:sha1:68bb8d624984fbbba6cdea181846242cdd5e2968</id>
<content type='text'>
Submitted by:	Tiwei Bie &lt;btw@mail.ustc.edu.cn&gt;
Differential Revision:	https://reviews.freebsd.org/D3562
</content>
</entry>
<entry>
<title>Implement RSS hashing/re-hashing for IPv6 ingress packets.</title>
<updated>2015-08-29T07:14:29Z</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2015-08-29T07:14:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0be189151fe3878eabf09387341aa4b27d28fe12'/>
<id>urn:sha1:0be189151fe3878eabf09387341aa4b27d28fe12</id>
<content type='text'>
This mirrors the basic IPv4 implementation - IPv6 packets under RSS
now are checked for a correct RSS hash and if one isn't provided,
it's done in software.

This only handles the initial receive - it doesn't yet handle
reinjecting / rehashing packets after being decapsulated from
various tunneling setups.  That'll come in some follow-up work.

For non-RSS users, this is almost a giant no-op.

It does change a couple of ipv6 methods to use const mbuf * instead of
mbuf * but it doesn't have any functional changes.

So, the following now occurs:

* If the NIC doesn't do any RSS hashing, it's all done in software.
  Single-queue, non-RSS NICs will now have the RX path distributed
  into multiple receive netisr queues.

* If the NIC provides the wrong hash (eg only IPv6 hash when we needed
  an IPv6 TCP hash, or IPv6 UDP hash when we expected IPv6 hash)
  then the hash is recalculated.

* .. if the hash is recalculated, it'll end up being injected into
  the correct netisr queue for v6 processing.

Submitted by:	Tiwei Bie &lt;btw@mail.ustc.edu.cn&gt;
Differential Revision:	https://reviews.freebsd.org/D3504
</content>
</entry>
<entry>
<title>Convert in_ifaddr_lock and in6_ifaddr_lock to rmlock.</title>
<updated>2015-07-29T08:12:05Z</updated>
<author>
<name>Andrey V. Elsukov</name>
<email>ae@FreeBSD.org</email>
</author>
<published>2015-07-29T08:12:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=cc0a3c8ca4561297b4df88fec347ba004d04277c'/>
<id>urn:sha1:cc0a3c8ca4561297b4df88fec347ba004d04277c</id>
<content type='text'>
Both are used to protect access to IP addresses lists and they can be
acquired for reading several times per packet. To reduce lock contention
it is better to use rmlock here.

Reviewed by:	gnn (previous version)
Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
Differential Revision:	https://reviews.freebsd.org/D3149
</content>
</entry>
</feed>
