icmp: Asynchonize ctlinput/mtudisc/redirect processing
Supportive facilities added:
- Embed netmsg_ctlinput into mbuf (used by input ICMP datagram) so that
we don't need to do additional memory allocation to forward the
pr_ctlinput to all netisrs for certain types of ICMP datagrams.
- Add/Expose so_pr_ctlport().
- Return target netisr's cpuid from pr_ctlport. If the returned cpuid
equals to ncpus, it means that pr_ctlinput needs to be run in all
netisrs.
- Support 'direct' mode for TCP/UDP's pr_ctlinput. The caller of the
'direct' mode pr_ctlinput will do the message forwarding.
ICMP pr_ctlinput/mtudisc/redirect processing changes:
- For mtudisc and redirect we unconditionally forward the message
embedded in input ICMP datagram to all netisrs, and call pr_ctlinput
in 'direct' mode.
- For pr_ctlinput, we first call so_pr_ctlport() to see whether we need
to forward the message embedded in input ICMP datagram to all netisrs,
and act accordingly.
- Once pr_ctlinput/mtudisc/redirect processing is done, the message
embedded in the input ICMP datagram is forwarded back to the netisr0
to run rip_input().
After this commit, netisr0 will not be blocked for ICMP pr_ctlinput/
mtudisc/redirect processing. This also fixes the mtudisc (originally
only cpu0's routes get mtu updates).
15 files changed: