ixl_set_rss_pctypes() enables the UDP packet classifier types only when
rss_gethashconfig() asks for UDP to be hashed on its ports, and the
IPv4 and IPv6 types do not cover UDP. The kernel hashes UDP on the
addresses unless net.inet.rss.udp_4tuple is set, so by default UDP is
not hashed at all and all UDP traffic arrives on one receive queue.
Kernels with options RSS have been affected since the driver started
using rss_gethashconfig(), and since dd615b57df62 all kernels are.
When the kernel does not ask for the UDP ports, enable the UDP types
and take the ports out of their hash input sets, so UDP is hashed on
the addresses, as the kernel does, and report those packets as
M_HASHTYPE_RSS_IPV4 or M_HASHTYPE_RSS_IPV6, so that the stack uses the
hash instead of computing one in software. The X722 has unicast and
multicast UDP types of its own, which the driver never enabled; enable
them with the others. Enable the fragment types with the IPv4 and
IPv6 ones instead of leaving IPv4 fragments unhashed and IPv6 fragments
to the IPv6 extension header type.
SCTP has types of its own too, which the driver never enabled, so SCTP
always arrived on one queue. The kernel has no hash type for SCTP and
ixl already reports it as an IP hash: enable the SCTP types with the
IP ones, hashed on the addresses (the ports and the verification tag
come out of their input sets). The X722 also classifies TCP SYNs
without ACK into types of their own, which were never enabled either,
so SYNs were not hashed on the X722; enable them with the TCP types.
The IPv6 types serve the _EX hash types too.
The input sets are global to the device and are left alone in
partitioned (NPAR or Flex-10) mode, where other partitions share them.
UDP is then still enabled and hashed on the ports.
Reported by: Patrick Sanderson
Fixes: dd615b57df62 ("ixl: use newly exposed RSS hash key...")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")