]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add an optional netisr dispatch point at ether_input(), but set the
authorRobert Watson <rwatson@FreeBSD.org>
Wed, 1 Jun 2011 20:00:25 +0000 (20:00 +0000)
committerRobert Watson <rwatson@FreeBSD.org>
Wed, 1 Jun 2011 20:00:25 +0000 (20:00 +0000)
commit6cb52192fe183e3722055a4226c805a3fd9d6d55
treedb9e615743cd8b23ad0526c592b890815327a237
parent281d42c371ac462aae2c701705e077327cdce367
Add an optional netisr dispatch point at ether_input(), but set the
default dispatch method to NETISR_DISPATCH_DIRECT in order to force
direct dispatch.  This adds a fairly negligble overhead without
changing default behavior, but in the future will allow deferred or
hybrid dispatch to other worker threads before link layer processing
has taken place.

For example, this could allow redistribution using RSS hashes
without ethernet header cache line hits, if the NIC was unable to
adequately implement load balancing to too small a number of input
queues -- perhaps due to hard queueset counts of 1, 3, or 8, but in
a modern system with 16-128 threads.  This can happen on highly
threaded systems, where you want want an ithread per core,
redistributing work to other queues, but also on virtualised systems
where hardware hashing is (or is not) available, but only a single
queue has been directed to one VCPU on a VM.

Note: this adds a previously non-present assertion about the
equivalence of the ifnet from which the packet is received, and the
ifnet stamped in the mbuf header.  I believe this assertion to
generally be true, but we'll find out soon -- if it's not, we might
have to add additional overhead in some cases to add an m_tag with
the originating ifnet pointer stored in it.

Reviewed by:    bz
MFC after:      3 weeks
Sponsored by:   Juniper Networks, Inc.
sys/net/if_ethersubr.c