| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Modernize the use of vm_page_unwire(). Since r288122, vm_page_unwire()
has returned TRUE when the wire count transitions to zero, eliminating
the need for callers to inspect the page's wire count.
|
|
|
|
|
|
| |
Clang complains "variable 'dummy' is uninitialized when used here".
Sponsored by: The FreeBSD Foundation
|
|
|
|
| |
Don't use an apostrophe in a possesive pronoun.
|
|
|
|
| |
Improve the wording of a comment describing why EAGAIN is the error code.
|
|
|
|
| |
Merge ena-com 1.1.4.2
|
|
|
|
| |
Fix matchcing of NATed ICMP queries (resolving NATed MTU discovery).
|
|
|
|
| |
Merge ACPICA 20170728.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r320628, r319201, r320629, r320630, r320631, r320632.
r317518:
Import Amazon Elastic Network Adapter (ENA) HAL to sys/contrib/
Import from vendor-sys/ena-com/1.1.4.1
SVN rev.: 317516
Version: 1.1.4.1
r318647:
Add support for Amazon Elastic Network Adapter (ENA) NIC
ENA is a networking interface designed to make good use of modern CPU
features and system architectures.
The ENA device exposes a lightweight management interface with a
minimal set of memory mapped registers and extendable command set
through an Admin Queue.
The driver supports a range of ENA devices, is link-speed independent
(i.e., the same driver is used for 10GbE, 25GbE, 40GbE, etc.), and has
a negotiated and extendable feature set.
Some ENA devices support SR-IOV. This driver is used for both the
SR-IOV Physical Function (PF) and Virtual Function (VF) devices.
ENA devices enable high speed and low overhead network traffic
processing by providing multiple Tx/Rx queue pairs (the maximum number
is advertised by the device via the Admin Queue), a dedicated MSI-X
interrupt vector per Tx/Rx queue pair, and CPU cacheline optimized
data placement.
The ENA driver supports industry standard TCP/IP offload features such
as checksum offload and TCP transmit segmentation offload (TSO).
Receive-side scaling (RSS) is supported for multi-core scaling.
The ENA driver and its corresponding devices implement health
monitoring mechanisms such as watchdog, enabling the device and driver
to recover in a manner transparent to the application, as well as
debug logs.
Some of the ENA devices support a working mode called Low-latency
Queue (LLQ), which saves several more microseconds. This feature will
be implemented for driver in future releases.
r319197:
Add mbuf defragmentation to the ENA driver
When mbuf chain is too long and device cannot handle that number
of segments in DMA transaction, mbuf chain will be defragmented.
Initially, driver was dropping all mbuf chains that were exceeding
supported number of segments.
r319198:
Add locks before each ena_up and ena_down
Lock only ena_up and ena_down calls in ioctl handler, instead of whole
ioctl. Locking ioctl with sx lock that is sleepable, is not allowed in
some cases, e.g. when multicast options are being changed.
Additional locking was added in deatch function to prevent race condition
with ioctl function.
r319199:
Add error handling to the ENA driver if init of the reset task fails
Also, to simplify cleaning routine, reset task is initialized before
allocating statistics and other resources.
r319200:
Move ENA's hw stats updating routine to separate task
Initially, stats were being updated each time OS was requesting for
the first statistic.
To read statistics from hw, condvar was used. cv_timedwait cannot be
called when unsleepable lock is held, and this happens when FreeBSD
is requesting statistic.
Seperate task is reading statistics from NIC each 1 second.
r319201:
Introduce additional locks when releasing TX resources and buffers in ENA
There could be race condition with TX cleaning routine when cleaning mbufs,
when it was called directly from main sending thread (ena_mq_start).
r320625:
Add missing lock upon initialization of the interface
Lack of this lock was causing crash if down was called in
parallel with the initialization routine.
r320626:
Acquire locks before calling drbr_flush()
It is required to hold lock that is associated with buffer ring before
flushing drbr.
r320628:
Unmask all IO irqs after driver state is set as running
If driver left MSI-x handlling routine because interface was put down,
it is not unmasking IRQs, so any requesting interrupt will be awaiting
for unmasking.
On ena_up() routine all interrupts are being unmasked and any awaiting
interrupt will be handled right away.
If handler was executed before driver state was set as running, handling
routine is being ended immediately, leaving IO irqs for given queue
masked.
r320629:
Call drbr_advance() before leaving TX routine
If drbr_advance() is not called before doing cleanup and packet is
already enqueued for sending (tx_info is holding pointer to mbuf), then
mbuf is cleaned both in drbr_flush() and in cleanup routine, when all
mbufs hold by tx_buffer_info are being released.
This causes panic, because mbuf is released twice.
r320630:
Remove RX mtx from ENA driver
RX lock is no longer required. There can only be one RX cleanup task
running at a time, RX cleanup cannot be executed if interface is not
yet initialized and ena_down() will not free any RX resources if any io
interrupt is being handled - RX cleanup task is only called from an
interrupt handler.
r320631:
Fix creation of dma tags and TSO settings
TSO settings were not reflecting real HW capabilities.
DMA tags were created with wrong window - high address was the same as
low, so excluding window was not working.
Capabilities of TX dma transaction were not set properly - TSO max size
had been increased and size of one segment had been adjusted.
r320632:
Replace mbuf defragmentation with collapse
Collapse should be more effective than defragmentation.
Added missing declaration of ena_check_and_collapse_mbuf().
Submitted by: Michal Krawczyk <mk@semihalf.com>
Jakub Palider <jpa@semihalf.com>
Jan Medala <jan@semihalf.com>
Obtained from: Semihalf, Amazon.com Inc.
Sponsored by: Amazon.com Inc.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add necessary bits to get FreeBSD booting on the Unifi Security Gateway
Summary:
The Ubiquiti Unifi Security Gateway is virtually identical to the
EdgeRouter Lite, with a smaller PCB and apparently a different board identifier.
Simply adding the new board identifier alongside the ERL identifier, FreeBSD
boots successfully, and can access the needed peripherals.
Approved by: re(bdrewery)
|
|
|
|
|
|
|
|
| |
Fix return value of ip_sync_nat. Previously, regardless of error it
always returned a return code of 0.
Obtained from: NetBSD ip_sync.c r1.5
Approved by: re (delphij)
|
|
|
|
|
| |
Refactor & compact struct i6addr_t #ifdef: remove redundant structure
definintion when USE_INET6 is false.
|
|
|
|
| |
Remove redundant variable declaration.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
List of revisions merged:
r307070
r307071
r307072
r307074
r307189
r307224
r307339
r307390
r307391
r309776
r314231
r314232
r314615
r314616
r314617
r314618
r314619
r314620
r314621
r314623
r314890
r314925
r314926
r314927
r314928
r315770
r315771
Discussed with: gjb (re), imp
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
|
| |
[vchi] replace non-reproducible __DATE__/__TIME__ with hardcoded string
Although vchiq_build_date and vchiq_build_time are not used in current
vchi driver at the moment, make sure these value will not leak into
build later on if at some point they will be refered in some new
imported code
PR: 215494
Reported by: emaste
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Keep state incorrectly assumes keep frags. This is counter to the
ipfilter man pages. This also currently restricts keep frags to only when
keep state is used, which is redundant because keep state currently
assumes keep frags. This commit fixes this.
To the user this change means that to maintain the current behaviour
one must add keep frags to any ipfilter keep state rule (as documented
in the man pages).
This patch also allows the flexability to specify and use keep frags
separate from keep state, as documented in an example in ipf.conf.5,
instead of the currently broken behaviour.
MFC suggested by: rgrimes
Relnotes: yes
|
|
|
|
|
|
|
| |
Add missing free()'s after calls to randomize().
PR: NetBSD PR/50559
Obtained from: Netbsd radix_ipf.c r1.6
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a use after free panic in ipfilter's fragment processing.
Memory is malloc'd, then a search for a match in the fragment table
is made and if the fragment matches, the wrong fragment table is
freed, causing a use after free panic. This commit fixes this.
A symptom of the problem is a kernel page fault in bcopy() called by
ipf_frag_lookup() at line 715 in ip_frag.c. Another symptom is a
kernel page fault in ipf_frag_delete() when called by ipf_frag_expire()
via ipf_slowtimer().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r312353, r312354 and r312355:
Sync in the latest CloudABI generated source files.
Languages like C++17 and Go provide direct support for slice types:
pointer/length pairs. The CloudABI generator now has more complete for
this, meaning that for the C binding, pointer/length pairs now use an
automatic naming scheme of ${name} and ${name}_len.
Apart from this change and some reformatting, the ABI definitions are
identical. Binary compatibility is preserved entirely.
MFC r315700:
Make file descriptor passing work for CloudABI's sendmsg().
Reduce the potential amount of code duplication between cloudabi32 and
cloudabi64 by creating a cloudabi_sock_recv() utility function. The
cloudabi32 and cloudabi64 modules will then only contain code to convert
the iovecs to the native pointer size.
In cloudabi_sock_recv(), we can now construct an SCM_RIGHTS cmsghdr in
an mbuf and pass that on to kern_sendit().
MFC r315736:
Make file descriptor passing for CloudABI's recvmsg() work.
Similar to the change for sendmsg(), create a pointer size independent
implementation of recvmsg() and let cloudabi32 and cloudabi64 call into
it. In case userspace requests one or more file descriptors, call
kern_recvit() in such a way that we get the control message headers in
an mbuf. Iterate over all of the headers and copy the file descriptors
to userspace.
|
|
|
|
|
|
|
| |
- Merge ACPICA 20170303.
- Remove '-vd' option to make iasl(8) reproducible.
Relnotes: yes
|
|
|
|
|
|
|
| |
Fix lookup of original destination address when using a redirect rule.
Transparent proxying, e.g. to squid, is an example of this.
Obtained from: NetBSD ip_nat.c r1.17, ip_nat6.c r1.10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stop including sys/types.h from arm's machine/atomic.h, fix the places
where atomic.h was being included without ensuring that types.h (via
param.h) was included first, as required by atomic(9).
Remove arm's cpuconf.h, and references to it, after moving a few lines from
it into pmap-v4.h where they are used. Other than those few lines of
support for different MMU types, nothing in cpuconf.h has been used in our
code for quite a while.
The file existed to set up a variety of symbols to describe the
architecture. Over the past few years we have converted all of our source
to use the new architecture symbols standardized by ARM Inc, and predefined
by both clang and gcc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the fragment info is placed at the top of the linked list
under a shared read lock. This patch attempts to upgrade the lock to
an exclusive write lock. If the exclusive write lock fails to be
obtained, the current fragment is not placed at the head of the list.
This portion of the patch was inspired by NetBSD ip_frag.c r1.4 (which
effectively removed the section of code that performed the reordering).
The patch to sys/contrib/ipfilter/netinet/ip_compat.h adds the
MUTEX_TRY_UPGRADE macro to support the patch to ip_frag.c.
The patch to contrib/ipfilter/lib/rwlock_emul.c supports this patch
by emulating the mutex in userspace when exercised by ipftest(1).
Inspired by: NetBSD ip_frag.c r1.4
|
|
|
|
|
|
|
|
| |
Get rid of a compiler warning which I saw too often.
Include netinet/in.h before ip_compat.t which will then check if
IPPROTO_IPIP is defined or not. Doing it the other way round,
ip_compat.h would not find it defined and netinet/in.h then
redefine it.
|
|
|
|
| |
Reduce dmesg verbosity.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r307091, r307092, r307093, r307095, r307098,
r307115:
r307067:
Make intc driver compatible with upstream DTS
- Fix compatibility strings
- Properly decode upstream's two-cell interrupt specs. Our home-made dts
does not have two-cell interrupts so no need to preserve backward
compatibility
r307068:
Make Rapsberry Pi watchdog driver compatible with upstream DTS
- Fix compatibility strings
- Compensate the difference in base address for our custom DTS and
upstream one (for backward compatibility)
r307087:
Make sure intc is attached before interrupt consumers
If pass order is not specified devices are attached in the order they are
defined in dts. Some interrupt consumers may be defined before intc. Also
make sure intc interrupt-parent local_intc is attached before intc itself.
r307088:
Add compatible strings used in upstream dts files
r307089:
Make framebuffer driver compatible with upstream DT
- Add compatibility string
- Add simplebus as possible parent bus
r307091:
Add compatibility string from upstream DT
r307092:
Make BCM2835 GPIO driver compatible with upstream DT
- Add compatibility string
- Make reserverd and read-only properties optional
r307093:
Make BCM283x USB driver compatible with upstream DT
- Make resource allocation logic depend on compatibility string
to check what format of DTS node should be used - FreeBSD's or upstream
r307095:
Make VCHI driver compatible with upstream DT
- Add compatibility string
- Compensate difference in base address between our custom DTB and upstream one
r307098:
Make BCM28x USB driver compatible with upstream device tree
This should have been committed in r307093: resource allocation depends
on source of the device tree. upstream dts has extra interrupt that we can
ignore
r307115:
Fix typo in comment
Spotted by: loos
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r304555, r304556, r304557, r304558, r304559, r304561, r304563, r304564,
r304565, r304615, r304742, r304743, r304744, r304745, r304748, r304886,
r304991, r305928, r305938, r305987, r306185:
Bring CloudABI support back in sync with HEAD.
- Add support for running 32-bit executables on amd64, armv6 and i386.
- As these new architectures require the use of the vDSO, merge back
vDSO support for 64-bit executables running on amd64 and arm64 as
well. This has the advantage that support for vDSO-less execution
can be phased out when 11.0 becomes unsupported, as opposed to 11.x.
This change has been tested by running the cloudlibc unit tests on all
supported architectures, which seems to work fine.
|
|
|
|
|
|
|
| |
Update VCHIQ driver to upstream version 4eda74f2
PR: 211525
Submitted by: Sylvain Garrigues <sylvain@sylvaingarrigues.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define ipfilter's SOLARIS macro in a defined and portable way.
Reviewed by: cy
Differential Revision: https://reviews.freebsd.org/D7671
MFC r304959 (by kib):
Complete r304953.
Sponsored by: The FreeBSD Foundation
MFC r304964:
Follow-up to r304953, in which I broke the build: apparently the SOLARIS
macro is defined in lots of different places in ipfilter, so replace all
of the nonportable definitions with portable ones.
Pointy hat to: dim
|
|
|
|
|
|
|
|
|
|
|
| |
Fix nvlist array memory leak.
When we change nvl_array_next to NULL it means that we want to destroy
or take nvlist_array. The nvpair, which stores next nvlist of
nvlist_array element is no longer needed and can be freed.
Submitted by: Adam Starak <starak.adam@gmail.com>
Approved by: re (gjb)
|
|
|
|
|
|
|
| |
Fix memory leak in the nvlist string array.
Submitted by: Adam Starak <starak.adam@gmail.com>
Approved by: re (gjb)
|
|
|
|
|
|
|
| |
Update iwm(4) and iwmfw(4) to current in order to stabilize and improve
functionality.
Approved by: re (gjb)
|
|
|
|
|
|
|
|
|
|
|
| |
doing the teardown. ipf_destroy_all() may free ipfmain in case
of ipf_dynamic_softc being true, thus we are avoiding a possible
memory modified after free as well.
Reported by: Coverity
Coverity CID: 1357320
Approved by: re (hrs)
MFC after: 10 days
|
|
|
|
|
|
| |
This will allow a single kernel to run on all SoCs supported by the dTSEC driver.
Approved by: re@(gjb)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split initializzation an teardown into module (global state) and VNET
(per virtual network stack) parts. Virtualise global state, which is
not "const".
Cleanup eventhandlers, so that we can make use of the passed in argument
to get the vnet state from the ifp; disable the "cloner" event as it is
too early, has no state, and can fire before initialisation (see comment
in the source).
Handle the dynamic sysctls specially. The problem is that "ipmain"
is the virtualized struct, but the fields used for the sysctls are
hanging off memory allocated and attached to the virtualized "ipmain"
thus standard VNET macros and sysctl handling do not work.
We still say it is VNET sysctls to get the proper protection checks
in the VIMAGE case; to solve the problem of accessing the right bit
of memory hanging of each per-VNET ipmain, we use a dedicated handler
function wrapping around sysctl_ipf_int() undoing the base calculation
from kern_sysctl.c and then adding the passed-in offset into the right
struct depending on handler. A bit of a mess exposing VNET-internals
this way but the only way to keep the code without having to massively
restructure ipf internals.
Approved by: re (hrs)
Sponsored by: The FreeBSD Foundation
Obtained from: projects/vnet
MFC after: 2 weeks
Reviewed by: cy
Differential Revision: https://reviews.freebsd.org/D7000
|
|
|
|
|
|
|
|
|
| |
allocations from ipfilter in preparation for VNET support.
Suggested by: cy (see D7000)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Approved by: re (gjb)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
than removing the network interfaces first. This change is rather larger
and convoluted as the ordering requirements cannot be separated.
Move the pfil(9) framework to SI_SUB_PROTO_PFIL, move Firewalls and
related modules to their own SI_SUB_PROTO_FIREWALL.
Move initialization of "physical" interfaces to SI_SUB_DRIVERS,
move virtual (cloned) interfaces to SI_SUB_PSEUDO.
Move Multicast to SI_SUB_PROTO_MC.
Re-work parts of multicast initialisation and teardown, not taking the
huge amount of memory into account if used as a module yet.
For interface teardown we try to do as many of them as we can on
SI_SUB_INIT_IF, but for some this makes no sense, e.g., when tunnelling
over a higher layer protocol such as IP. In that case the interface
has to go along (or before) the higher layer protocol is shutdown.
Kernel hhooks need to go last on teardown as they may be used at various
higher layers and we cannot remove them before we cleaned up the higher
layers.
For interface teardown there are multiple paths:
(a) a cloned interface is destroyed (inside a VIMAGE or in the base system),
(b) any interface is moved from a virtual network stack to a different
network stack ("vmove"), or (c) a virtual network stack is being shut down.
All code paths go through if_detach_internal() where we, depending on the
vmove flag or the vnet state, make a decision on how much to shut down;
in case we are destroying a VNET the individual protocol layers will
cleanup their own parts thus we cannot do so again for each interface as
we end up with, e.g., double-frees, destroying locks twice or acquiring
already destroyed locks.
When calling into protocol cleanups we equally have to tell them
whether they need to detach upper layer protocols ("ulp") or not
(e.g., in6_ifdetach()).
Provide or enahnce helper functions to do proper cleanup at a protocol
rather than at an interface level.
Approved by: re (hrs)
Obtained from: projects/vnet
Reviewed by: gnn, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D6747
|
|
|
|
|
|
|
|
|
|
|
|
| |
Among other things, this introduces the idea of DBA-gated queues that
aren't the CABQ. The TDMA support requires this.
Tested:
* AR9580 (hostap mode)
* AR9380 (sta mode)
Approved by: re (gjb)
|
|
|
|
|
|
|
|
|
| |
qmisc/dmisc.
This is in preparation for some other TDMA fixes which will hopefully
end with having working TDMA.
But, it does avoid lots of read/modify/writes in the txq setup path.
|
|
|
|
| |
SM/MS macros.
|
|
|
|
|
|
|
| |
* Allow readyTime to just be programmed in directly
* The beacon interval and all of the beacon timing sysctl's are in TU,
not TSF. So, we were doing the wrong math on the CAB programming
in the first place.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This seems to make 5G work better.
It doesn't fix powersave handling though, that still sees the PHY get
stuck during initial calibration and everything goes pear shaped.
I'll look into that later.
Tested:
* QCAFN222 NIC, STA mode, 5GHz
Obtained from: Linux ath9k
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Turns out I wasn't even initialising or programming a lot of stuff
for the AR9462 2.1 chip. Oops.
This mostly gets it working. powersave scan results in some pretty
hilarious NFcal hangs and I don't see beacons reliably.
There are still some xlna gain tables missing that ath9k has; I'll
follow up with some fixes and then see if the QCAFN222 NIC I have
tests this path.
Tested:
* QCAFN222 NIC, STA mode, 2GHz and 5GHz
|
|
|
|
|
| |
This was just .. not programming in things, and thus large chunks
of the radio wouldn't work. Notably, 5GHz didn't work.
|
|
|
|
|
| |
(Note: jupiter 1.0 was emulation / test silicon, and was never released
in production. So, yes, AR_SREV_JUPITER() would really be fine.)
|
|
|
|
|
| |
The (upcoming) semi-working AR9462 2.1 support uses the 2.0 initvals
where appropriate, and those need to at least compile under freebsd.
|
|
|
|
| |
Obtained from: Linux ath9k
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are apparently conditional on there being a shared PA/LNA, which
at least on AR9462/QCA9535 devices I have isn't a thing.
I'm .. not yet sure which devices it /is/ a thing, so I'll come back
to that.
Tested:
* QCA9565 STA + bluetooth
Obtained from: Linux ath9k
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add extra debugging - the weights debugging is really useful to ensure
things are programmed into the wlan coexistence table. The weights are
what traffic priority each of the various modes get (tx, tx-high-priority,
rx-beacon, etc) if they're all zero, things work very poorly.
* Add in coex init routines from ath9k for AR9462 and QCA9565 1ANT and 2ANT.
This control things like beacon stomping, ACK handling, antennas, PA/LNA
shared, etc.
* Some ancillary bits.
TODO:
* There's some conditional stuff around MCI_ANT_ARCH_PA_LNA_SHARED() in ath9k
which doesn't always enable force-on LNA. That'll have to be examined
and merged in as appropriate.
Obtained from: linux ath9k
|