| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
diversity.
Notably, this also sets AR_BTCOEX_WL_LNADIV to FORCE_ON, so LNA diversity
is always enabled and under control of the wifi chip.
Tested:
* QCA9565, STA + bluetooth mode
Obtained from: Linux ath9k
|
|
|
|
| |
Obtained from: Linux ath9k
|
|
|
|
|
|
|
|
|
|
|
|
| |
This configures the LNA antenna diversity control, which should be on
if wlan owns the LNA for bluetooth coexistence. Otherwise, make sure
it's off.
I think this is eventually intended to allow 1-antenna bluetooth +
wifi setups for QCA9565, but I'm not sure where that's actually configured
in ath9k.
Obtained from: Linux ath9k
|
| |
|
|
|
|
| |
It's not /really/ "get state".
|
|
|
|
|
|
| |
This is required for upcoming MCI fixes.
Obtained from: Linux ath9k
|
|
|
|
|
|
|
|
|
|
|
| |
ar9300_freebsd_inc.h.
The eventual MCI driver side of things needs the MCI bits to live
in the HAL API so we can get to them.
Tested:
* QCA9565, STA mode + bluetooth
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that the srev checks can't be done in the early attach
in ar9300_freebsd.c, because the poweron and srev check hasn't yet
happened.
So:
* Re-add the MCI overrides in attach
* Add QCA9565 (Aphrodite) check for the LNA diversity stuff.
Tested:
* QCA9565, STA mode + bluetooth
|
|
|
|
| |
Relnotes: yes
|
|
|
|
|
| |
MFC after: 1 month
X-MFC with: r300259
|
|
|
|
|
|
|
|
| |
ip_frag tuneables aren't registered in the ipf_tuners linked list.
This commmit enables the two existing ip_frag tuneables by registering
them.
MFC after: 1 month
|
|
|
|
|
| |
Reported by: Coverity CID 1354625
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
now. The following upstream commits are reverted from hwregs.c:
https://github.com/acpica/acpica/commit/96ece05
https://github.com/acpica/acpica/commit/3d8583a
https://github.com/acpica/acpica/commit/48eea5e
https://github.com/acpica/acpica/commit/0a212c3
https://github.com/acpica/acpica/commit/41f6aef
https://github.com/acpica/acpica/commit/26434b9
https://github.com/acpica/acpica/commit/c23034a
https://github.com/acpica/acpica/commit/c49a751
Note this commit will be reverted when the upstream fixes the code properly.
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
Not sure how this worked testing with DIAGNOSTIC set, but with it disabled this
fails due to the spinlock being "initialized" with 0xdeadc0de.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Changing fast_reg.length to 64 bits is planned in the future. Krping
uses 32-bit lengths internally.
Sponsored by: Mellanox Technologies
MFC after: 1 week
|
| |
| |
| |
| | |
MFC after: 4 weeks
|
| |
| |
| |
| |
| |
| | |
Reviewed by: hselasky@
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D5931
|
| |
| |
| |
| |
| |
| | |
Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D5777
|
| |
| |
| |
| |
| |
| |
| |
| | |
for bad packets are named ipf_fi_bad_*. An example of its use might be:
dtrace -n 'sdt:::ipf_fi_bad_* { stack(); }'
Reviewed by: Darren Reed <darrenr@reed.wattle.id.au>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We're currently seeing how hard it would be to run CloudABI binaries on
operating systems cannot be modified easily (Windows, Mac OS X). The
idea is that we want to just run them without any sandboxing. Now
that CloudABI executables are PIE, this is already a bit easier, but TLS
is still problematic:
- CloudABI executables want to write to the %fs, which typically
requires extra system calls by the emulator every time it needs to
switch between CloudABI's and its own TLS.
- If CloudABI executables overwrite the %fs base unconditionally, it
also becomes harder for the emulator to store a backup of the old
value of %fs. To solve this, let's no longer overwrite %fs, but just
%fs:0.
As CloudABI's C library does not use a TCB, this space can now be used
by an emulator to keep track of its internal state. The executable can
now safely overwrite %fs:0, as long as it makes sure that the TCB is
copied over to the new TLS area.
Ensure that there is an initial TLS area set up when the process starts,
only containing a bogus TCB. We don't really care about its contents on
FreeBSD.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D5836
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some time ago I made a change to merge together the memory scope
definitions used by mmap (MAP_{PRIVATE,SHARED}) and lock objects
(PTHREAD_PROCESS_{PRIVATE,SHARED}). Though that sounded pretty smart
back then, it's backfiring. In the case of mmap it's used with other
flags in a bitmask, but for locking it's an enumeration. As our plan is
to automatically generate bindings for other languages, that looks a bit
sloppy.
Change all of the locking functions to use separate flags instead.
Obtained from: https://github.com/NuxiNL/cloudabi
|
| |
| |
| |
| |
| |
| |
| |
| | |
requests if cb->state is not IDLE.
Submitted by: Krishnamraju Eraparaju @ Chelsio
Reviewed by: Steve Wise @ Open Grid Computing
Sponsored by: Chelsio Communications
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The type definitions and constants that were used by COMPAT_CLOUDABI64
are a literal copy of some headers stored inside of CloudABI's C
library, cloudlibc. What is annoying is that we can't make use of
cloudlibc's system call list, as the format is completely different and
doesn't provide enough information. It had to be synced in manually.
We recently decided to solve this (and some other problems) by moving
the ABI definitions into a separate file:
https://github.com/NuxiNL/cloudabi/blob/master/cloudabi.txt
This file is processed by a pile of Python scripts to generate the
header files like before, documentation (markdown), but in our case more
importantly: a FreeBSD system call table.
This change discards the old files in sys/contrib/cloudabi and replaces
them by the latest copies, which requires some minor changes here and
there. Because cloudabi.txt also enforces consistent names of the system
call arguments, we have to patch up a small number of system call
implementations to use the new argument names.
The new header files can also be included directly in FreeBSD kernel
space without needing any includes/defines, so we can now remove
cloudabi_syscalldefs.h and cloudabi64_syscalldefs.h. Patch up the
sources to include the definitions directly from sys/contrib/cloudabi
instead.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Initialize pointer in question which is used only when fast registers
mode is selected.
Sponsored by: Mellanox Technologies
MFC after: 1 week
|
| |
| |
| |
| |
| | |
Reported by: PVS-Studio (V595) in D5245
Differential Revision: D5245
|