Page MenuHomeFreeBSD

if_vlan: add the ALTQ support to if_vlan.
ClosedPublic

Authored by kp on Aug 23 2021, 3:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 20, 9:48 AM
Unknown Object (File)
Sun, Oct 19, 5:51 PM
Unknown Object (File)
Sun, Oct 12, 12:44 AM
Unknown Object (File)
Sep 23 2025, 8:14 AM
Unknown Object (File)
Sep 23 2025, 8:14 AM
Unknown Object (File)
Sep 22 2025, 6:59 PM
Unknown Object (File)
Sep 14 2025, 12:24 AM
Unknown Object (File)
Sep 14 2025, 12:23 AM

Details

Summary

Inspired by the iflib implementation, allow ALTQ to be used with if_vlan
interfaces.

Obtained from: pfsense
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41171
Build 38060: arc lint + arc unit

Event Timeline

kp requested review of this revision.Aug 23 2021, 3:52 PM
donner added inline comments.
sys/net/if_vlan.c
1290

May I ask for an one line description for each of the functions?

1322

Is this the same functionality as vlan_altq_start()?

sys/net/if_vlan.c
1290

These are the standard 'if_start()' functions, common to a lot of network drivers. To the extent that it's documented in the ifnet(9) man page.

In essence there are two ways of telling a driver to transmit a packet, if_start(), where the packet is taken from the driver's ifq and the newer if_transmit() where the packet is handed directly to the function.

ALTQ uses the driver's ifq during packet scheduling, so it only works when drivers implement if_start().

1322

I'm assuming this was meant to point at vlan_altq_transmit().

In that case: "Yes, sort of.". I believe this is an optimisation. In case ALTQ is not enabled we fall back to vlan_transmit(), and don't queue up the packet at all.

This revision is now accepted and ready to land.Aug 24 2021, 8:22 AM
This revision was automatically updated to reflect the committed changes.