summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2016-11-14Copy data by using 64-bit loads and stores rather than 32-bitVisa Hankala
operations. This about doubles the routine's throughput. No binary change on the 32-bit bootblocks Discussed with miod@ long ago
2016-11-14Bump the number of TX descriptors to 256Mike Belopuhov
By increasing the number of available TX descriptors we also get a larger NVS message ring. Altogether this results in about 30% performance improvement. While here, offset all TX descriptor IDs by a fixed amount so that the Transaction ID 0 to descriptor ID mapping produces a non-zero result making error handling more reliable.
2016-11-14Minor cleanup, remove unused structure membersMike Belopuhov
2016-11-14Instead of passing an extra mbuf pointer to pf_route(), it shouldAlexander Bluhm
just use pd->m. Then pf_test() can also operate on pd.m and set the *m0 value in the caller just before it returns. OK sashan@
2016-11-14Stop looking for further NCM datagrams if either length or offset ofGerhard Roth
the next datagram is zero. Tested by otto@ ok mpi@ kettnis@ otto@
2016-11-14Reflect interface priorities when inserting RTF_CONNECTED routes.Martin Pieuchot
When multiple RTF_CLONING routes exist for a given subnet, bringing one of the interfaces up/down could make impossible to insert new ARP/NDP entries. In this case the first RTF_CONNECTED route of the multipath list no longer corresponded to the wired interface because it had the same priority as the carp(4) route. This is another regression of supporting multiple RTF_CONNECTED routes. Fix a bug with a CARP setup reported by stsp@ ok stsp@
2016-11-14Automatically set ::1 on all default lo(4) interfaces.Martin Pieuchot
Prodded by claudio@
2016-11-14It should be possible to create the default loopback interface.Martin Pieuchot
Make rdomain's default loopback test pass again.
2016-11-14Automatically create a default lo(4) interface per rdomain.Martin Pieuchot
In order to stop abusing lo0 for all rdomains, a new loopback interface will be created every time a rdomain is created. The unit number will be the same as the rdomain, i.e. lo1 will be attached to rdomain 1. If this loopback interface is already in use it wont be possible to create the corresponding rdomain. In order to know which lo(4) interface is attached to a rdomain, its index is stored in the rtable/rdomain map. This is a long overdue since the introduction of rtable/rdomain. It also fixes a recent regression due to resetting the rdomain of an incoming packet reported by semarie@, Andreas Bartelt and Nils Frohberg. ok claudio@
2016-11-14Fix build now that ftd.h move to a MI directory.Martin Pieuchot
2016-11-14rnh_multipath can go, multipath support is dead.Martin Pieuchot
2016-11-14Remove radix_mpath dragons.Martin Pieuchot
This code insn't used since ART is the default. ok vgross@
2016-11-14Remove splnet() from socket kqueue code.Martin Pieuchot
splnet() was necessary when link state changes were executed from hardware interrupt handlers, nowdays all the changes are serialized by the KERNEL_LOCK() so assert that it is held instead. ok mikeb@
2016-11-14use M_COUNTERS to allocate counters.David Gwynne
suggested by mpi@ and mikeb@
2016-11-14turn ipstat into a set of percpu counters.David Gwynne
each counter is identified by an enum value which correspond to the original members of the ipstat struct. ipstat_inc(ips_foo) replaces ipstat.ips_foo++ for the actual updates. ipstat_inc is a thin wrapper around counters_inc. counters are still returned to userland via the ipstat struct for now. ok mpi@ mikeb@
2016-11-14add wrappers around common operations on counters.David Gwynne
specifically, counters_inc, counters_add, and counters_pkt. the latter increments both a packet counter and adds to byte counter instead of just one counter at a time. part of a bigger diff thats ok mpi@ mikeb@
2016-11-14add a type for counters.David Gwynne
ok mpi@ visa@ mikeb@
2016-11-13Fix typo in comment: it's vm.loadavg, not kern.loadavg.Theo Buehler
From patrick keshishian
2016-11-12Revert unrelated bits that snuck in previous.Jeremie Courreges-Anglas
2016-11-12Bump VNDNLEN from 90 to 1024 bytes, to avoid "VNDIOCSET: File name too long"Jeremie Courreges-Anglas
Introduce a new ioctl for VNDIOCSET, the old ioctl will stay around for a bit to cope with old vnconfig/mount_vnd. ok deraadt@
2016-11-11Export p_cpuid via sysctl for all processes; ok guentherMike Belopuhov
2016-11-11Reorder atomic operations dealing with sc_tx_availMike Belopuhov
The atomic decrement of the number of available descriptors must be performed before sending the RNDIS message to the hypervisor so that packet transmit completion that may execute in parallel won't increase the value past the maximum.
2016-11-11Remove mutexes protection from the switchctl as they don't seem to beRafael Zalamena
doing anything for us, and remove some whitespaces from the header that can be found near the removed lines. ok mikeb@
2016-11-10Add support for "allwinner,sun9i-a80-apb1-clk" compatible clocks.Mark Kettenis
This makes the serial console work properly and makes Cubieboard4 go multi-user.
2016-11-10Set the reserved field to zeroMike Belopuhov
2016-11-10Restart the IFQ transmit routine only once per interruptMike Belopuhov
2016-11-10RNDIS data command is always the same and can be reusedMike Belopuhov
2016-11-10Add support for partial writes in switchwrite so we can use multipleRafael Zalamena
write() to write one packet. With this we also get support for writing multiple ofp packets with a single write. ok mikeb@
2016-11-10Use the NdpIndex of the NCM header as the offset of the NCM pointer insteadGerhard Roth
of assuming tha the NCM pointer will follow immediately after the header. Tested by Bryan Vyhmeister and Otte Moerbeek ok otto
2016-11-10Fix swofp_send_error mbuf handling so it doesn't leak mbufs and set theRafael Zalamena
proper mbuf header length. ok mikeb@
2016-11-10Typo in the guardMartin Pieuchot
2016-11-10Don't forget to set the descriptor ready flag after decapsulationMike Belopuhov
2016-11-10Match Apple NVMe controller by product ID, yes apple is different.Martin Pieuchot
Reported and tested by gonzalo@ on a Macbookair7,1.
2016-11-10regenMartin Pieuchot
2016-11-10Apple NVMe controllerMartin Pieuchot
2016-11-09Simplify the switchread loop and fix the case where only first mbuf inRafael Zalamena
the chain was being read. While here rename mbuf variable and remove unused ones. ok mikeb@
2016-11-09Do not call splsoftnet() recursively, this won't work with a lock.Martin Pieuchot
closef() on a socket will call soclose() which call splsoftnet(). So make sure we release the IPL level first in error paths. Found by Nils Frohberg while testing another diff. ok mikeb@, bluhm@
2016-11-09Do not call splsoftnet() recursively, this won't work with a lock.Martin Pieuchot
Timers configured via rt_timer_add(9) always run at IPL_SOFTNET, so assert that rather than calling splsoftnet(). ok bluhm@
2016-11-09Do not dereference a variable without initializing it beforehand.Martin Pieuchot
Fix a typo introduced in m_pullup(9) refactoring and found the hard way by semarie@ while testing another diff. ok mikeb@, dlg@
2016-11-08Reserve extra space for the bufring header structureMike Belopuhov
2016-11-08Add a few more easy sun9i-a80 clocks.Mark Kettenis
2016-11-08Add support for "allwinner,sun9i-a80-mmc-clk" compatible clocks.Mark Kettenis
2016-11-08Add support for sun9i-a80, the Allwinner A80.Mark Kettenis
2016-11-08Add support for sun9i-a80, the Allwinner A80.Mark Kettenis
2016-11-08Teach switch(4) device read(2) operations to behave like a stream socket,Rafael Zalamena
so the userland programs can use it without having to do any special treatment (e.g. having to read() whole packets with just 1 call or lose it). This also allows userland to read more than one ofp header/payload with one syscall. ok mikeb@
2016-11-08No longer need radix.hMartin Pieuchot
2016-11-08RIP ifa_ifwithnet()Martin Pieuchot
ok vgross@
2016-11-08Only use the routing table for source address selection when processing IPMartin Pieuchot
options. Make sure the next hop is directly reachable if IPOPT_SSRR is set. Input from and ok vgross@
2016-11-08Use rtalloc(9) instead of ifa_ifwithnet().Martin Pieuchot
ifa_ifwithnet() checks if a given address is directly connected. This function predates the introduction of the BSD routing table. Nowdays we can check if the route for the given address is marked as RTF_GATEWAY. This works on OpenBSD because we always install RTF_CONNECTED routes for subnets a and RTF_HOST route per p2p link. ok vgross@
2016-11-08Remove superfluous DMA synchronization now that the stack is doing it forMartin Pieuchot
all HCs. ok patrick@