<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/net, branch release/13.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F13.2.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F13.2.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2023-03-15T13:39:55Z</updated>
<entry>
<title>epair: Simplify the transmit path and address lost wakeups</title>
<updated>2023-03-15T13:39:55Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2023-03-01T20:21:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5e49311e0177932e0f0323fd547eedb4e50bbb4d'/>
<id>urn:sha1:5e49311e0177932e0f0323fd547eedb4e50bbb4d</id>
<content type='text'>
epairs currently shuttle all transmitted packets through a single global
taskqueue thread.  To hand packets over to the taskqueue thread, each
epair maintains a pair of ring buffers and a lockless scheme for
notifying the thread of pending work.  The implementation can lead to
lost wakeups, causing to-be-transmitted packets to end up stuck in the
queue.

Rather than extending the existing scheme, simply replace it with a
linked list protected by a mutex, and use the mutex to synchronize
wakeups of the taskqueue thread.  This appears to give equivalent or
better throughput with &gt;= 16 producer threads and eliminates the lost
wakeups.

Approved by:	re (cperciva)
Reviewed by:	kp
MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	Modirum MDPay
Differential Revision:	https://reviews.freebsd.org/D38843

(cherry picked from commit df7bbd8c354a907d2c2f85a6e18f356f76458f57)
(cherry picked from commit 762ad964ee346cffdbf3eaa6ff87fa5b32d30738)
</content>
</entry>
<entry>
<title>epair: Avoid loading m_flags into a short</title>
<updated>2023-03-15T13:39:34Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2023-03-06T14:39:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6b488550ee57dc09b7d564aa22f9feb61778a89f'/>
<id>urn:sha1:6b488550ee57dc09b7d564aa22f9feb61778a89f</id>
<content type='text'>
The m_flags field of struct mbuf is 24 bits wide and so gets truncated
in a couple of places in the epair code.  Instead of preserving the
entire flag set, just remember whether M_BCAST or M_MCAST is set.

Approved by:	re (cperciva)
MFC after:	1 week
Sponsored by:	Klara, Inc.

(cherry picked from commit 48227d1c6db8fceaceebbf8578612302d64ca170)
(cherry picked from commit c3bd32f225ec093ba0f7cd7fc1a000b02aad5211)
</content>
</entry>
<entry>
<title>netlink: fix addition of blackhole/reject routes.</title>
<updated>2023-02-27T16:27:16Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2023-02-23T17:38:18Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7dea81a4ed19e18a6f1104f14cd3e0ce57c8f5f5'/>
<id>urn:sha1:7dea81a4ed19e18a6f1104f14cd3e0ce57c8f5f5</id>
<content type='text'>
* Make nhop_set_blackhole() set all necessary properties for the
 nexthop
* Make nexthops blackhole/reject based on the rtm_type netlink
 property instead of using rtflags.

Reported by:	Marek Zarychta &lt;zarychtam@plan-b.pwste.edu.pl&gt;
MFC after:	3 days
Approved by:	re(cperciva)

(cherry picked from commit d2deebe21b591336fbd8915b37d409b25da54d4d)
(cherry picked from commit f054a56ef3e8dc30ba0904d43cf7ec7b3e6e0ed4)
</content>
</entry>
<entry>
<title>routing: always pass rtentry to add_route_flags().</title>
<updated>2023-02-20T19:48:31Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2023-02-17T17:20:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=16d16c4fcd72f8ce86fce64eb10a4a466c46b8e0'/>
<id>urn:sha1:16d16c4fcd72f8ce86fce64eb10a4a466c46b8e0</id>
<content type='text'>
add_route_flags() uses `rt` prefix data to lookup the the current
 rtentry from the routing table. Update rib_add_route_px() to
 always pass rtentry regardless of the op_flags.

Reported by:	Stefan Grundmann &lt;sg2342@googlemail.com&gt;
Approved by:    re(cperciva)
MFC after:	1 day

(cherry picked from commit a0aa160b6d261f67b29a25c7cc5e04668fb6faf7)
(cherry picked from commit 45ced2987df29a8587df2ad3c9ea0ddb1998aa16)
</content>
</entry>
<entry>
<title>iflib: Add null check to iflib_stop()</title>
<updated>2023-02-07T00:16:02Z</updated>
<author>
<name>Przemyslaw Lewandowski</name>
<email>przemyslawx.lewandowski@intel.com</email>
</author>
<published>2023-01-24T23:41:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4ad47cfc1458263564dfecf483c5dfc253008b6f'/>
<id>urn:sha1:4ad47cfc1458263564dfecf483c5dfc253008b6f</id>
<content type='text'>
Ever since gtaskqueue_drain() was added to iflib_stop(), a kernel panic
occurs when the ice(4) driver is in recovery mode. Queues are not
initialized in this mode, so gt_taskqueue is not initialized, and
gtaskqueue_drain() will panic.

Fix this by only doing a drain if an RX queue's gt_taskqueue is
initialized.

Signed-off-by: Eric Joyner &lt;erj@FreeBSD.org&gt;

Reviewed by:	erj@
MFC after:	1 week
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D37892

(cherry picked from commit 9147969bc277b389a62373c6a5050a2ebfd39071)
</content>
</entry>
<entry>
<title>bridge: Fix whitespace</title>
<updated>2023-02-06T14:20:24Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2023-01-24T16:00:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=17b95975d1de1f147f27107bf33d118a0c919b00'/>
<id>urn:sha1:17b95975d1de1f147f27107bf33d118a0c919b00</id>
<content type='text'>
No functional change intended.

MFC after:	1 week

(cherry picked from commit 92b7d1db9291f11fa56e2c88f70149f319e31622)
</content>
</entry>
<entry>
<title>pf: fix syncookies in conjunction with tcp fast port reuse</title>
<updated>2023-01-28T01:34:38Z</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2022-12-31T14:59:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=14f52003bd8ae8884fcf8223e2170a7d76a39006'/>
<id>urn:sha1:14f52003bd8ae8884fcf8223e2170a7d76a39006</id>
<content type='text'>
Basic scenario: we have a closed connection (In TCPS_FIN_WAIT_2), and
get a new connection (i.e. SYN) re-using the tuple.

Without syncookies we look at the SYN, and completely unlink the old,
closed state on the SYN.
With syncookies we send a generated SYN|ACK back, and drop the SYN,
never looking at the state table.

So when the ACK (i.e. the third step in the three way handshake for
connection setup) turns up, we’ve not actually removed the old state, so
we find it, and don’t do the syncookie dance, or allow the new
connection to get set up.

Explicitly check for this in pf_test_state_tcp(). If we find a state in
TCPS_FIN_WAIT_2 and the syncookie is valid we delete the existing state
so we can set up the new state.
Note that when we verify the syncookie in pf_test_state_tcp() we don't
decrement the number of half-open connections to avoid an incorrect
double decrement.

MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D37919

(cherry picked from commit 9c041b450d5e604c3e35b5799b60a2c53795feef)
</content>
</entry>
<entry>
<title>Add device and ifnet logging methods, similar to device_printf / if_printf</title>
<updated>2023-01-24T04:42:53Z</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2021-03-21T18:49:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=cc50ec0289bca8f9e906f5c46e0c56b4681ce8f2'/>
<id>urn:sha1:cc50ec0289bca8f9e906f5c46e0c56b4681ce8f2</id>
<content type='text'>
* device_printf() is effectively a printf
* if_printf() is effectively a LOG_INFO

This allows subsystems to log device/netif stuff using different log levels,
rather than having to invent their own way to prefix unit/netif  names.

Differential Revision: https://reviews.freebsd.org/D29320
Reviewed by: imp

(cherry picked from commit 25bfa448602cac74723115d0b0bd145ac795b685)
</content>
</entry>
<entry>
<title>nhop: hash ifnet pointer instead of if_index</title>
<updated>2023-01-23T22:10:07Z</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2021-12-04T18:05:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=16ae7b665c7eac41fc717d9f09da2a2fb4ed1973'/>
<id>urn:sha1:16ae7b665c7eac41fc717d9f09da2a2fb4ed1973</id>
<content type='text'>
Yet another problem created by VIMAGE/if_vmove/epair design that
relocates ifnet between vnets and changes if_index.  Since if_index
changes, nhop hash values also changes, unlink_nhop() isn't able to
find entry in hash and leaks the nhop.  Since nhop references ifnet,
the latter is also leaked.  As result running network tests leaks
memory on every single test that creates vnet jail.

While here, rewrite whole hash_priv() to use static initializer,
per Alexander's suggestion.

Reviewed by:	melifaro

(cherry picked from commit ad2a0aec295478e750158b8985422f15deee0e54)
</content>
</entry>
<entry>
<title>if_clone: rework cloning KPI</title>
<updated>2023-01-23T22:10:07Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2022-09-22T09:37:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0edb2cd13d895dc439915c25dee172f9e878c45a'/>
<id>urn:sha1:0edb2cd13d895dc439915c25dee172f9e878c45a</id>
<content type='text'>
The current cloning KPI does not provide a way of creating interfaces
 with parameres from within kernel. The reason is that those parameters
 are passed as an opaque pointer and it is not possible to specify whether
 this pointer references kernel-space or user-space.
Instead of just adding a flag, generalise the KPI to simplify the
 extension process. Unify current notion of `SIMPLE` and `ADVANCED` users
 by leveraging newly-added IFC_C_AUTOUNIT flag to automatically pick
 unit number, which is a primary feature of the "SIMPLE" KPI.
Use extendable structures everywhere instead of passing function
 pointers or parameters.
Isolate all parts of the oldKPI under `CLONE_COMPAT_13` so it can be safely
 merged back to 13. Old KPI will be removed after the merge.

Differential Revision: https://reviews.freebsd.org/D36632
MFC after:	2 weeks

(cherry picked from commit 09ee0fc023c0c7ef90cb277afbb473abe4d95a9a)
</content>
</entry>
</feed>
