Page MenuHomeFreeBSD

IfAPI: Add l2com accessor for firewire.
ClosedPublic

Authored by jhibbits on Jan 25 2023, 9:32 PM.
Tags
None
Referenced Files
F134217883: D38203.diff
Fri, Oct 31, 5:30 PM
Unknown Object (File)
Tue, Oct 28, 6:24 PM
Unknown Object (File)
Tue, Oct 21, 6:38 PM
Unknown Object (File)
Sep 21 2025, 2:00 AM
Unknown Object (File)
Sep 2 2025, 4:52 PM
Unknown Object (File)
Aug 27 2025, 12:56 AM
Unknown Object (File)
Aug 7 2025, 9:07 AM
Unknown Object (File)
Jul 29 2025, 10:21 PM
Subscribers

Details

Summary

There may be a better spot for this, since it's *only* used for
Firewire, all other accesses of ifp->if_l2com are handled within the
netstack.

Sponsored by: Juniper Networks, Inc.

Diff Detail

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

Event Timeline

melifaro added inline comments.
sys/net/if.c
4944

Maybe it's worth returning struct fw_com * so we don't need an explicit typecast afterwards?

This revision is now accepted and ready to land.Jan 27 2023, 9:47 AM
sys/net/if.c
4944

It would need to be a more specific name then, because if_l2com is general L2 private data used elsewhere directly by the netstack. Firewire is using it for its own L2 bits.

sys/net/if.c
4944

Makes sense. Anyway, It'll probably be entirely eliminated in 15, so I guess it doesn't matter much.

In the original BSD stack if_l2com was used by multiple subsystems. Today firewire is the very last user of if_register_com_alloc() and thus of if_com_alloc[] array. The ng_ether(4) is the second last user of if_l2com field itself. Given that firewire is already an obsoleted driver, I don't see a good reason to provide official API to access this field. But if the API as marked as destined to be removed soon, I don't mind.

I'm working on a patch that would remove if_l2com use from firewire. However, I have nothing to test it on. My last firewire was 3 mainboards ago :)

Please commit whatever version that fits your work, on the second thought I don't think it is worth investing much time in firewire.

This revision was automatically updated to reflect the committed changes.