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
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)
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.
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
kernel: make pktinfo and cpuid native to ip_input()In order to remove ether_input_pkt(), switch the prototypeof if_input() and adjust all callers. While there, consolidatethe style of the invoke
kernel: make pktinfo and cpuid native to ip_input()In order to remove ether_input_pkt(), switch the prototypeof if_input() and adjust all callers. While there, consolidatethe style of the invoke.Suggested and reviewed by: sephe
kernel: Generate miidevs.h, pccarddevs.h and pcidevs.h on the fly.It removes the need to regenerate those header file after first editingthe associated list of IDs (miidevs, pccarddevs or pcidevs)
kernel: Generate miidevs.h, pccarddevs.h and pcidevs.h on the fly.It removes the need to regenerate those header file after first editingthe associated list of IDs (miidevs, pccarddevs or pcidevs). After thiscommit, editing the list alone is enough to add IDs.We already did it like that for usb4bsd's usbdevs.h before. This commitadjusts things for the remaining ID lists.
ifq: Remove the unused parameter 'mpolled' from ifq dequeue interfaceThe ifq_poll() -> ifq_dequeue() model is not MPSAFE, and mpolled hasnot been used, i.e. set to NULL, for years; time to let it
ifq: Remove the unused parameter 'mpolled' from ifq dequeue interfaceThe ifq_poll() -> ifq_dequeue() model is not MPSAFE, and mpolled hasnot been used, i.e. set to NULL, for years; time to let it go.
netif: Setup TX ring CPUID before hooking up interrupt vectors
kernel: Use DEVMETHOD_END in the drivers.
if: Per-cpu ifnet/ifaddr statistics, step 1/3Wrap ifnet/ifaddr stats updating, setting and extraction into macros;ease upcoming changes.
bfe: Fix set-but-unused gcc47 warning
if: Multiple TX queue support step 1 of many; introduce ifaltq subqueuePut the plain queue information, e.g. queue header and tail, serializer,packet staging scoreboard and ifnet.if_start schedule
if: Multiple TX queue support step 1 of many; introduce ifaltq subqueuePut the plain queue information, e.g. queue header and tail, serializer,packet staging scoreboard and ifnet.if_start schedule netmsg etc. intoits own structure (subqueue). ifaltq structure could have multiple ofsubqueues based on the count that drivers can specify.Subqueue's enqueue, dequeue, purging and states updating are protectedby the subqueue's serializer, so for hardwares supporting multiple TXqueues, contention on queuing operation could be greatly reduced.The subqueue is passed to if_start to let the driver know which hardwareTX queue to work on. Only the related driver's TX queue serializer willbe held, so for hardwares supporting multiple TX queues, contention ondriver's TX queue serializer could be greatly reduced.Bunch of ifsq_ prefixed functions are added, which is used to performvarious operations on subqueues. Commonly used ifq_ prefixed functionsare still kept mainly for the drivers which do not support multiple TXqueues (well, these functions also ease the netif/ convertion in thisstep :).All of the pseudo network devices under sys/net are converted to use thenew subqueue operation. netproto/802_11 is converted too. igb(4) isconverted to use the new subqueue operation, the rest of the networkdrivers are only changed for the if_start interface modification.For ALTQs which have packet scheduler enabled, only the first subqueueis used (*).(*) Whether we should utilize multiple TX queues if ALTQ's packet scheduleris enabled is quite questionable. Mainly because hardware's multiple TXqueue packet dequeue mechanism could have negative impact on ALTQ's packetscheduler's decision.
if: Move if_cpuid into ifaltq; prepare multiple TX queues supportif_cpuid and if_npoll_cpuid are merged and moved into ifaltq asaltq_cpuid, which indicates the owner CPU of the tx queue. Sincewe
if: Move if_cpuid into ifaltq; prepare multiple TX queues supportif_cpuid and if_npoll_cpuid are merged and moved into ifaltq asaltq_cpuid, which indicates the owner CPU of the tx queue. Sincewe already have code in if_start_dispatch() to catching tx queueowner CPU changes, this merging is quite safe.
if: Move IFF_OACTIVE bit into ifaltq; prepare multiple TX queues supportifaltq.altq_hw_oactive is now used to record that NIC's TX queue is full.IFF_OACTIVE is removed from kernel. User space IFF
if: Move IFF_OACTIVE bit into ifaltq; prepare multiple TX queues supportifaltq.altq_hw_oactive is now used to record that NIC's TX queue is full.IFF_OACTIVE is removed from kernel. User space IFF_OACTIVE is kept forcompability.ifaltq.altq_hw_oactive should not be accessed directly. Following set offunctions are provided and should be used:ifq_is_oactive(ifnet.if_snd) - Whether NIC's TX queue is full or notifq_set_oactive(ifnet.if_snd) - NIC's TX queue is fullifq_clr_oactive(ifnet.if_snd) - NIC's TX queue is no longer full
ether: Don't manually packing up input mbufsSince we use spin ports for netisrs now, we no longer need to explicitlyavoid IPI storm on input path.
intr: Remove no longer correct ithread_cpuid; use rman_get_cpuid instead
kernel: Use NULL for DRIVER_MODULE()'s evh & arg (which are pointers).This is just cosmetics for easier reading.
network code: Convert if_multiaddrs from LIST to TAILQ.It can then be traversed backwards in the three drivers which wantto do that.Taken-from: FreeBSD
modules: remove KMODDEPS, it is not used anymore
ether_input/rss: Pass packet info to ether_input_chain.- Pass packet info to ether_input_chain(), if netisr_find_pktinfo_port() could locate the msgport, then short circuit the rest of the ether_
ether_input/rss: Pass packet info to ether_input_chain.- Pass packet info to ether_input_chain(), if netisr_find_pktinfo_port() could locate the msgport, then short circuit the rest of the ether_input code and dispatch the ethernet packet directly.- Revoke the pi_hash field in pktinfo and extend the pktinfo_portfn_t to accpet an mbuf parameter, so that pktinfo_portfn_t could change the mbuf hash value. e.g. pktinfo_portfn_cpu0() will always set m_pkthdr.hash to 0.- Adjust ether_input_chain() callers accordingly.
bfe(4): Coherent memory does not need to be synced
bfe(4): Utilize bus_dmamap_load_mbuf_defrag()
bfe(4): Utilize bus_dmamap_load_mbuf_segment()
bfe(4): Add missing BUS_DMA_WAITOK
bfe(4): use bus_dmamem_coherent()
Change bfe(4) according to recent busdma(9) bounce page fixes
123