Page MenuHomeFreeBSD

IfAPI: Add l2com accessor for firewire.
ClosedPublic

Authored by jhibbits on Jan 25 2023, 9:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 9:05 AM
Unknown Object (File)
Oct 3 2024, 1:58 AM
Unknown Object (File)
Oct 3 2024, 12:52 AM
Unknown Object (File)
Oct 2 2024, 10:58 PM
Unknown Object (File)
Sep 23 2024, 5:12 PM
Unknown Object (File)
Sep 23 2024, 3:59 AM
Unknown Object (File)
Sep 22 2024, 10:21 PM
Unknown Object (File)
Sep 19 2024, 2:45 AM
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.