]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Update the IPv4 input path to handle reassembled frames and incoming frames
authorAdrian Chadd <adrian@FreeBSD.org>
Tue, 9 Sep 2014 04:18:20 +0000 (04:18 +0000)
committerAdrian Chadd <adrian@FreeBSD.org>
Tue, 9 Sep 2014 04:18:20 +0000 (04:18 +0000)
commitb8bc95cd49446231025df4b1e66b254dff00805f
tree59739774455d072e4a5e4d95532793cd8377ce3e
parente18f344b9b6da81bf5eb2f5aadd7e93ef304549d
Update the IPv4 input path to handle reassembled frames and incoming frames
with no RSS hash.

When doing RSS:

* Create a new IPv4 netisr which expects the frames to have been verified;
  it just directly dispatches to the IPv4 input path.
* Once IPv4 reassembly is done, re-calculate the RSS hash with the new
  IP and L3 header; then reinject it as appropriate.
* Update the IPv4 netisr to be a CPU affinity netisr with the RSS hash
  function (rss_soft_m2cpuid) - this will do a software hash if the
  hardware doesn't provide one.

NICs that don't implement hardware RSS hashing will now benefit from RSS
distribution - it'll inject into the correct destination netisr.

Note: the netisr distribution doesn't work out of the box - netisr doesn't
query RSS for how many CPUs and the affinity setup.  Yes, netisr likely
shouldn't really be doing CPU stuff anymore and should be "some kind of
'thing' that is a workqueue that may or may not have any CPU affinity";
that's for a later commit.

Differential Revision: https://reviews.freebsd.org/D527
Reviewed by: grehan
sys/net/netisr.h
sys/netinet/in_var.h
sys/netinet/ip_input.c