Implement cfg80211_{get,put}_bss currently doing malloc/free bits,
so hopefully the drivers get the calls right.
cfg80211_get_bss() sets up a lookup structure which may also take a
result (first hit wins) and calls ieee80211_scan_iterate() comparing
the various values in the iterator funcion. Some of the checks are
partially pointless (as it seems the drivers are not interested in
these parts [ANY] but we keep them for documentation purposes should
futher values arise in the future).
We currently only iterate over the first VAP which will do for now.
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
When initializing the sta set the per-band supported legacy rates
as some drivers take the information from there.
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Also deny suspension if we cannot check the above condition race-free
because there is more than one thread in the calling process.
PR: 267628, 267630
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D37896
Order includes alphabetically.
Remove unneeded sys/param.h, it is already included by sys/systm.h.
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D37896
... which verifies that given file table does not have file descriptors
referencing vnodes on the specified mount point. It is up to the caller
to ensure that the check is not racy.
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D37896
* Derive jail name from class name and method name, instead of just
method name. This change reduces the chances of different tests
clashing.
Old: 'jail_test_one'. New: 'pytest:TestExampleSimplest:test_one'
* Simplify vnetX_handler() method signature by skipping obj_map (unused)
and pipe. The latter can be accessed as the vnet property.
* Add `send_object()` method as a pair to the `wait_object` inside the
VnetTestTemplate class.
* Add `test_id` property to the BaseTest method. Previously it was
provided only for the VnetTestTemplate class. This change makes
the identifier easily accessible for all users.
MFC after: 2 weeks
Prior to Conrad's changes to replace session integer IDs with a
pointer to the driver-specific state in commit 1b0909d51a, the
driver had to find the softc pointer from the adapter before it could
locate the ccr_session structure for a completed request. Since
Conrad's changes, the ccr_session pointer can now be obtained directly
from the crp. Add a backpoint from ccr_session back to ccr_softc and
use this in place of the ccr_softc member in cxgbe's struct adapter.
Sponsored by: Chelsio Communications
getattr is very expensive and in important cases only gets called to get
the size. This can be optimized with a dedicated routine which obtains
that statistic.
As a step towards that goal make size-only consumers use a dedicated
routine.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D37885
Allow for site customization to minimize churn in share/mk
Reviewed by: stevek
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37895
fgetln() returns a pointer to an array of characters that is 'len'
characters long, not 'len + 1'. While here, overwriting the contents
of the buffer returned by fgetln isn't really safe, so switch to using
getline() instead.
Note that these fixes are a subset of those applied to a
near-identical copy of this function in libc's resolv_test.c in commit
2afeaad315.
Reviewed by: ngie
Reported by: CHERI (buffer overflow)
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D37886
Pass `-vv` to pytest in order to always get the full output.
While here, enforce the modeline.
Differential Revision: https://reviews.freebsd.org/D37894
MFC after: 2 weeks
If an error such as an invalid record or one whose decryption fails is
detected on a socket that has received a RST then ktls_drop() could
ignore the error since INP_DROPPED could already be set. In this case
soreceive_generic hangs since it does not return from a KTLS socket
with pending encrypted data unless there is an error (so_error) (this
behavior is to ensure that soreceive_generic doesn't return a
premature EOF when there is pending data still being decrypted).
Note that this was a bug prior to
69542f2682 as tcp_usr_abort would also
have ignored the error in this case.
Reviewed by: gallatin
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D37775
The command to generate termcap.small doesn't use any pipes, so this
option is not needed. Using it also breaks cross-building on hosts
where /bin/sh does not support pipefail such as Linux hosts where
/bin/sh is dash.
Reviewed by: sobomax, imp
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D37865
This reverts commit 92f0cf77db.
This change was incorrect, at least because it uses ovpn_kpeer's tree
for multipbe RB_TREEs.
This is a performance change, not a functional one, so we can revert
this until it can be fixed.
Reported by: Gert Doering <gert@greenie.muc.de>
Sponsored by: Rubicon Communications, LLC ("Netgate")
To quote from a comment above vput_final:
<quote>
* XXX Some filesystems pass in an exclusively locked vnode and strongly depend
* on the lock being held all the way until VOP_INACTIVE. This in particular
* happens with UFS which adds half-constructed vnodes to the hash, where they
* can be found by other code.
</quote>
As is there is no mechanism which allows filesystems to denote that a
vnode is fully initialized, consequently problems like the above are
only found the hard way(tm).
Add rudimentary support for state transitions, which in particular allow
to assert the vnode is not legally unlocked until its fate is decided
(either construction finishes or vgone is called to abort it).
The new field lands in a 1-byte hole, thus it does not grow the struct.
Bump __FreeBSD_version to 1400077
Reviewed by: kib (previous version)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D37759
While here prefix with v for better consistency with the vnode stuff.
Reviewed by: kib (previous version)
Differential Revision: https://reviews.freebsd.org/D37759
Also add a test to ensure that it is working correctly.
Submitted by: ota_j.email.ne.jp
Reviewed by: mckusick
Differential Revision: https://reviews.freebsd.org/D34012
Correct the format in sysctl net.inet.tcp.bb.disable_all and
sysctl net.inet.tcp.bb.log_auto_all.
Correct the format and the description in
net.inet.tcp.bb.log_auto_mode.
Reviewed by: rscheff, tuexen
MFC after: 1 week
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D37776
In source_hwaddr(), the configured ifname is compared against all
interfaces. However, in main(), the string 'netmap:' is prepended to the
interface string if no explicit type is given. Therefore the ifname will
not match any system interface and the source MAC address is always
empty.
Check for the leading 'netmap:' string and skip past it to match against
system interfaces. Note that 'tap:' and 'pcap:' devices strip the type
string from the ifname in main() so no further work is needed.
MFC after: 7 days
Submitted by: Brian Poole <brian90013@gmail.com>
netmap_monitor_stop() called nm_monitor_none() after the head of
the zero-copy monitors had been reset, thus thinking that there
was nothing left to do.
MFC after: 7 days
Netmap users on FreeBSD are not supposed to import code from the
github netmap repository anymore. They should use the code that
is available in the src repo. We can therefore drop the compatibility
code.
MFC after: 7 days
in seqcount_mutex_t case with removal of extraneous mutex lock/unlock
calls and addition of missing critical section.
While here strip one inline wrap layer to reduce code size.
Fixes startup lockup of i915kms after update to drm-kmod v5.12
Reviewed by: hselasky, bz
MFC after: 1week
Differential Revision: https://reviews.freebsd.org/D37699
for all devices except Kensington Slimblade Trackball as it brokes
some other devices like Contour Rollermouse Red
Add a quirk for it as well.
Reported by: Atte Peltomäki <koston_AT_iki_DOT_fi>
PR: 267922
MFC after: 2 weeks
for all devices except Kensington Slimblade Trackball as it brokes
some other devices like Contour Rollermouse Red
Add a quirk for it as well.
Reported by: Atte Peltomäki <koston_AT_iki_DOT_fi>
PR: 267922
MFC after: 2 weeks
While there, move all error checks into the common place at the start,
and eliminate the 'out' label.
PR: 268528
Analyzed and tested by: Mark Millard <marklmi@yahoo.com>
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D37866