With RSS, epair_select_queue() hashes a packet that carries no RSS hash
with rss_soft_m2cpuid_v4() or rss_soft_m2cpuid_v6(), which read the IP
header at the start of the mbuf. On transmit the mbuf starts with the
Ethernet header, so the hash covered the MAC addresses, the EtherType
and the first bytes of the IP header, the IPv4 total length and
identification among them. The packets of one flow were spread over the
queues by their IP ID and delivered out of order, and the value was
stored in the mbuf as an RSS hash for the receiving side to use.
Step over the Ethernet header, and over inline 802.1Q or 802.1ad tags,
while the software hash runs. A tag is inline when vlan(4) or a bridge
member runs without VLAN_HWTAGGING, always for 802.1ad, and
for the inner tag of stacked vlans; those frames previously went to the
first queue unhashed. Frames with more than two tags still do.
Fixes: 24f0bfbad57b ("if_epair: implement fanout")
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")