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)
Fri, Oct 10, 5:01 AM
Unknown Object (File)
Wed, Sep 24, 1:47 PM
Unknown Object (File)
Sat, Sep 13, 12:58 AM
Unknown Object (File)
Sep 3 2025, 4:02 PM
Unknown Object (File)
Aug 18 2025, 11:57 AM
Unknown Object (File)
Aug 15 2025, 11:50 PM
Unknown Object (File)
Aug 13 2025, 8:10 AM
Unknown Object (File)
Aug 12 2025, 9:14 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.