Filling in read-behind pages in vnode_pager_generic_getpages() is made
very slightly simpler here, by avoiding overflowing the startpindex
variable and then avoiding an extra test in the allocation loop that
handles the overflow case.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D49200
This decodes the AES-GCMP OUI in ifconfig, ifconfig list sta,
ifconfig list scan, etc.
Differential Revision: https://reviews.freebsd.org/D49187
Reviewed by: bz
Most important for us is the max interrupt remapping count report in the
EFR2 register.
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
ieee80211_node_set_txrate_ht_mcsrate() takes an MCS rate from 0..76,
the high bit (IEEE80211_RATE_MCS) must not be set.
This is definitely my fault - I likely didn't get to testing this
diff when I changed it from ieee80211_node_set_txrate_dot11rate()
just before landing.
Differential Revision: https://reviews.freebsd.org/D49197
Reviewed by: bz
Add starting documentation of the IfAPI to the ifnet(9) page. This
replaces the existing struct ifnet documentation, since it's to be
treated as opaque now.
Reviewed by: #manpages, adrian, ziaee
Differential Revision: https://reviews.freebsd.org/D47931
Error introduced during a refactoring; cd9660_susp_initialize calls
itself recursively.
Sponsred by: The FreeBSD Foundation
Fixes: 35a2e286157a ("makefs: Record inode for all entries in mtree mode")
Summary:
The device IDs for these were in the driver's list of PCI ids to attach
to, but igc_set_mac_type() had never been setup to set the correct mac
type for these devices. Fix this by adding these IDs to the switch block
in order for them to be recognized by the driver instead of returning an
error.
This fixes the igc(4) attach for the I226-K LOM on the ASRock Z790
PG-ITX/TB4 motherboard, allowing it to be recognized and used.
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: kbowling@
MFC after: 3 days
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D49147
The Netlink RFC doesn't say that explicitly, but general discussion seems
to state that a single netlink message shall be delivered in a single
send(2) to the socket. So, if a single message doesn't fit into buffer it
is clear EMSGSIZE. The RFC is unclear if application is allowed to send
several smaller messages with a single syscall potentially overflowing the
buffer and whether kernel should accept any of them. At the moment, no
legit application does that. So, decision was taken not to overload
nl_sosend() with a message parsing logic and deny any oversized write.
Reported-by: syzbot+eb5db60d36b005dbccf5@syzkaller.appspotmail.com
Rock Ridge extensions include an inode field:
"POSIX File Serial Number" shall have the same meaning as and may be
used for the st_ino field of POSIX:5.6.1. This field shall be
recorded according to ISO 9660:7.3.3. Directory Records which share
the value of this field are defined as links (see POSIX:2.2.2.17)
and, by definition, point to the same file or directory.
Previously we'd store the source file's st_ino (except that in metalog
mode we'd record 0 for files with nlink = 1). This had two issues: the
generated ISO image was nonreproducible due to the arbitrary inode
numbers, and files without hard links would falsely be detected (by
certain tools) as hard links to each other.
Note that the kernel's cd9660(5) file system ignores the Rock Ridge
PX File Serial Number, so this issue isn't observed by mounting such a
file system.
Instead of using the source inode directly, assign target inode numbers
sequentially. Use a map so that files with the same source inode (hard
links) still receive the same target inode number.
PR: 284795
PR: 285027
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49141
Set package archive timestamps based on most recent source commit
timestamp (approach suggested by bapt).
I'd like to include git metadata in a file included in src tarballs, so
that the build is reproducible (including the hash shown in uname etc.)
outside of a git checkout. There are still details to be sorted out to
do that, so this is an interim step to improve reproducibility.
Reviewed by: bapt
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49165
* add static where needed
* delete old unused flags, dating back to the initial commit from Sam
* indirect through void * where appropriate, to avoid LLVM alignment
errors
* PRIu64 where needed
This does work, but it currently doesn't track the ifname itself,
so we see ifindexes, not ifnames:
Wed Feb 26 18:35:59 RTM_IEEE80211: if# 2, scan complete
Wed Feb 26 18:35:59 RTM_IEEE80211: if# 2, associate with 30🇩🇪4b:db:46:0a
Wed Feb 26 18:35:59 RTM_IFINFO: if# 2, link: up, flags:<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
.. but it does work!
Differential Revision: https://reviews.freebsd.org/D49149
I don't know what I was thinking in 2017 when I wrote this, but
it's very wrong.
Use ifa->ifa_next to iterate, not the array index / pointer arithmetic.
Differential Revision: https://reviews.freebsd.org/D49148
Interfaces all have an mlink to if_$foo. Add these for the missing ones
and remove an incorrect one from rtwn_pci. Wireless network drivers are
all accessible via `apropos -s4 "wireless network driver", except two
which are "wireless network device". I actually prefer the latter, but
make them all consistent upon the more common parlance. Tag SPDX on one
of the files I touched, while here.
MFC after: 3 days
Reviewed by: bz, carlavilla, mhorne
Approved by: carlavilla, mhorne (mentors)
Differential Revision: https://reviews.freebsd.org/D49063
The 'while' part corresponding to the 'do' was missing.
Did not notice the problem as later commits using it have been stashed
and never reworked up to now, and it is currently unused in the tree.
While here, fix spacing after the '#define' in the !(_KERNEL &&
INVARIANS) part.
Fixes: 34740937f7 ("queue: New debug macros for STAILQ")
MFC after: 1 minute
Sponsored by: The FreeBSD Foundation
Provide more details about the influence of optargs' first character
on the shell's behavior in regard to invalid arguments. Also do some
minor word-smithing.
Original submission by rea@
Differential Revision: https://reviews.freebsd.org/D49106
vm_page_alloc() just calls vm_page_alloc_after(), after it has found
the predecessor of a page parameter. Many callers of vm_page_alloc()
already know that predecessor. Letting them pass that to
vm_page_alloc_after() directly could save a little redundant
calculation.
Reviewed by: alc
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D49103
Currently af-to works only on inbound interface by creating a reversed
NAT state key which is used to match traffic returning on the outbound
interface.
Such limitation is not necessary. When an af-to state is created
for an outbound rule do not reverse the NAT state key, making it work
just like if it was created for a normal NAT rule. Depending on firewall
design it might be easier and more natural to use af-to on the outbound
interface.
Reviewed by: kp
Approved by: kp (mentor)
Sponsored by: InnoGames GmbH
Differential Revision: https://reviews.freebsd.org/D49122
Fix typo in commit e59991206b ("==" instead of "=" for the assignment
of st_ino).
Reported by: Coverity Scan CID 1592442
Approved by: kib
Fixes: e59991206b fts(3): be less strict when automount does its job under us walking autofs mount
Set the default refill threshod to be one quarter of the rx queue
length. User can change this value with hw.mana.rx_refill_thresh
in loader.conf. It improves the rx completion handling by saving
10% to 15% of overall time with this change.
Tested by: whu
MFC after: 2 weeks
Sponsored by: Microsoft
libzfs insists that these be cloned from the origin, so avoid making a
deep copy of them ourselves to unbreak creating a new BE from a BE with
encrypted components -- in today's environment, without a loader that
does encryption, this means a deep BE setup where something underneath
the BE (e.g., home directories) are encrypted.
Reported and tested by: arrowd
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D48464
The isi_txrate field is 8 bits and only represents legacy/HT rates.
So to avoid logging a warning, only populate if it's a legacy/HT
rate.
Differential Revision: https://reviews.freebsd.org/D48616
This is one of the two obvious left-over dot11rate lookups that trigger
a debug print. (The other is get_sta_info()).
* Change ieee80211_rate2media() to use the passed in ieee80211_node_txrate
and use the rate type field to see if it's legacy/ht or vht.
* .. and (I hope!) actually handle the VHT rate correctly.
* Change the callers of ieee80211_rate2media() to use the new static
initialisers.
For the one spot in ieee80211_ht.c which uses the HT initialiser, it should
just be a straight up mechanical change that correctly sets the HT MCS
rate.
For the rest of them in ieee80211.c, they're doing table initialisation
for the media types / rates, and it's currently very focused on legacy
rates. So just leave that all as-is for now with a mechanical change.
Differential Revision: https://reviews.freebsd.org/D48615
Update ieee80211_node_get_txrate_mbit() to use
ieee80211_phy_vht_get_mcs_kbit() to calculate VHT rates.
For now just assume long-GI; I'd have to go and do some extra
work to figure out which short/long GI flag to use.
Differential Revision: https://reviews.freebsd.org/D48613
This is a simple implementation, similar to HT, to generate
VHT MCS rates for testing.
I've verified it seems to do the right thing through
MCS 0..9 and NSS 1..2. It's not very optimal - same issues as
with 11n - but it at least now fully tests the 11ac TX path in
rtwn and the tx rate refactoring.
Differential Revision: https://reviews.freebsd.org/D48611
Refactor amrr_node_init() into HT and legacy paths, clean up the
printing to be a bit clearer about the selected rates.
This is precursor work to setting VHT rates in ni->ni_txrate .
Differential Revision: https://reviews.freebsd.org/D48429
Split the amrr_update() routine into HT and legacy paths.
Currently they're the same, minus HT / non-HT specific comments
and some logging changes.
HT rates don't monotonically go up (ie, going MCS 7 -> MCS 8 is wrong,
as MCS8 is "just" two stream MCS0) and failing a rate by a little
shouldn't necessarily preclude testing the next rate up.
This should be a no-op, besides the logging changes.
Locally tested:
* RTL8192CU, STA mode
Differential Revision: https://reviews.freebsd.org/D48248
Reviewed by: bz, thj
Introduce ieee80211_vht_node_check_tx_valid_mcs(), which takes the
node, bandwidth, NSS and MCS and validates whether that is possible
to TX to the given node.
Differential Revision: https://reviews.freebsd.org/D48610
Reviewed by: bz, thj
* add a node VHT transmit function, which configures the parameters
accordingly.
* add a node VHT transmit function which just copies in another
ieee80211_node_txrate struct.
Differential Revision: https://reviews.freebsd.org/D48609
Reviewed by: bz
Not all NSS / MCS / channel bandwidth combinations are valid.
This will be important for rate control and transmit rate
setup (eg static management, unicast, multicast rates.)
This is based on 802.11-2020 Section 21.5 (Parameters for VHT-MCSs.)
Differential Revision: https://reviews.freebsd.org/D48608
Reviewed by: bz
Implement ieee80211_setup_vht_rates() - calculate the intersection between
the peers advertised RX VHT MCS map and the vap's configured TX map.
Whilst here, remove the unused vhtcap/vhtinfo fields; they're
already populated in the ieee80211_node before ieee80211_setup_vht_rates()
is called.
Differential Revision: https://reviews.freebsd.org/D48607
Reviewed by: bz
Migrate the transmit path to use ieee80211_node_get_txrate(), and handle
VHT rates.
Nothing is currently setting VHT rates, but the driver should now
be ready.
Differential Revision: https://reviews.freebsd.org/D48606
Reviewed by: bz