summaryrefslogtreecommitdiffstats
path: root/sys (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Only support #iommu-cells = <1> for now to make sure the correct stream IDkettenis2021-02-261-17/+8
| | | | | | is passed to the IOMMU device driver. ok patrick@
* Increase the amount of RX buffers given to the bwfm(4) chip. We haave seenpatrick2021-02-261-4/+4
| | | | | | this already on previous chips, which only started giving us packets when handing over at least 128 of them. Apparently some now require 256, which seems to get the Apple M1's WiFi going.
* Add aplcpie(4), a (minimal) driver for the PCIe host bridge on Apple M1 SoCs.kettenis2021-02-264-3/+505
| | | | ok patrick@
* Add missing PCI product IDs for x710 10GBase-T into ixl(4)jan2021-02-264-2/+9
| | | | OK phessler
* only store the current time on address table entries if it changes.dlg2021-02-261-3/+6
| | | | | | | | this avoids unecessary writes to memory. it helps a little bit with a single nettq, but we get a lot more of a boost in pps when running concurrently. thanks to hrvoje for testing.
* tpmr can use the eth64 bits too.dlg2021-02-261-9/+5
|
* try do a better job of filtering 802.1 reserved group addresses.dlg2021-02-261-3/+22
| | | | | | | | | if the bridge is supposed to carry vlan packets, assuming it's an s-vlan component and should allow certain group addresses to cross between "customer" bridges. i should probably let some of these groups fall back through to the calling ether_input rather than drop them.
* use uint64_ts for ethernet addresses in the src/dst bits of rules.dlg2021-02-261-26/+26
|
* use a uint64_t for the ethernet address in the etherbridge table.dlg2021-02-265-58/+64
| | | | | | | | testing has shown up to a 30% improvement in the veb forwarding rate with this change. an earlier diff was tested by hrvoje popovski tested on amd64 and sparc64
* add some helpers for working with ethernet addresses as uint64_tdlg2021-02-262-2/+48
| | | | | | | | | | | | | | the main bits are ether_addr_to_e64 and ether_e64_to addr for loading an ethernet address into a uin64_t and visa versa. there's also some macros for testing if an address in a uint64_t is multicast, broadcast, anyaddr, or if it's an 802.1q reserved multicast group address. the reason for this functionality is once you have an ethernet address as a uint64_t, operations like compares, bit tests, and so on are fast and easy. tested on amd64 and sparc64
* Increase the buffer size for the ioctl response buffers to the same aspatrick2021-02-262-7/+8
| | | | used in the wifi firmware to ensure responses can be received.
* gcc is more strict about union declsderaadt2021-02-261-3/+3
| | | | ok dlg
* Indicate hostready signal to inform the firmware that the rings have beenpatrick2021-02-262-4/+18
| | | | initialized.
* Refactor bwfm(4) firmware loading. The PCIe backend will need to be ablepatrick2021-02-264-130/+129
| | | | | | | to load the CLM blob like the SDIO backend already does. Additionally it is also helpful for the PCIe backend to try a file named after the device tree compatible. Thus refactor the SDIO code and make it available for both SDIO and PCIe.
* Fix prio2fifo mapping table.patrick2021-02-261-5/+5
|
* The firmware replaces the last 32-bit on RAM with a shared DRAM address.patrick2021-02-251-2/+8
| | | | | | | While the for-loop checks that thie value has changed since we wrote to it, the timeout-condition checked for non-zero, which is wrong. This means that we didn't realize the firmware wasn't started. While there, make sure the shared DRAM address is inside the chip's address space.
* Some newer chips have two D11/802.11 cores, and we need to reset both atpatrick2021-02-252-5/+38
| | | | the same time.
* Support for version 7 of the bwfm(4) PCIe interface. The size of the itemspatrick2021-02-252-5/+7
| | | | | on the rx/tx complete rings has increased slightly to accomodate possible new features.
* Add some infrastructure in the PCI chipset tag for pci_probe_device_hook()patrick2021-02-2510-12/+81
| | | | | | so that we can provide IOMMU-hooked bus DMA tags for each PCI device. ok kettenis@
* Add a framework for IOMMUs.kettenis2021-02-252-2/+108
| | | | ok patrick@
* Prevent zero size devices from attachingjan2021-02-251-6/+11
| | | | | | This also fixes two NULL ptr derefs in later code path. OK patick@, krw@
* we don't have to cast to caddr_t when calling m_copydata anymore.dlg2021-02-2529-118/+108
| | | | | | | | | | | | | | | | the first cut of this diff was made with coccinelle using this spatch: @rule@ type caddr_t; expression m, off, len, cp; @@ -m_copydata(m, off, len, (caddr_t)cp) +m_copydata(m, off, len, cp) i had fix it's opinionated idea of formatting by hand though, so i'm not sure it was worth it. ok deraadt@ bluhm@
* let m_copydata use a void * instead of caddr_tdlg2021-02-252-4/+5
| | | | | | | i'm not a fan of having to cast to caddr_t when we have modern inventions like void *s we can take advantage of. ok claudio@ mvs@ bluhm@
* enable veb(4), it's time for wider testing.dlg2021-02-251-1/+2
| | | | | | apart from the semantic differences between bridge(4) and veb(4), the only missing bits in veb(4) is the transparent ipsec interception support, and spanning tree.
* add support for hashing 64 and 32 bit numbers in host byte order.dlg2021-02-241-1/+17
|
* kqueue: Revise filterops interfacevisa2021-02-242-52/+257
| | | | | | | | | | | | | | | | | Extend kqueue's filterops interface with new callbacks so that it becomes easier to use with fine-grained locking. The new interface delegates the serialization of kn_event access to event sources. Now kqueue uses filterops callbacks to read or write kn_event. This hides event sources' locking patterns from kqueue, and allows clean implementation of atomic read-and-clear for EV_CLEAR, for instance. There are so many existing filterops instances that converting all of them in one go is tricky. This patch adds a wrapper mechanism that kqueue uses when the new callbacks are missing. The new filterops interface has been influenced by XNU's kqueue. OK mpi@ semarie@
* In sorflush() use m_purge() instead of handrolling it.bluhm2021-02-241-3/+2
| | | | no objections mvs@
* white space tweak, no functional changedlg2021-02-241-2/+2
|
* fix stoeplitz_n16 and stoeplitz_h16dlg2021-02-241-3/+3
|
* Enumerate GCI core, which seems to contain the OTP on the Apple M1.patrick2021-02-242-4/+7
|
* whitespace tweaks, no functional change.dlg2021-02-241-4/+4
|
* fix the length check on arp packets when handling arp filter rules.dlg2021-02-241-2/+2
| | | | | | another bridge feature i'm not convinced people actually use. ok jmatthew@ claudio@
* remove unused usbd_get_device_string()jsg2021-02-241-21/+1
| | | | ok mpi@
* remove unused usbdi functionsjsg2021-02-242-44/+2
| | | | ok mpi@
* add support for adding and deleting mac addr entries on nvgre.dlg2021-02-241-1/+89
| | | | | | | | | | | | | | the guts of this are in the etherbridge code which i added for veb and used in bpe. there's a bit of boilerplate to make sure that the addresses used for the endpoints will work with the tunnel addresses that have been configured, but it's not too bad. again, this is hard to use because ifconfig doesnt (yet) know how to put ethernet addresses into the "add address" ioctl. these ioctls could be used for things like evpn via bgpd though. not sure if that's interesting to anyone though. it would probably be more useful on vxlan interfaces.
* remove unused xhci_cmd_evaluate_ctx()jsg2021-02-241-22/+1
| | | | ok mpi@
* add support for adding and deleting address table entries.dlg2021-02-241-1/+52
| | | | | | | the guts of this are in the etherbridge code which i just added for veb, so this code is very minimal. it's hard to use though cos ifconfig doesnt (yet) know how to put ethernet addresses into the "add address" ioctl.
* add support for adding and deleting address table entries.dlg2021-02-243-3/+149
|
* handle ifconfig veb0 flush with etherbridge_flush, like bpe and nvgredlg2021-02-231-1/+5
|
* Use pool to allocate tdbs.tobhe2021-02-231-3/+12
| | | | ok patrick@ bluhm@
* Add aplintc(4), a driver for the interrupt controller found onkettenis2021-02-234-3/+388
| | | | | | Apple M1 SoCs. ok patrick@
* sparc64/clock.c: use ANSI-style function definitionscheloha2021-02-231-57/+20
| | | | | | | | While here, zap a few ARGUSED linter comments. Compile-tested by deraadt@. ok deraadt@
* Wrap by netlock the whole foreach loop which calls switch_port_detach() inmvs2021-02-231-1/+3
| | | | | | | | | switch_clone_destroy(). This fixes netlock assertion within underlay ifpromisc(). The problem was reported by hrvoje@ [1]. "why not" by deraadt@ 1. https://marc.info/?l=openbsd-bugs&m=161338077403538&w=2
* remove unused malloc_roundup()jsg2021-02-232-15/+2
|
* As ip_insertoptions() may prepend a mbuf, "goto bad" has to freebluhm2021-02-231-19/+11
| | | | | | the new chain. This fixes a potential memory leak in ip_output(). Also simplify a bunch of "goto done". OK kn@ mvs@
* Make more efficient clearing interrupts on all processors at boot time.aoyama2021-02-231-4/+4
| | | | | | | | | | | | | | | | Without this modification, because of the volatile qualifier, the compiler does not produce four `` = 0 '' assignments, but code equivalent to: *(volatile uint32_t *)INT_ST_MASK3 = 0; *(volatile uint32_t *)INT_ST_MASK2 = *(volatile uint32_t *)INT_ST_MASK3; *(volatile uint32_t *)INT_ST_MASK1 = *(volatile uint32_t *)INT_ST_MASK2; *(volatile uint32_t *)INT_ST_MASK0 = *(volatile uint32_t *)INT_ST_MASK1; Anders Gavare reported to Miod Vallat, and he gave me a diff.
* small adjustment of the deck chairs, no functional change.dlg2021-02-231-2/+2
|
* Use NULL instead of 0 in `m_nextpkt' assignment.mvs2021-02-233-7/+7
| | | | ok deraadt@ dlg@
* make a start on transparent ipsec interception, based on bridge(4).dlg2021-02-231-1/+287
| | | | | | | | | | | | | | | | | | | | | | | i found the Transparent Network Security Policy Enforcement paper by angelos and jason was useful for understanding the background and why you'd want to do this. the implementation is a little bit different to the bridge one because i've tweaked the order that pf and ipsec processing happens, depending on which direction the packet is going over the bridge. bridge always runs ipsec processing before pf, no matter which direction the packet is going. packets going into veb, pf runs first and then ipsec input processing is allowed to happen. in the outgoing direction ipsec happens first and then pf. pf runs before ipsec in the inbound direction so pf can apply policy to ipsec encapsulated packets before they hit pf. this allows you to apply policy to both the encrypted and unencrypted packets in both directions. the code is disabled for now. this is mostly because i want veb(4) to have a good chance at operating outside the netlock, and i'm pretty sure the ipsec stack isn't ready for that yet. the other reason why it's disabled is getting a test setup is effort, but i want to sleep.
* remove unused uvm_mapent_bias()jsg2021-02-231-35/+1
| | | | ok mpi@