Commit 868aabb4708d introduced per-flow priority. Modern network interfacesThere's a fault in the
can do hardware VLAN tag insertion. Flogic for untagged traffic, when theit does not check M_VLANTAG which is set in
interface is not enabled with PCP tagging, aka `ifconfig em0 -pcp`,the mbuf packet header and pass the mbuf to underlaying interface. itWhen
happens to work due to driver bugs mentioned in D39499. From code review,the driver is incapable or disabled to do hardware VLAN tag insertion then
I can conclude that if the interface does not support hardware VLAN insertionthe outbound packets will not include the desired priority.
Some drivers happen to work due to bug mentioned in D39499, so it may not
then it will not workrepeat on those drivers.
Fix by checking flag M_VLANTAG which is set in mbuf packet header, so thatThe current logic also bypass soft pad processing and checking priority
per-flow PCP for untagged traffic will work on bothset by firewall (currently only pf).
Fix by checking flag M_VLANTAG which is set in mbuf packet header and
1. Strict drivers that check hardware VLAN insertion
2. Network interfaces that do not support hardware VLAN insertionpriority set in mbuf tag MTAG_8021Q / MTAG_8021Q_PCP_OUT.
PR: [[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273431|273431]]
Fixes: 868aabb4708d Add IP(V6)_VLAN_PCP to set 802.1 priority per-flow
MFC after: 1 week