netproto/mpls: Fix 'cpuid' to be 'mycpuid' and thus fix buildThe typo was made by me in commit6823c302c37b3feda6c2c8b524a99daa1bcff11f.After this fix, LINT64 builds fine.
net/radix: Update rn_inithead() parameter type to avoid boring castsChange to use the proper 'struct radix_node_head **' instead of anopaque 'void **'.
Update rn_inithead() users to switch to byte offset
<net/if_var.h>: Remove last explicit dependency on <sys/malloc.h>. These kernel sources pass M_NOWAIT flag to m_copym() and friends. Mark that it was for M_NOWAIT visibility.
kernel: Minor whitespace cleanup in few sources (part 2). Separated from next.
kernel: Stop including userland-only includes in kernel code (1/x).Specifically <stdbool.h>, <arpa/inet.h>, <dlfcn.h>, <limits.h>, and<unistd.h>.Only in hammer2's zlib it needed to be exchanged
kernel: Stop including userland-only includes in kernel code (1/x).Specifically <stdbool.h>, <arpa/inet.h>, <dlfcn.h>, <limits.h>, and<unistd.h>.Only in hammer2's zlib it needed to be exchanged with a more suitableheader. The rest could be removed.
show more ...
kernel: Remove numerous #include <sys/thread2.h>.Most of them were added when we converted spl*() calls tocrit_enter()/crit_exit(), almost 14 years ago. We can nowremove a good chunk of them agai
kernel: Remove numerous #include <sys/thread2.h>.Most of them were added when we converted spl*() calls tocrit_enter()/crit_exit(), almost 14 years ago. We can nowremove a good chunk of them again for where crit_*() areno longer used.I had to adjust some files that were relying on thread2.hor headers that it includes coming in via other headersthat it was removed from.
mpls: Use netisr_ncpusReminded-by: dillon@
net: netisr_cpu -> netisr_threads; no functional changes.
mbuf: Factor function to set mbuf hash.
kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.The main reason is that our having to use the MB_WAIT and MB_DONTWAITflags was a recurring issue when porting drivers from FreeBSD
kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.The main reason is that our having to use the MB_WAIT and MB_DONTWAITflags was a recurring issue when porting drivers from FreeBSD becauseit tended to get forgotten and the code would compile anyway with thewrong constants. And since MB_WAIT and MB_DONTWAIT ended up as ocflagsfor an objcache_get() or objcache_reclaimlist call (which use M_WAITOKand M_NOWAIT), it was just one big converting back and forth with somesanitization in between.This commit allows M_* again for the mbuf functions and keeps thesanitizing as it was before: when M_WAITOK is among the passed flags,objcache functions will be called with M_WAITOK and when it is absent,they will be called with M_NOWAIT. All other flags are scrubbed by theMB_OCFLAG() macro which does the same as the former MBTOM().Approved-by: dillon
netisr: Renaming, cpufn -> hashfn; no functional changes
kernel: Make SMP support default (and non-optional).The 'SMP' kernel option gets removed with this commit, so it has tobe removed from everybody's configs.Reviewed-by: sjgApproved-by: many
kernrl: Fix LINT building for recent rn_inithead API changeReported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
kernel: Use NELEM() where we can.
network - Major netmsg retooling, part 2* Convert remaining protocols (divert, ipx, mpls, natm).* Minor code correction in gif (no operational change).* Remove NS protocol from LINT in preparat
network - Major netmsg retooling, part 2* Convert remaining protocols (divert, ipx, mpls, natm).* Minor code correction in gif (no operational change).* Remove NS protocol from LINT in preparation for complete removal from tree.
Fix LINT build.I never get why LINT isn't just checked before pushing such hugechanges. Takes just a couple of minutes, really. :)
network - Completely revamp the netisr / dispatch code* All netisrs are dispatched MPSAFE (followup in later commits)* Centralize the protocol threads. There is now just one thread per cpu man
network - Completely revamp the netisr / dispatch code* All netisrs are dispatched MPSAFE (followup in later commits)* Centralize the protocol threads. There is now just one thread per cpu managed by the netisr code. No more separate tcp/udp threads on each cpu.* Make the mbuf M_HASH/m_pkthdr.hash mechanic the central routing mechanic for netmsgs.* Remove the netisr ip_mport and pktinfo_portfn stuff and replace with a cpufn function which handles M_HASH/m_pkthdr.hash when M_HASH is not already set.* Seriously clean up the packet input paths. Adjust ether_input_chain() and friends to not have to adjust the mbuf forwards and backwards, instead pass a header offset to the ni_cpufn function. The ip pullup and other related code will use the offset to determine where the ip header is within the packet.
netisr: Add pktinfo struct; add new netisr method to find msgport using pktinfoThe new netisr method, ni_mport_pktinfo, returns NULL if the passed in pktinfodoes not contain enough information to
netisr: Add pktinfo struct; add new netisr method to find msgport using pktinfoThe new netisr method, ni_mport_pktinfo, returns NULL if the passed in pktinfodoes not contain enough information to determine the msgport.
Install pr_ctlport for the rest of the protocols.Reported-by: tomas@
Add NETISR_FLAG_NOTMPSAFE, which could be used as the last parameter tonetisr_register(), more expressive and less error-prone than 0.Suggested-by: hsu@
Add following three network protocol threads running mode:1) BGL (default)2) Adaptive BGL. Protocol threads run without BGL by default. BGL will be held if the received msg does not have MSGF_
Add following three network protocol threads running mode:1) BGL (default)2) Adaptive BGL. Protocol threads run without BGL by default. BGL will be held if the received msg does not have MSGF_MPSAFE turned on the ms_flags field3) No BGL (experimental)The code on the main path is done by dillon@Following three sysctls and tunables are added to adjust the "mode":net.netisr.mpsafe_threadnet.inet.tcp.mpsafe_threadnet.inet.udp.mpsafe_threadThey have same set of values,0 (default) -- BGL1 -- Adaptive BGL2 -- No BGLNETISR_FLAG_MPSAFE is added (netisr.ni_flags), so that:- netisr_queue() and schednetisr() could set MSGF_MPSAFE during msg initialization- netisr_run() (called by ether_input_oncpu()) could hold BGL based on this flag before calling netisr's handlerPR_MPSAFE is added (protosw.pr_flags), so that tranport_processing_oncpu() couldhold BGL before calling protocol's input handlerKernel API changes:- The thread parameter to netmsg_service_loop() must be supplied (running mode) and it must have the type of "int *"- netisr_register() takes additional flags parameter to indicate whether its handler is MPSAFE (NETISR_FLAG_MPSAFE) or notReviewed-by: dillon@
* Don't call ifp->if_output() from inside mpls_output(). Make the caller responsible for sending the packet.* Fix mpls gateway arp resoving.* Introduce a new mbuf flag M_MPLSLABELED indicating
* Don't call ifp->if_output() from inside mpls_output(). Make the caller responsible for sending the packet.* Fix mpls gateway arp resoving.* Introduce a new mbuf flag M_MPLSLABELED indicating that the packet has at least one valid mpls label on it.* Use the new mbuf flag instead of forging a sockaddr_mpls to let ether_output() identify the mpls packets.* Drop the packet when mpls ttl is exceeded (doesn't send an ICMP message yet).* Fix compilation warning.* Improve comments.
Add 'options MPLS' to LINT.Remove comment.
Introduce experimental MPLS over ethernet support. Add 'options MPLS'to the kernel config file to enable it. This modification increasesthe footprint of each route in the FIB by 12 bytes, used to h
Introduce experimental MPLS over ethernet support. Add 'options MPLS'to the kernel config file to enable it. This modification increasesthe footprint of each route in the FIB by 12 bytes, used to hold upto 3 label operations per route.Hints-from: Ayame, NiSTswitch implementations.Reviewed-by: dillon@, sephe@, hsu@, hasso@.