<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/compat/linux/linux_if.c, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>linux: on vnet detach call clean_unrhdr(9) always</title>
<updated>2026-01-15T21:37:34+00:00</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2026-01-15T21:37:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f9ae08a88924ba861ad0bb76f5a9a11fb44eced8'/>
<id>f9ae08a88924ba861ad0bb76f5a9a11fb44eced8</id>
<content type='text'>
The assumption was incorrect, and the current VIMAGE implementation leaves
a possibility for some interfaces still exist in a jail that is going
away.

Fixes:	607f11055d2d421770963162a4d9a99cdd136152
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The assumption was incorrect, and the current VIMAGE implementation leaves
a possibility for some interfaces still exist in a jail that is going
away.

Fixes:	607f11055d2d421770963162a4d9a99cdd136152
</pre>
</div>
</content>
</entry>
<entry>
<title>linux: fix unr(9) leak on module unload</title>
<updated>2025-12-10T21:52:45+00:00</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2025-12-10T21:52:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=45b3846ae5aa941fa241e9417d5877a94b5c4ba4'/>
<id>45b3846ae5aa941fa241e9417d5877a94b5c4ba4</id>
<content type='text'>
Suggested by:	jhb
Fixes:		607f11055d2d421770963162a4d9a99cdd136152
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Suggested by:	jhb
Fixes:		607f11055d2d421770963162a4d9a99cdd136152
</pre>
</div>
</content>
</entry>
<entry>
<title>linux: fix panic on kldunload</title>
<updated>2025-12-10T19:20:14+00:00</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2025-12-10T19:20:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=89eddfb4b9f5d744623ce0ee8ea966b0d33456e5'/>
<id>89eddfb4b9f5d744623ce0ee8ea966b0d33456e5</id>
<content type='text'>
The vnet_deregister_sysuninit() that is called by linker unload sequence also
calls every registered destructor before unregistering it.  IMHO, this is
not correct in principle, but for now plug the regression right in the code
that introduced the panic.

Fixes:	607f11055d2d421770963162a4d9a99cdd136152
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The vnet_deregister_sysuninit() that is called by linker unload sequence also
calls every registered destructor before unregistering it.  IMHO, this is
not correct in principle, but for now plug the regression right in the code
that introduced the panic.

Fixes:	607f11055d2d421770963162a4d9a99cdd136152
</pre>
</div>
</content>
</entry>
<entry>
<title>linux: fix build without VIMAGE</title>
<updated>2025-12-09T17:42:19+00:00</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2025-12-09T17:42:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0f12ee8ae1a81598541b703ba25b250dedff7803'/>
<id>0f12ee8ae1a81598541b703ba25b250dedff7803</id>
<content type='text'>
Fixes:	fbf05d2147b1add8b760be166c4b1fd4499ebce8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes:	fbf05d2147b1add8b760be166c4b1fd4499ebce8
</pre>
</div>
</content>
</entry>
<entry>
<title>linux: store Linux Ethernet interface number in struct ifnet</title>
<updated>2025-12-08T17:20:22+00:00</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2025-12-08T17:20:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=607f11055d2d421770963162a4d9a99cdd136152'/>
<id>607f11055d2d421770963162a4d9a99cdd136152</id>
<content type='text'>
The old approach where we go through the list of interfaces and count them
has bugs.  One obvious bug with this dynamic translation is that once an
Ethernet interface in the middle of the list goes away, all interfaces
following it would change their Linux names.

A bigger problem is the ifnet arrival and departure times.  For example
linsysfs has event handler for ifnet_arrival_event, and of course it wants
to resolve the name.  This accidentially works, due to a bug in
if_attach() where we call if_link_ifnet() before invoking all the event
handlers.  Once the bug is fixed linsysfs won't be able to resolve the old
way.  The other side is ifnet_departure_event, where there is no bug, the
eventhandlers are called after the if_unlink_ifnet().  This means old
translation won't work for departure event handlers.  One example is
netlink.  This change gives the Netlink a chance to emit a proper Linux
interface departure message.

However, there is another problem in Netlink, that the ifnet pointer is
lost in the Netlink translation layer.  Plug this with a cookie in netlink
writer structure that can be set by the route layer and used by the Netlink
Linux translation layer.  This part of the diff seems unrelated, but it is
hard to make it a separate change, as the old KPI goes away and to use the
new one we need the pointer.

Differential Revision:	https://reviews.freebsd.org/D54077
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The old approach where we go through the list of interfaces and count them
has bugs.  One obvious bug with this dynamic translation is that once an
Ethernet interface in the middle of the list goes away, all interfaces
following it would change their Linux names.

A bigger problem is the ifnet arrival and departure times.  For example
linsysfs has event handler for ifnet_arrival_event, and of course it wants
to resolve the name.  This accidentially works, due to a bug in
if_attach() where we call if_link_ifnet() before invoking all the event
handlers.  Once the bug is fixed linsysfs won't be able to resolve the old
way.  The other side is ifnet_departure_event, where there is no bug, the
eventhandlers are called after the if_unlink_ifnet().  This means old
translation won't work for departure event handlers.  One example is
netlink.  This change gives the Netlink a chance to emit a proper Linux
interface departure message.

However, there is another problem in Netlink, that the ifnet pointer is
lost in the Netlink translation layer.  Plug this with a cookie in netlink
writer structure that can be set by the route layer and used by the Netlink
Linux translation layer.  This part of the diff seems unrelated, but it is
hard to make it a separate change, as the old KPI goes away and to use the
new one we need the pointer.

Differential Revision:	https://reviews.freebsd.org/D54077
</pre>
</div>
</content>
</entry>
<entry>
<title>linux: separate all ifnet(9) related code into linux_ifnet.c</title>
<updated>2025-12-08T17:20:14+00:00</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2025-12-08T17:20:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fbf05d2147b1add8b760be166c4b1fd4499ebce8'/>
<id>fbf05d2147b1add8b760be166c4b1fd4499ebce8</id>
<content type='text'>
Remove linux_use_real_ifname().  It is no longer used outside of the
file since 3ab3c9c29cf0.  There is no functional change.

Reviewed by:		melifaro, dchagin
Differential Revision:	https://reviews.freebsd.org/D54076
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove linux_use_real_ifname().  It is no longer used outside of the
file since 3ab3c9c29cf0.  There is no functional change.

Reviewed by:		melifaro, dchagin
Differential Revision:	https://reviews.freebsd.org/D54076
</pre>
</div>
</content>
</entry>
</feed>
