Page MenuHomeFreeBSD

lo: Use new KPI to create the first loop interface
ClosedPublic

Authored by zlei on Jun 25 2024, 10:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 27, 7:59 AM
Unknown Object (File)
Feb 22 2025, 2:14 PM
Unknown Object (File)
Feb 22 2025, 1:30 PM
Unknown Object (File)
Feb 20 2025, 10:41 AM
Unknown Object (File)
Feb 17 2025, 7:01 PM
Unknown Object (File)
Feb 5 2025, 4:20 AM
Unknown Object (File)
Jan 31 2025, 2:28 AM
Unknown Object (File)
Jan 27 2025, 1:35 PM
Subscribers

Details

Summary

While here remove a pointless assignment to static local variable lo_cloner.

No functional change intended.

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei requested review of this revision.Jun 25 2024, 10:00 AM
zlei added inline comments.
sys/net/if_loop.c
126

if_alloc() never fail since 4787572d0580 .

kp added a subscriber: kp.

I was initially worried that we'd change the behaviour of V_loif here, in that it'd get updated every time we create a new loopback interface, but I was wrong. We only set V_loif (although now via ifc_create_ifp() indirectly, rather that from lo_clone_create()) for the first, automatically created, interface.

This revision is now accepted and ready to land.Jun 25 2024, 12:21 PM
In D45728#1042970, @kp wrote:

I was initially worried that we'd change the behaviour of V_loif here, in that it'd get updated every time we create a new loopback interface, but I was wrong. We only set V_loif (although now via ifc_create_ifp() indirectly, rather that from lo_clone_create()) for the first, automatically created, interface.

lo: Use new KPI to create the first loop interface

Emm, I think the word assign is more accurate than create.