<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-openbsd/sys/net/if_loop.c, branch jd/queueboosts</title>
<subtitle>WireGuard implementation for the OpenBSD kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-openbsd/atom/sys/net/if_loop.c?h=jd%2Fqueueboosts</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-openbsd/atom/sys/net/if_loop.c?h=jd%2Fqueueboosts'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/'/>
<updated>2020-01-08T09:09:10Z</updated>
<entry>
<title>In loop_clone_destroy() reset the rdomain with rtable_l2set() after</title>
<updated>2020-01-08T09:09:10Z</updated>
<author>
<name>claudio</name>
<email>claudio@openbsd.org</email>
</author>
<published>2020-01-08T09:09:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=5a1e6e9cca10b92c3bc0eebbdb1f9084c3258d0d'/>
<id>urn:sha1:5a1e6e9cca10b92c3bc0eebbdb1f9084c3258d0d</id>
<content type='text'>
the if_detach() call. In if_detach() various route messages are generated
and during that time the rtable_l2() mapping needs to stay.
OK kn@
</content>
</entry>
<entry>
<title>When we needed the kernel lock for local IP packet delivery, mpi@</title>
<updated>2019-08-06T22:57:54Z</updated>
<author>
<name>bluhm</name>
<email>bluhm@openbsd.org</email>
</author>
<published>2019-08-06T22:57:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=8f6d2e8bf0b541dc10865826bab4d248a2639690'/>
<id>urn:sha1:8f6d2e8bf0b541dc10865826bab4d248a2639690</id>
<content type='text'>
introduced a queue to grab the lock for multiple packets.  Now we
have only netlock for both IP and protocol input.  So the queue is
not necessary anymore.  It just switches CPU and decreases performance.
So remove the inet and inet6 ip queue for local packets.
To get TCP running on loopback, we have to queue once between TCP
input and output of the two sockets.  So use the loopback queue in
looutput() unconditionally.
OK visa@
</content>
</entry>
<entry>
<title>allow the automatically created loopback interfaces in rdomains to be</title>
<updated>2018-09-09T10:11:41Z</updated>
<author>
<name>henning</name>
<email>henning@openbsd.org</email>
</author>
<published>2018-09-09T10:11:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=f7ebbf1968980cdd64cdfb5eae828056fdbc0634'/>
<id>urn:sha1:f7ebbf1968980cdd64cdfb5eae828056fdbc0634</id>
<content type='text'>
deleted if the rdomain doesn't contain any other interface. turn the rdomain
back into an ordinary, empty rtable in that case.
with this and the previous commits one can get rid of rdomains again without
rebooting, which wasn't possible any more for some time
ok bluhm, input mpi
</content>
</entry>
<entry>
<title>Revert all the bits of the autocreate 127.0.0.1 on lo(4) creation for now.</title>
<updated>2018-03-02T15:52:11Z</updated>
<author>
<name>claudio</name>
<email>claudio@openbsd.org</email>
</author>
<published>2018-03-02T15:52:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=0869a26642f378154f5112a742a66abc8ed6eea8'/>
<id>urn:sha1:0869a26642f378154f5112a742a66abc8ed6eea8</id>
<content type='text'>
This needs to go back to the drawing board.
</content>
</entry>
<entry>
<title>Similar to the IPv6 case create 127.0.0.1/8 on lo(4) interfaces which act</title>
<updated>2018-02-10T05:32:21Z</updated>
<author>
<name>claudio</name>
<email>claudio@openbsd.org</email>
</author>
<published>2018-02-10T05:32:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=d62081b6dd05a67ee176092f85ee96e83eb74a19'/>
<id>urn:sha1:d62081b6dd05a67ee176092f85ee96e83eb74a19</id>
<content type='text'>
as loopback interfaces for each rdomain (including lo0). This is done when
the interface is brought up. This is now also done by default (either on
attach of lo0 or when creating the rdomain).
OK mpi@
</content>
</entry>
<entry>
<title>Creating a cloned interface could return ENOMEM due to temporary</title>
<updated>2018-01-09T15:24:24Z</updated>
<author>
<name>bluhm</name>
<email>bluhm@openbsd.org</email>
</author>
<published>2018-01-09T15:24:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=809d3a3e7e4e2167dd03620b8ad7b0a18aaebb7d'/>
<id>urn:sha1:809d3a3e7e4e2167dd03620b8ad7b0a18aaebb7d</id>
<content type='text'>
memory shortage.  As it is invoked from a system call, it should
not fail and wait instead.
OK visa@ mpi@
</content>
</entry>
<entry>
<title>add ifiqueues for mp safety and nics with multiple rx rings.</title>
<updated>2017-12-15T01:37:30Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2017-12-15T01:37:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=ea47e5e1b6d67781cc4f61bd0240820384903832'/>
<id>urn:sha1:ea47e5e1b6d67781cc4f61bd0240820384903832</id>
<content type='text'>
currently there is a single mbuf_queue per interface, which all
rings on a nic shove packets onto. while the list inside this queue
is protected by a mutex, the counters around it (ie, ipackets,
ibytes, idrops) are not. this means updates can be lost, and reading
the statistics is also inconsistent. having a single queue means
that busy rx rings can dominate and then starve the others.

ifiqueue structs are like ifqueue structs. they provide per ring
queues, and independent counters for each ring. when ifdata is read
for userland, these counters are aggregated. having a queue per
ring now allows for per ring backpressure to be applied. MCLGETI
will have it's day again.

right now we assume every interface wants an input queue and
unconditionally provide one. individual interfaces can opt into
more.

im not completely happy about the shape of this atm, but shuffling
it around more makes the diff bigger.

ok visa@
</content>
</entry>
<entry>
<title>- add one more softnet taskq</title>
<updated>2017-10-31T22:05:12Z</updated>
<author>
<name>sashan</name>
<email>sashan@openbsd.org</email>
</author>
<published>2017-10-31T22:05:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=93865884b36eca9fa138a35d5f936254a8f76e4d'/>
<id>urn:sha1:93865884b36eca9fa138a35d5f936254a8f76e4d</id>
<content type='text'>
  NOTE: code still runs with single softnet task.  change definition of
  SOFTNET_TASKS in net/if.c, if you want to have more than one softnet task

OK mpi@, OK phessler@
</content>
</entry>
<entry>
<title>There was a possible stack overrun in the network since we had</title>
<updated>2017-10-19T11:02:42Z</updated>
<author>
<name>bluhm</name>
<email>bluhm@openbsd.org</email>
</author>
<published>2017-10-19T11:02:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=c0a69b8ad4bcb9d884249062cf1e23117af1224b'/>
<id>urn:sha1:c0a69b8ad4bcb9d884249062cf1e23117af1224b</id>
<content type='text'>
removed some queueing.  lo(4) output called the ip input routines
without a queue.  So if a packet looped through the kernel, the
kernel stack filled up.
Use M_LOOP to find recursive calls to looutput().  This flag is set
when a packet goes through the loopback interface.  Avoid an
additional queueing if the packet goes to lo(4) only once.  As there
may be gif(4), bridge(4), pair(4), ipsec(4), rdomain(4), ...  setups
that legitimately pass lo(4) more than once, use the interface input
queue for these cases.
Packets in the queue run through ip forward.  There the TTL is
decremented and the packet is finally processed or dropped.
found by markus@; OK mpi@ sashan@
</content>
</entry>
<entry>
<title>Use the rt_rmx defines that hide the struct rt_kmetrics indirection.</title>
<updated>2017-04-19T15:21:54Z</updated>
<author>
<name>bluhm</name>
<email>bluhm@openbsd.org</email>
</author>
<published>2017-04-19T15:21:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=9b6a64127deb1b83dcff3be06f373dc1b5768659'/>
<id>urn:sha1:9b6a64127deb1b83dcff3be06f373dc1b5768659</id>
<content type='text'>
No binary change.
OK mpi@
</content>
</entry>
</feed>
