busdma - Remove filter functionality - Remove filtfunc and filtarg arguments from bus_dma_tag_create() and fix all callers. All callers use NULL today for both filterfunc and filterarg with one exception: if_jme. - Remove filter functionality internally and parent tag tracking. Without filter functions, we do not need to keep track of tag ancestry. All inheritance of the parent tag's parameters occurs when creating the new child tag. - rename run_filter() to addr_needs_bounce(). - FreeBSD keeps the filtfunc and filtarg arguments but requires them to be NULL. - Drop filterfunc usage from if_jme. In case of "JMC260 chip full mask revision 2", which has a hardware bug when it comes to DMA transfers crossing the 4 GB bounday, the parent buffer tag already limits DMA memory to 32bit address space. As such it should be safe to drop the filterfunc. The filterfunc was checking if the lower 32bits of the physical address used for DMA are all 0. In case of a 32bit address space, the only address where all lower 32-bits are all zero is 0 itself and I am here assuming that the physical address 0 is not used for DMA transfers! Mainly obtained from: FreeBSD (commits 7cb028de, 900907f4, 1228b93b, 3933ff56)
netif: Configure mbuf clusters/jclusters limits Default mbuf clusters limit work for most of the network device drivers. The drivers modified by this commit: - Use mbuf jclusters. - Size of the reception queues could be configured. - Support multiple reception queues. et(4) and mxge(4) are special; they use non-cluster mbuf for small packets reception, so we adjust non-cluster mbuf limit manually in these two drivers.
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_DONTWAIT flags was a recurring issue when porting drivers from FreeBSD because it tended to get forgotten and the code would compile anyway with the wrong constants. And since MB_WAIT and MB_DONTWAIT ended up as ocflags for an objcache_get() or objcache_reclaimlist call (which use M_WAITOK and M_NOWAIT), it was just one big converting back and forth with some sanitization in between. This commit allows M_* again for the mbuf functions and keeps the sanitizing 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 the MB_OCFLAG() macro which does the same as the former MBTOM(). Approved-by: dillon
ethernet: If caller thread cpu is fixed, pass cpuid to ether_input_pkt() So we could use optimized lwkt_sendmsg_oncpu() instead of lwkt_sendmsg(), if the target netisr is on the same cpu as caller thread cpu. Mainly to avoid unnecessary wakeup() IPIs to other cpus. THE RESULT: On i7-3770 w/ HT enabled (8 logical cpus); NIC is 82599ES w/ 8 RX rings and 8 TX rings. Run: repeat 10 tcp_stream -H ... -i 256 -l 10 -r (256 netperf TCP_MAERTS instances for 10 seconds, 10 rounds) Total amount of cross IPIs before this commit is 6946097. Total amount of cross IPIs as of this commit is 5445324. ~22% unnecessary wakeup() IPIs are avoided!
kernel: Generate miidevs.h, pccarddevs.h and pcidevs.h on the fly. It removes the need to regenerate those header file after first editing the associated list of IDs (miidevs, pccarddevs or pcidevs). After this commit, editing the list alone is enough to add IDs. We already did it like that for usb4bsd's usbdevs.h before. This commit adjusts things for the remaining ID lists.