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)
Fri, Nov 22, 5:54 PM
Unknown Object (File)
Tue, Oct 29, 2:06 AM
Unknown Object (File)
Oct 14 2024, 9:51 PM
Unknown Object (File)
Sep 13 2024, 6:17 AM
Unknown Object (File)
Sep 11 2024, 7:58 PM
Unknown Object (File)
Sep 2 2024, 3:09 PM
Unknown Object (File)
Aug 9 2024, 11:32 PM
Unknown Object (File)
Jul 24 2024, 8:42 PM

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.