kernel - Fix localhost packet misordering
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 4 Nov 2011 05:25:31 +0000 (22:25 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 4 Nov 2011 05:46:03 +0000 (22:46 -0700)
commit392cd266cf0fd6bc128fba0cd2b0cf1f757f5628
treefb3324b3a52a613a914beaf64c42db5e73a28d74
parent919eb2192b0e38503be55613615e752194429107
kernel - Fix localhost packet misordering

* netisr thread ports are based on IPIs, but when we enable asynch socket
  writes a user thread which gets moved between cpus sending async netmsgs
  while doing so can result in the netisr receiving those messages out
  of order, corrupting the data stream.

* Add TDF_FORCE_SPINPORT to allow the netisr threads to implement their
  message ports as spinports instead of threadports, which guarantees
  message ordering.
sys/kern/lwkt_thread.c
sys/net/if.c
sys/net/netisr.c
sys/sys/thread.h