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)
Sun, May 5, 2:42 AM
Unknown Object (File)
Apr 20 2024, 1:49 AM
Unknown Object (File)
Apr 5 2024, 3:34 PM
Unknown Object (File)
Mar 27 2024, 8:06 AM
Unknown Object (File)
Mar 21 2024, 6:20 AM
Unknown Object (File)
Mar 7 2024, 11:49 PM
Unknown Object (File)
Jan 30 2024, 9:03 PM
Unknown Object (File)
Jan 21 2024, 11:13 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.