Page MenuHomeFreeBSD

linux: Add STF type and convert some if_type to ARPHRD
ClosedPublic

Authored by pouria on Jul 31 2026, 2:31 PM.
Tags
None
Referenced Files
F171017125: D58573.id.diff
Tue, Sep 8, 5:23 AM
F171014341: D58573.id.diff
Tue, Sep 8, 4:56 AM
F170999844: D58573.id184377.diff
Tue, Sep 8, 2:48 AM
Unknown Object (File)
Sun, Sep 6, 4:48 AM
Unknown Object (File)
Sun, Sep 6, 2:06 AM
Unknown Object (File)
Sun, Sep 6, 12:36 AM
Unknown Object (File)
Sun, Sep 6, 12:35 AM
Unknown Object (File)
Fri, Sep 4, 7:30 PM
Subscribers

Details

Summary

Convert IFT_BRIDGE and IFT_L2VLAN to ARPHRD_ETHER, and IFT_LOOP
to ARPHRD_LOOPBACK in linux netlink.
Also, add ARPHRD_SIT and convert IFT_STF to it.

Test Plan

test ip link show under linux compat:

root@ftsr1:/# ip link sh stf0
16: stf0: <> mtu 1280 qdisc noqueue state DOWN qlen 1000
link/sit
root@ftsr1:/# ip link sh vlan0
15: vlan0@bridge0: <BROADCAST,MULTICAST> mtu 1496 qdisc noqueue state UNKNOWN qlen 1000
link/ether 58:9c:fc:10:8c:9b brd ff:ff:ff:ff:ff:ff
root@ftsr1:/# ip link sh bridge0
12: bridge0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether 58:9c:fc:10:8c:9b brd ff:ff:ff:ff:ff:ff

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75747
Build 72630: arc lint + arc unit

Event Timeline

pouria edited the test plan for this revision. (Show Details)

Looks good to me, but while you're here, could we also map IFT_LOOP -> LINUX_ARPHRD_LOOPBACK so a Linux ip link show lo under the linuxulator does not look like FireWire? The constant already exists. Fine as a follow-up if you want to keep this patch to bridge/vlan/stf.

This revision is now accepted and ready to land.Wed, Aug 19, 6:51 PM
This revision now requires review to proceed.Wed, Aug 19, 7:02 PM
This revision is now accepted and ready to land.Wed, Aug 19, 7:05 PM
pouria retitled this revision from linux: Add STF type and convert if_bridge and if_vlan to ARPHRD_ETHER to linux: Add STF type and convert some if_type to ARPHRD.Wed, Aug 19, 7:06 PM
pouria edited the summary of this revision. (Show Details)