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)
Thu, Apr 18, 3:48 PM
Unknown Object (File)
Dec 20 2023, 8:14 AM
Unknown Object (File)
Dec 12 2023, 10:39 AM
Unknown Object (File)
Dec 2 2023, 6:23 PM
Unknown Object (File)
Jun 25 2023, 6:01 PM
Unknown Object (File)
May 4 2023, 8:46 AM
Unknown Object (File)
Apr 6 2023, 9:55 PM
Unknown Object (File)
Mar 20 2023, 3:29 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.