Home | History | Annotate | only in /src/sys/rump/net/lib/libvirtif
History log of /src/sys/rump/net/lib/libvirtif
RevisionDateAuthorComments
 1.10 19-Oct-2015  pooka Add a COMMENT describing what each component roughly does.

"make describe" prints the comment.

Requested/inspired by Vincent Schwarzer on rumpkernel-users
 1.9 13-Mar-2014  pooka branches: 1.9.6;
Rename rumpcomp_user.c -> virtif_user.c
Convert to new-style RUMPCOMP_USER_SRCS in Makefile.
 1.8 12-Mar-2014  pooka Separate common bits for all interfaces implementing virtif hypercalls
from Makefile to Makefile.virtif. The latter is meant to be .included.
 1.7 04-Jul-2013  pooka Determine the interface name and the names of exported symbols based
on VIRTIF_BASE. This allows using various different packet-shoveling
backends in the same rump kernel.
 1.6 15-Mar-2013  pooka branches: 1.6.6;
Rerevert to preprevious now that this builds with build.sh
 1.5 14-Mar-2013  pooka Guess the RUMPCOMP_USER stuff wasn't ready to be in the NetBSD tree yet,
so revert previous commits to fix build. I'll look at rereverting when
toolchain/47644 is fixed and clean buildtests are again possible.
 1.4 13-Mar-2013  pooka Push the bits accessing the networking backend into hypercalls.
This allows a few highly desirable things to happen:

1) Linux support, which is included in this commit (thanks to wanq for
sending me the magic bits for accessing /dev/net/tun)
2) Reusing the kernel-side of the interface for devices such as
hardware packet processors which interact directly with user vm spaces
(not included in the commit).
 1.3 28-May-2009  pooka branches: 1.3.12; 1.3.22;
Use a bunch of weak symbols to determine which network components
are present. This works in userspace as opposed relying in link
sets, which fail miserably. Later, when the networking stack
becomes modularized, we can move to a dynamic scheme like with file
systems.

Also, this change allows us to do proper autoconfig, namely attach
the loopback interface iff it is present.
 1.2 16-Oct-2008  pooka branches: 1.2.2; 1.2.10; 1.2.12; 1.2.16;
kill default DBG=-g
 1.1 06-Oct-2008  pooka branches: 1.1.2;
Implement a virtual userspace networking interface. This is required
for any sensible operation when running the entire TCP/IP stack in
userspace (as opposed to libsockin which uses host kernel networking
to provide PF_INET).

While this basically works (although it is quite barebones), it
depends on some bit of cleanup in librump and is not built by
default yet.
 1.1.2.2 10-Oct-2008  skrll Sync with HEAD.
 1.1.2.1 06-Oct-2008  skrll file Makefile was added on branch wrstuden-revivesa on 2008-10-10 22:37:09 +0000
 1.2.16.3 20-Jun-2009  yamt sync with head
 1.2.16.2 04-May-2009  yamt sync with head.
 1.2.16.1 16-Oct-2008  yamt file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:14:33 +0000
 1.2.12.1 23-Jul-2009  jym Sync with HEAD.
 1.2.10.2 17-Jan-2009  mjf Sync with HEAD.
 1.2.10.1 16-Oct-2008  mjf file Makefile was added on branch mjf-devfs2 on 2009-01-17 13:29:39 +0000
 1.2.2.2 19-Oct-2008  haad Sync with HEAD.
 1.2.2.1 16-Oct-2008  haad file Makefile was added on branch haad-dm on 2008-10-19 22:18:08 +0000
 1.3.22.3 03-Dec-2017  jdolecek update from HEAD
 1.3.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.22.1 23-Jun-2013  tls resync from head
 1.3.12.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.6.2 18-May-2014  rmind sync with head
 1.6.6.1 28-Aug-2013  rmind sync with head
 1.9.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.4 13-Mar-2014  pooka branches: 1.4.4; 1.4.6; 1.4.10;
No reason to attach if_virt as a RUMP_COMPONENT(), simply use MODULE().
 1.3 13-Mar-2014  pooka remove unnecessary header inclusions
 1.2 12-Mar-2014  pooka component.c -> virtif_component.c, just to decrease risk of conflicts.
No runtime change.
 1.1 12-Mar-2014  pooka Separate common bits for all interfaces implementing virtif hypercalls
from Makefile to Makefile.virtif. The latter is meant to be .included.
 1.4.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.10.1 13-Mar-2014  tls file Makefile.virtif was added on branch tls-maxphys on 2014-08-20 00:04:43 +0000
 1.4.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.6.1 13-Mar-2014  yamt file Makefile.virtif was added on branch yamt-pagecache on 2014-05-22 11:41:17 +0000
 1.4.4.2 18-May-2014  rmind sync with head
 1.4.4.1 13-Mar-2014  rmind file Makefile.virtif was added on branch rmind-smpnet on 2014-05-18 17:46:20 +0000
 1.5 12-Mar-2014  pooka component.c -> virtif_component.c, just to decrease risk of conflicts.
No runtime change.
 1.4 04-Jul-2013  pooka Determine the interface name and the names of exported symbols based
on VIRTIF_BASE. This allows using various different packet-shoveling
backends in the same rump kernel.
 1.3 19-Oct-2010  pooka branches: 1.3.8; 1.3.18; 1.3.22;
Make virtif a cloner so that it can be brough to life also with
"ifconfig create". As previously, virt<n> interfaces with the
host's /dev/tap<n> (I guess it could be made explicit with
"ifconfig media", but leave it this way for now).
 1.2 01-Mar-2010  pooka branches: 1.2.2;
Introduce RUMP_COMPONENT. It behaves mostly like a simplified
module which is linked into the kernel and cannot be unloaded.
The main purpose is to get the proper constructors run and create
any /dev nodes necessary for said component. Once more of the
kernel (e.g. networking stack and device drivers) are converted to
MODULE and devfs pops up from somewhere, rump components can be
retired.
 1.1 28-May-2009  pooka branches: 1.1.2; 1.1.4;
Use a bunch of weak symbols to determine which network components
are present. This works in userspace as opposed relying in link
sets, which fail miserably. Later, when the networking stack
becomes modularized, we can move to a dynamic scheme like with file
systems.

Also, this change allows us to do proper autoconfig, namely attach
the loopback interface iff it is present.
 1.1.4.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.1.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.3 11-Mar-2010  yamt sync with head
 1.1.2.2 20-Jun-2009  yamt sync with head
 1.1.2.1 28-May-2009  yamt file component.c was added on branch yamt-nfs-mp on 2009-06-20 07:20:37 +0000
 1.2.2.1 05-Mar-2011  rmind sync with head
 1.3.22.2 18-May-2014  rmind sync with head
 1.3.22.1 28-Aug-2013  rmind sync with head
 1.3.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.59 16-Jun-2021  riastradh if_attach and if_initialize cannot fail, don't test return value

These were originally made failable back in 2017 when if_initialize
allocated a softint in every interface for link state changes, so
that it could fail gracefully instead of panicking:

https://mail-index.NetBSD.org/source-changes/2017/10/23/msg089053.html

However, this spawned many seldom- or never-tested error branches,
which are risky to have around. And that softint in every interface
has since been replaced by a single global workqueue, because link
state changes require thread context but not low latency or high
throughput:

https://mail-index.NetBSD.org/source-changes/2020/02/06/msg113759.html

So there is no longer any reason for if_initialize to fail. (The
subroutine if_stats_init can't fail because percpu_alloc can't fail
either.)

There is a snag: the softint_establish in if_percpuq_create could
fail, potentially leading to bad consequences later on trying to use
the softint. This change doesn't introduce any new bugs because of
the snag -- if_percpuq_attach was already broken. However, the snag
can be better addressed without spawning error branches, either by
using a single softint or making softints less scarce.

(Separate commit will change the signatures of if_attach and
if_initialize to return void, scheduled to ride whatever is the next
convenient kernel bump.)

Patch and testing on amd64 and evbmips64-eb by maya@; commit message
soliloquy, and compile-testing on evbppc/i386/earmv7hf, by me.
 1.58 01-Feb-2020  thorpej branches: 1.58.10;
Adopt <net/if_stats.h>.
 1.57 26-Jun-2018  msaitoh branches: 1.57.2; 1.57.8;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.56 23-Oct-2017  msaitoh branches: 1.56.2;
Fix compile error.
 1.55 23-Oct-2017  msaitoh If error occured in the attach function, free resources and return.
 1.54 15-Dec-2016  ozaki-r branches: 1.54.8;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
- Where/When if_ipackets is counted up
- Note that some drivers still update packet statistics in their own
way (periodical update)
- Moved bpf_mtap run in softint
- This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net
 1.53 16-Jun-2016  ozaki-r branches: 1.53.2;
Use curlwp_bind and curlwp_bindx instead of open-coding LP_BOUND
 1.52 10-Jun-2016  ozaki-r Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
 1.51 19-Apr-2016  ozaki-r Prevent LWP migrations between CPUs during upper layer processing

This is a contract of psref(9) that is used by upper layer componenets,
e.g., bridge(4).
 1.50 09-Feb-2016  ozaki-r Introduce softint-based if_input

This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.49 06-Nov-2014  pooka branches: 1.49.2;
Ensure that no two VIRTIF's have the same modname, therefore
allowing them to coexist in the same rump kernel.

from Alexander Guy, via github
 1.48 09-Aug-2014  ozaki-r Count packets in if_virt
 1.47 02-Apr-2014  pooka use if_initname() instead of homegrown sprintf
 1.46 20-Mar-2014  christos kill sprintf
 1.45 18-Mar-2014  pooka Trim alignment out of packet length before passing it up.
 1.44 13-Mar-2014  pooka No reason to attach if_virt as a RUMP_COMPONENT(), simply use MODULE().
 1.43 13-Mar-2014  pooka remove unnecessary header inclusions
 1.42 13-Mar-2014  pooka allow VIF_DYING() implementation to protest
 1.41 13-Mar-2014  pooka Rename rumpcomp_user.c -> virtif_user.c
Convert to new-style RUMPCOMP_USER_SRCS in Makefile.
 1.40 12-Mar-2014  pooka When sending, only load mbufs which have a length. This is especially
useful for fragmented datagrams where the tail of the first packet is
full of nothing.
 1.39 03-Mar-2014  pooka Pull in the changes from the dpdk, netmap and snabb switch repos.
There are two major changes:

1) All thread context policy is pushed down to the hypercalls.
This is meant to help performance-mongering implementations be
able to control packet scheduling better (e.g. pin down packet
reception to certain physical cores).
2) Generalize linkstr, meaning that the interface can now take an
arbitrary string which is passed to the create() hypercall. This can
be used to map backend device characteristics to the rump kernel
interface instance.
 1.38 21-Feb-2014  skrll Fix typo in fix for PR/48606
 1.37 21-Feb-2014  christos PR/48606: Lloyd Parkes: Drivers not using ifp->if_input but using ether_input
directly.
 1.36 04-Jul-2013  pooka Determine the interface name and the names of exported symbols based
on VIRTIF_BASE. This allows using various different packet-shoveling
backends in the same rump kernel.
 1.35 03-Jul-2013  pooka fix parameter name
 1.34 03-Jul-2013  pooka Adjust for rump_virtif_create() removal. Incidentally, this reduces
the number of exported symbols by one (which is useful for phase 2).
 1.33 03-Jul-2013  pooka g/c dummyif, not useful these days
 1.32 03-Jul-2013  pooka Allow alternate interface base names to be specified at compile time.
 1.31 30-Apr-2013  pooka branches: 1.31.4;
Make hypercall calling conventions consistent: iff a hypercall can fail,
it returns an int containing the error value.
 1.30 15-Mar-2013  pooka Rerevert to preprevious now that this builds with build.sh
 1.29 14-Mar-2013  pooka Guess the RUMPCOMP_USER stuff wasn't ready to be in the NetBSD tree yet,
so revert previous commits to fix build. I'll look at rereverting when
toolchain/47644 is fixed and clean buildtests are again possible.
 1.28 13-Mar-2013  pooka Push the bits accessing the networking backend into hypercalls.
This allows a few highly desirable things to happen:

1) Linux support, which is included in this commit (thanks to wanq for
sending me the magic bits for accessing /dev/net/tun)
2) Reusing the kernel-side of the interface for devices such as
hardware packet processors which interact directly with user vm spaces
(not included in the commit).
 1.27 14-Sep-2012  pooka Do not assume that O_FOO flags have matching values in the rump kernel
and hypervisor.
 1.26 19-Nov-2011  tls branches: 1.26.8;
First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>. This change includes
the following:

An initial cleanup and minor reorganization of the entropy pool
code in sys/dev/rnd.c and sys/dev/rndpool.c. Several bugs are
fixed. Some effort is made to accumulate entropy more quickly at
boot time.

A generic interface, "rndsink", is added, for stream generators to
request that they be re-keyed with good quality entropy from the pool
as soon as it is available.

The arc4random()/arc4randbytes() implementation in libkern is
adjusted to use the rndsink interface for rekeying, which helps
address the problem of low-quality keys at boot time.

An implementation of the FIPS 140-2 statistical tests for random
number generator quality is provided (libkern/rngtest.c). This
is based on Greg Rose's implementation from Qualcomm.

A new random stream generator, nist_ctr_drbg, is provided. It is
based on an implementation of the NIST SP800-90 CTR_DRBG by
Henric Jungheim. This generator users AES in a modified counter
mode to generate a backtracking-resistant random stream.

An abstraction layer, "cprng", is provided for in-kernel consumers
of randomness. The arc4random/arc4randbytes API is deprecated for
in-kernel use. It is replaced by "cprng_strong". The current
cprng_fast implementation wraps the existing arc4random
implementation. The current cprng_strong implementation wraps the
new CTR_DRBG implementation. Both interfaces are rekeyed from
the entropy pool automatically at intervals justifiable from best
current cryptographic practice.

In some quick tests, cprng_fast() is about the same speed as
the old arc4randbytes(), and cprng_strong() is about 20% faster
than rnd_extract_data(). Performance is expected to improve.

The AES code in src/crypto/rijndael is no longer an optional
kernel component, as it is required by cprng_strong, which is
not an optional kernel component.

The entropy pool output is subjected to the rngtest tests at
startup time; if it fails, the system will reboot. There is
approximately a 3/10000 chance of a false positive from these
tests. Entropy pool _input_ from hardware random numbers is
subjected to the rngtest tests at attach time, as well as the
FIPS continuous-output test, to detect bad or stuck hardware
RNGs; if any are detected, they are detached, but the system
continues to run.

A problem with rndctl(8) is fixed -- datastructures with
pointers in arrays are no longer passed to userspace (this
was not a security problem, but rather a major issue for
compat32). A new kernel will require a new rndctl.

The sysctl kern.arandom() and kern.urandom() nodes are hooked
up to the new generators, but the /dev/*random pseudodevices
are not, yet.

Manual pages for the new kernel interfaces are forthcoming.
 1.25 31-Oct-2011  yamt branches: 1.25.2;
fix a type in a printf message
 1.24 07-Aug-2011  rmind Rename slightly misleading KTHREAD_JOINABLE to KTHREAD_MUSTJOIN.
 1.23 22-Jun-2011  mrg fix an operator precedence error picked up by GCC 4.5.3. real bug.
 1.22 01-Dec-2010  pooka Don't bother asserting: if we create the thread without KTHREAD_MPSAFE,
it's not going to be MPSAFE.
 1.21 15-Nov-2010  pooka Make interface support ifconfig {down,destroy} and generally make
it a little less eager to panic.
 1.20 19-Oct-2010  pooka Make virtif a cloner so that it can be brough to life also with
"ifconfig create". As previously, virt<n> interfaces with the
host's /dev/tap<n> (I guess it could be made explicit with
"ifconfig media", but leave it this way for now).
 1.19 10-Aug-2010  pooka * improve diagnostic print
* deal with a tap quirk when it returns 0 bytes
 1.18 05-Apr-2010  joerg Fix typo
 1.17 05-Apr-2010  joerg Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.16 19-Jan-2010  pooka branches: 1.16.2; 1.16.4;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.15 16-Jan-2010  pooka support bpf
 1.14 14-Oct-2009  pooka "rumppriv" goes back to "rump" per internal interface naming change.
 1.13 14-Oct-2009  pooka Adjust rump sources for external/internal interfaces.
No functional change.
 1.12 12-Oct-2009  pooka Bump iovec lazy bum magic value to 32: nfsd likes to write mbufs
with 17 per chain (previous i'm-too-lazy-for-my-forloop value was
of course 16).
 1.11 16-Sep-2009  pooka work around tap bug: if /dev/tap<n> was previously non-blocking, newly
opened fd's will also be non-blocking.
(yeayea, i'll fix the kernel some day, but I don't want to reboot
my host OS now)
 1.10 27-May-2009  pooka Add a dummyif, which doesn't actually traffic any cargo, but since
it has no backend it can always be attached and is therefore
convenient for testing ifconfig.
 1.9 26-May-2009  pooka Filter out ENETRESET from ether_ioctl() since we aren't interested
in multicast hugging.
 1.8 27-Mar-2009  pooka branches: 1.8.2;
* make interface creation open /dev/tapn for interface n
* create "unique" enaddr
* do send in async context
 1.7 28-Feb-2009  pooka Fix a silly mistake: indubitably the struct ifnet pointer given to
ether_ifattach() should point to a struct ethercom.
 1.6 26-Feb-2009  pooka decouple from host struct iovec
 1.5 18-Dec-2008  pooka branches: 1.5.2; 1.5.4;
__KERNEL_RCSID
 1.4 16-Oct-2008  pooka branches: 1.4.2; 1.4.4;
Add a prototype to allow this to build (will be moved to a better
place later).
 1.3 14-Oct-2008  pooka Make the "something random" ethernet address ETHER_IS_LOCAL
(address assignment probably needs some more work if we want to
support multiple interfaces).

hat tip to Quentin Garnier
 1.2 13-Oct-2008  pooka Dear diary: an ethernet address with 0x01 set in the first octet
is an ethernet multicast address. TCP does not like ethernet
multicast addresses.
 1.1 06-Oct-2008  pooka branches: 1.1.2;
Implement a virtual userspace networking interface. This is required
for any sensible operation when running the entire TCP/IP stack in
userspace (as opposed to libsockin which uses host kernel networking
to provide PF_INET).

While this basically works (although it is quite barebones), it
depends on some bit of cleanup in librump and is not built by
default yet.
 1.1.2.2 10-Oct-2008  skrll Sync with HEAD.
 1.1.2.1 06-Oct-2008  skrll file if_virt.c was added on branch wrstuden-revivesa on 2008-10-10 22:37:09 +0000
 1.4.4.3 28-Apr-2009  skrll Sync with HEAD.
 1.4.4.2 03-Mar-2009  skrll Sync with HEAD.
 1.4.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.4.2.2 19-Oct-2008  haad Sync with HEAD.
 1.4.2.1 16-Oct-2008  haad file if_virt.c was added on branch haad-dm on 2008-10-19 22:18:08 +0000
 1.5.4.2 23-Jul-2009  jym Sync with HEAD.
 1.5.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.2.2 17-Jan-2009  mjf Sync with HEAD.
 1.5.2.1 18-Dec-2008  mjf file if_virt.c was added on branch mjf-devfs2 on 2009-01-17 13:29:39 +0000
 1.8.2.5 11-Aug-2010  yamt sync with head.
 1.8.2.4 11-Mar-2010  yamt sync with head
 1.8.2.3 20-Jun-2009  yamt sync with head
 1.8.2.2 04-May-2009  yamt sync with head.
 1.8.2.1 27-Mar-2009  yamt file if_virt.c was added on branch yamt-nfs-mp on 2009-05-04 08:14:33 +0000
 1.16.4.2 05-Mar-2011  rmind sync with head
 1.16.4.1 30-May-2010  rmind sync with head
 1.16.2.3 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.16.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.16.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.25.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25.2.2 30-Oct-2012  yamt sync with head
 1.25.2.1 17-Apr-2012  yamt sync with head
 1.26.8.4 03-Dec-2017  jdolecek update from HEAD
 1.26.8.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.26.8.2 23-Jun-2013  tls resync from head
 1.26.8.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.31.4.2 18-May-2014  rmind sync with head
 1.31.4.1 28-Aug-2013  rmind sync with head
 1.49.2.4 05-Feb-2017  skrll Sync with HEAD
 1.49.2.3 09-Jul-2016  skrll Sync with HEAD
 1.49.2.2 22-Apr-2016  skrll Sync with HEAD
 1.49.2.1 19-Mar-2016  skrll Sync with HEAD
 1.53.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.54.8.1 10-Dec-2017  snj Pull up following revision(s) (requested by msaitoh in ticket #427):
sys/arch/amiga/dev/if_bah_zbus.c: 1.17
sys/arch/arm/broadcom/bcm53xx_eth.c: 1.30
sys/arch/powerpc/booke/dev/pq3etsec.c: 1.32
sys/arch/usermode/dev/if_veth.c: 1.9
sys/dev/ic/an.c: 1.66
sys/dev/ic/athn.c: 1.17
sys/dev/ic/atw.c: 1.162
sys/dev/ic/bwi.c: 1.33
sys/dev/ic/dwc_gmac.c: 1.41-1.42
sys/dev/ic/malo.c: 1.10
sys/dev/ic/rt2560.c: 1.31
sys/dev/ic/rt2661.c: 1.36
sys/dev/ic/rt2860.c: 1.29
sys/dev/ic/rtw.c: 1.127
sys/dev/ic/rtwvar.h: 1.46
sys/dev/ic/smc90cx6.c: 1.71
sys/dev/ic/smc90cx6var.h: 1.12
sys/dev/ic/wi.c: 1.244
sys/dev/pci/if_ipw.c: 1.66
sys/dev/pci/if_iwi.c: 1.104
sys/dev/pci/if_iwm.c: 1.76
sys/dev/pci/if_iwn.c: 1.86
sys/dev/pci/if_rtwn.c: 1.13
sys/dev/pci/if_wm.c: 1.541
sys/dev/pci/if_wpi.c: 1.79
sys/dev/pci/ixgbe/ixgbe.c: 1.106
sys/dev/pci/ixgbe/ixv.c: 1.73 via patch
sys/dev/pcmcia/if_malo_pcmcia.c: 1.15
sys/dev/scsipi/if_se.c: 1.95
sys/dev/usb/if_upl.c: 1.60
sys/net/if.c: 1.396
sys/net/if.h: 1.241
sys/net/if_arc.h: 1.23
sys/net/if_arcsubr.c: 1.78
sys/net/if_bridge.c: 1.136-1.137
sys/net/if_etherip.c: 1.39
sys/net/if_faith.c: 1.56
sys/net/if_gif.c: 1.131
sys/net/if_loop.c: 1.96
sys/net/if_mpls.c: 1.30
sys/net/if_pppoe.c: 1.129
sys/net/if_srt.c: 1.27
sys/net/if_stf.c: 1.102
sys/net/if_tap.c: 1.100
sys/net/if_vlan.c: 1.105
sys/netinet/ip_carp.c: 1.91
sys/rump/net/lib/libshmif/if_shmem.c: 1.73-1.74
sys/rump/net/lib/libvirtif/if_virt.c: 1.55-1.56
if_initalize() and if_attach() failed when resource allocation failed
(e.g. allocating softint). Without this change, it panics. It's bad because
resource shortage really occured when a lot of pseudo interface is created.
To avoid this problem, don't panic and change return value of if_initialize()
and if_attach() to int. Caller fanction will be recover from error cleanly by
checking the return value.
Return if bah_attach_subr() failed.
If if_attach() failed in the attach function, return.
- If if_initialize() failed in the attach function, free resources and return.
- Add some missing frees in bridge_clone_destroy().
- KNF
If error occured in bcmeth_ccb_attach(), free resources and return.
If error occured in pq3etsec_attach(), free resources and return.
If error occured in the attach function, free resources and return.
- If if_initialize() failed in athn_attach(), free resources and return.
- Add missing pmf_event_deregister() in athn_detach().
- Free resources correctly on some errors in atw_attach().
- Use apint*() insread of printf() in the attach function.
If if_initialize() failed in the attach function, return.
- If if_initialize() failed in the attach function, free resources and return.
- Add missing dwc_gmac_free_dma_rings() and mutex_destroy() when attach
failed.
- If if_initialize() failed in the attach function, free resources and return.
- ifp is always not NULL in iwi_detach(). Check correctly with ifp->if_softc.
- If if_initialize() failed in the attach function, free resources and return.
- Fix error path in the attach function correctly.
If if_initialize() failed in the attach function, free resources and return.
If if_attach() failed in the attach function, free resources and return.
- If if_initialize() failed in the attach function, free resources and return.
- KNF
- If if_attach() failed in the attach function, free resources and return.
- KNF
Fix compile error.
Fix compile error.
We don't need '&mii', but just 'mii' for mii_detach().
Don't free sc_rthash twice
 1.56.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.57.8.1 29-Feb-2020  ad Sync with head.
 1.57.2.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.58.10.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.3 03-Mar-2014  pooka branches: 1.3.4; 1.3.8;
Pull in the changes from the dpdk, netmap and snabb switch repos.
There are two major changes:

1) All thread context policy is pushed down to the hypercalls.
This is meant to help performance-mongering implementations be
able to control packet scheduling better (e.g. pin down packet
reception to certain physical cores).
2) Generalize linkstr, meaning that the interface can now take an
arbitrary string which is passed to the create() hypercall. This can
be used to map backend device characteristics to the rump kernel
interface instance.
 1.2 04-Jul-2013  pooka branches: 1.2.4;
Add a note explaining why there's a homegrown __STRING, __CONCAT, etc.
 1.1 04-Jul-2013  pooka Determine the interface name and the names of exported symbols based
on VIRTIF_BASE. This allows using various different packet-shoveling
backends in the same rump kernel.
 1.2.4.3 18-May-2014  rmind sync with head
 1.2.4.2 28-Aug-2013  rmind sync with head
 1.2.4.1 04-Jul-2013  rmind file if_virt.h was added on branch rmind-smpnet on 2013-08-28 23:59:37 +0000
 1.3.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.8.1 03-Mar-2014  tls file if_virt.h was added on branch tls-maxphys on 2014-08-20 00:04:43 +0000
 1.3.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.4.1 03-Mar-2014  yamt file if_virt.h was added on branch yamt-pagecache on 2014-05-22 11:41:17 +0000
 1.13 13-Mar-2014  pooka Rename rumpcomp_user.c -> virtif_user.c
Convert to new-style RUMPCOMP_USER_SRCS in Makefile.
 1.12 03-Mar-2014  pooka Pull in the changes from the dpdk, netmap and snabb switch repos.
There are two major changes:

1) All thread context policy is pushed down to the hypercalls.
This is meant to help performance-mongering implementations be
able to control packet scheduling better (e.g. pin down packet
reception to certain physical cores).
2) Generalize linkstr, meaning that the interface can now take an
arbitrary string which is passed to the create() hypercall. This can
be used to map backend device characteristics to the rump kernel
interface instance.
 1.11 27-Oct-2013  pooka Give the hypercall interface a version number. This is for
implementations outside of the tree.
 1.10 16-Jul-2013  pooka A simple (void) is apparently too easy and traditional to make
Wunused-result STFU, so let's invent something a bit more verbose to
try to achieve the desired result of "ccg xnaht I really don't care if
you think I should check the return value".
 1.9 16-Jul-2013  pooka Explicitly ignore return value of writev() for sending a packet.

Otherwise you get the following with some compilers:
warning: ignoring return value of 'writev', declared with attribute warn_unused_result [-Wunused-result]
 1.8 04-Jul-2013  pooka Determine the interface name and the names of exported symbols based
on VIRTIF_BASE. This allows using various different packet-shoveling
backends in the same rump kernel.
 1.7 04-Jul-2013  pooka fix warnings
 1.6 20-May-2013  pooka branches: 1.6.2; 1.6.4;
Return 0 for success instead of returning an uninitialized automatic variable.

from Gal Sagie, PR 47837
 1.5 30-Apr-2013  pooka Translate error codes between the hypervisor and rump kernel.
 1.4 30-Apr-2013  pooka Make hypercall calling conventions consistent: iff a hypercall can fail,
it returns an int containing the error value.
 1.3 16-Mar-2013  christos fix the build!
 1.2 13-Mar-2013  pooka Fix a few minor issues found by proofreading the diff one last time.
 1.1 13-Mar-2013  pooka Push the bits accessing the networking backend into hypercalls.
This allows a few highly desirable things to happen:

1) Linux support, which is included in this commit (thanks to wanq for
sending me the magic bits for accessing /dev/net/tun)
2) Reusing the kernel-side of the interface for devices such as
hardware packet processors which interact directly with user vm spaces
(not included in the commit).
 1.6.4.2 18-May-2014  rmind sync with head
 1.6.4.1 28-Aug-2013  rmind sync with head
 1.6.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.2.2 23-Jun-2013  tls resync from head
 1.6.2.1 20-May-2013  tls file rumpcomp_user.c was added on branch tls-maxphys on 2013-06-23 06:20:29 +0000
 1.7 13-Mar-2014  pooka Rename rumpcomp_user.c -> virtif_user.c
Convert to new-style RUMPCOMP_USER_SRCS in Makefile.
 1.6 03-Mar-2014  pooka Pull in the changes from the dpdk, netmap and snabb switch repos.
There are two major changes:

1) All thread context policy is pushed down to the hypercalls.
This is meant to help performance-mongering implementations be
able to control packet scheduling better (e.g. pin down packet
reception to certain physical cores).
2) Generalize linkstr, meaning that the interface can now take an
arbitrary string which is passed to the create() hypercall. This can
be used to map backend device characteristics to the rump kernel
interface instance.
 1.5 27-Oct-2013  pooka Give the hypercall interface a version number. This is for
implementations outside of the tree.
 1.4 04-Jul-2013  pooka Determine the interface name and the names of exported symbols based
on VIRTIF_BASE. This allows using various different packet-shoveling
backends in the same rump kernel.
 1.3 30-Apr-2013  pooka branches: 1.3.4; 1.3.6;
Make hypercall calling conventions consistent: iff a hypercall can fail,
it returns an int containing the error value.
 1.2 13-Mar-2013  pooka Fix a few minor issues found by proofreading the diff one last time.
 1.1 13-Mar-2013  pooka Push the bits accessing the networking backend into hypercalls.
This allows a few highly desirable things to happen:

1) Linux support, which is included in this commit (thanks to wanq for
sending me the magic bits for accessing /dev/net/tun)
2) Reusing the kernel-side of the interface for devices such as
hardware packet processors which interact directly with user vm spaces
(not included in the commit).
 1.3.6.2 18-May-2014  rmind sync with head
 1.3.6.1 28-Aug-2013  rmind sync with head
 1.3.4.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.2 23-Jun-2013  tls resync from head
 1.3.4.1 30-Apr-2013  tls file rumpcomp_user.h was added on branch tls-maxphys on 2013-06-23 06:20:29 +0000
 1.2 02-Dec-2014  pooka Remove shlib_version files and just use Makefile SHLIB_MAJOR/MINOR,
with the default provided by Makefile.rump (they're all 0.0 anyway)
 1.1 06-Oct-2008  pooka branches: 1.1.2; 1.1.4; 1.1.12; 1.1.18; 1.1.46; 1.1.66;
Implement a virtual userspace networking interface. This is required
for any sensible operation when running the entire TCP/IP stack in
userspace (as opposed to libsockin which uses host kernel networking
to provide PF_INET).

While this basically works (although it is quite barebones), it
depends on some bit of cleanup in librump and is not built by
default yet.
 1.1.66.1 06-Apr-2015  skrll Sync with HEAD
 1.1.46.1 03-Dec-2017  jdolecek update from HEAD
 1.1.18.2 04-May-2009  yamt sync with head.
 1.1.18.1 06-Oct-2008  yamt file shlib_version was added on branch yamt-nfs-mp on 2009-05-04 08:14:33 +0000
 1.1.12.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.12.1 06-Oct-2008  mjf file shlib_version was added on branch mjf-devfs2 on 2009-01-17 13:29:39 +0000
 1.1.4.2 19-Oct-2008  haad Sync with HEAD.
 1.1.4.1 06-Oct-2008  haad file shlib_version was added on branch haad-dm on 2008-10-19 22:18:08 +0000
 1.1.2.2 10-Oct-2008  skrll Sync with HEAD.
 1.1.2.1 06-Oct-2008  skrll file shlib_version was added on branch wrstuden-revivesa on 2008-10-10 22:37:09 +0000
 1.2 13-Mar-2014  pooka No reason to attach if_virt as a RUMP_COMPONENT(), simply use MODULE().
 1.1 12-Mar-2014  pooka component.c -> virtif_component.c, just to decrease risk of conflicts.
No runtime change.
 1.6 26-Mar-2019  bad Protect __KERNEL_RCSID. It isn't available when compile rumpkernels under e.g. Linux.
 1.5 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.4 12-Dec-2018  alnsn Add missing RCSIDs.
 1.3 14-Mar-2014  pooka branches: 1.3.4; 1.3.6; 1.3.10; 1.3.34; 1.3.36;
Remember to bump revision for the "int my time VIF_DYING" change yesterday.
 1.2 13-Mar-2014  pooka allow VIF_DYING() implementation to protest
 1.1 13-Mar-2014  pooka Rename rumpcomp_user.c -> virtif_user.c
Convert to new-style RUMPCOMP_USER_SRCS in Makefile.
 1.3.36.1 10-Jun-2019  christos Sync with HEAD
 1.3.34.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.3.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.10.1 14-Mar-2014  tls file virtif_user.c was added on branch tls-maxphys on 2014-08-20 00:04:43 +0000
 1.3.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.6.1 14-Mar-2014  yamt file virtif_user.c was added on branch yamt-pagecache on 2014-05-22 11:41:17 +0000
 1.3.4.2 18-May-2014  rmind sync with head
 1.3.4.1 14-Mar-2014  rmind file virtif_user.c was added on branch rmind-smpnet on 2014-05-18 17:46:20 +0000
 1.3 14-Mar-2014  pooka branches: 1.3.4; 1.3.6; 1.3.10;
Remember to bump revision for the "int my time VIF_DYING" change yesterday.
 1.2 13-Mar-2014  pooka allow VIF_DYING() implementation to protest
 1.1 13-Mar-2014  pooka Rename rumpcomp_user.c -> virtif_user.c
Convert to new-style RUMPCOMP_USER_SRCS in Makefile.
 1.3.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.10.1 14-Mar-2014  tls file virtif_user.h was added on branch tls-maxphys on 2014-08-20 00:04:43 +0000
 1.3.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.6.1 14-Mar-2014  yamt file virtif_user.h was added on branch yamt-pagecache on 2014-05-22 11:41:17 +0000
 1.3.4.2 18-May-2014  rmind sync with head
 1.3.4.1 14-Mar-2014  rmind file virtif_user.h was added on branch rmind-smpnet on 2014-05-18 17:46:20 +0000

RSS XML Feed