| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
Create a directory for testing tools arond CAM. These are snippets of
what will eventually be camio. At the moment, it was written using fbt
traces. This is OK, but fragile, so they need to be re-written with the
cam provider. cam_all_but_scsi.d is the first step. It shows how to do
this with the new cam dtrace provider.
Sponsored by: Netflix
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D54472
|
| |
|
|
|
|
| |
Sponsored by: Netflix
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D54471
|
| |
|
|
|
|
|
|
|
| |
When the device isn't there, we don't have valid inq data. Pass NULL in
this case. All the routines that receive this test against NULL already.
Sponsored by: Netflix
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D54470
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
cam::xpt:action(union ccb *)
cam::xpt:done((union ccb *)
cam::xpt:async-cb(void *cbarg, uint32_t async_code, struct cam_path
*path, void *async_arg);
Called when xpt_action(), xpt_done*() and the xpt async callbacks are
called.
Sponsored by: Netflix
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D54469
|
| |
|
|
|
|
|
|
|
| |
Start to provide robust tracing in cam now that clang has broken my
fbt-based dtrace scripts a couple of times.
Sponsored by: Netflix
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D54468
|
| |
|
|
|
|
| |
Sponsored by: Netflix
Reviewed by: adrian, andrew
Differential Revision: https://reviews.freebsd.org/D54510
|
|
|
SerialPort in the SPCR is zeroed when serial redirection is disabled,
rather than the SPCR being omitted from the ACPI tables ony many
systems. Check to see that SerialPort.Address is non-zero before using.
FreeBSD would fail to boot on systems that could have a serial port
redireciton, but don't have it enabled because the loader would create a
bogus hw.uart.console. While one could unset this value to boot, you
couldn't do that automatically very easily. Instead, don't even look
at the SPCR table if the SerialPort is zero'd.
PR: 292206
MFC After: 3 days
Sponsored by: Netflix
Co-authored-by: Warner Losh <imp@FreeBSD.org>
Closes: https://github.com/freebsd/freebsd-src/pull/1948
|
|
|
Freeing completed transmit mbufs can be time consuming (due to them
being cold in cache, and due to ext free routines taking locks),
especially when we batch tx completions. If we do this when holding
the tx ring mutex, this can cause lock contention on the tx ring mutex
when using iflib_simple_transmit.
To resolve this, this patch opportunistically copies completed mbuf
pointers into a new array (ifsd_m_defer) so they can be freed after
dropping the transmit mutex. The ifsd_m_defer array is
opportunistically used, and may be NULL. If its NULL, then we free
mbufs in the old way. The ifsd_m_defer array is atomically nulled
when a thread is using it, and atomically restored when the freeing
thread is done with it. The use of atomics here avoids
acquire/release of the tx lock to restore the array after freeing
mbufs.
Since we're no longer always freeing mbufs inline, peeking into them to see if a
transmit used TSO or not will cause a useless cache miss, as nothing
else in the mbuf is likely to be accessed soon. To avoid that cache
miss, we encode a TSO or not TSO flag in the lower bits of the mbuf
pointer stored in the ifsd_m array. Note that the IFLIB_NO_TSO flag
exists primarily for sanity/debugging.
iflib_completed_tx_reclaim() was refactored to break out
iflib_txq_can_reclaim() and _iflib_completed_tx_reclaim()
so the that the tx routine can call iflib_tx_credits_update()
just once, rather than twice.
Note that deferred mbuf freeing is not enabled by default, and can be
enabled using the dev.$DEV.$UNIT.iflib.tx_defer_mfree sysctl.
Differential Revision: https://reviews.freebsd.org/D54356
Sponsored by: Netflix
Reviewed by: markj, kbowling, ziaee
|
|
|
Document the new tx related sysctls I've added to iflib in the
last few months: tx_reclaim_ticks & tx_reclaim_thresh
Sponsored by: Netflix
Reviewed by: ziaee
Differential Revision: https://reviews.freebsd.org/D54564
MFC after: 3 days
|
|
|
Ever since "d9c55b2e8cd6 rss: Enable portions of RSS globally.."
exposed the RSS software hashing functions, it has been possible
to use them without "ifdef RSS". Do so now in the syncache
so as to get flowids recorded.
Note that the use of the rss hash functions is conditional on IP versions,
so we must ifdef INET to ensure rss_proto_software_hash_v4() is available.
Fixes 73fe85e486d2
Sponsored by: Netflix
Reviewed by: glebius, p.mousavizadeh_protonmail.com, nickbanks_netflix.com, tuexen
Differential Revision: https://reviews.freebsd.org/D54534
|
|
|
According to section 8.3.2.2.1 of the XL710 datasheet,
FLTSTAT indicates if RSS hashing was used (or flow director
or nothing) to arrive at the flowid it is reporting.
We need to check this before reporting the flowid and setting the
rss type. Not checking this allows invalid flowids (0s) to be
reported for some TCP traffic (it seems to mostly impact incoming
connections). This leads to the inp flowid being 0, and egress
traffic being unbalanced (going to tx queue 0, and NIC 0 of an
lacp bundle).
Differential Revision: https://reviews.freebsd.org/D54442
Reviewed by: adrian, kbowling
Sponsored by: Netflix
MFC after: 2 weeks
|
|
|
Some minor comment cleanup, add a comment about an unused value, etc.
No functional change.
Sponsored by: Netflix
|
|
|
Don't split the error messages across lines. We used to do that ages
ago, but have relaxed style(9) to encourage the opposite so all error
messages can be grepped. This constantly slows me down when I'm helping
others find issues, so start here by splitting according to normal
style(9) rules with a relaxed line length of 90.
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are many environments that you do not want the paths to be
canonicalized. For example, if I always build a product from a specific
path in a jail that's dependent on the product version, I don't want
that to be sanitized to /usr/src because when I have profiling tools run
against multiple kernels, I can't do A/B testing and results processing
if everything points to /usr/src (sadly, the profiling tools cannot
remap back to the original like gdb can). Since we need both active at
the same time, symbloic link fallbacks don't work.
We do want the rest of the build to be reproducible, however. We'll get
the same binaries if we rebuild later since we always rebuild with the
same path.
Turn them both on for maximum reproduction for environments where that
cannot be guaranteed.
Sponsored by: Netflix
Input from: emaste, ivy
Differential Revision: https://reviews.freebsd.org/D52959
|
| |
|
|
|
|
| |
For greppability, use C99 initializers for the struct file_format.
Sponsored by: Netflix
|
|
|
Fix powerpc 64 little endian booting by adding some padding. Due to
https://gitlab.com/slof/slof/-/blob/master/lib/libelf/elf32.c?ref_type=heads#L114
https://gitlab.com/slof/slof/-/blob/master/lib/libelf/elf32.c?ref_type=heads#L150
using <= instead of <, slof used to loop over the phdrs. It overruns by
1 and so on little endian it swizzles the first 32 bytes of .text. Work
around this by adding 32 bytes of padding after the headers. We should
fix this in slof, but it's in the just released QEMU 10.2, so we have to
pad things here for now.
Now powerpc64le + qemu works.
MFC After: 3 days (maybe EN too)
Reviewed by: adrian, jhibbits
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
| |
For now, the only kernel module built is acpi_ged.ko.
Sponsored by: Netflix
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D54315
|
| |
|
|
|
|
|
|
| |
This makes diffs that add or remove modules easier to read.
Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54314
|
| |
|
|
|
|
| |
Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54313
|
| |
|
|
|
|
|
|
|
| |
This function is only called from device attach routines which can
sleep.
Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54312
|
| |
|
|
|
|
| |
Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54311
|
| |
|
|
|
|
|
|
|
|
| |
This is only used during attach and freed after use, so just use a
local variable in the attach routine instead to avoid leaving a
dangling pointer around in the softc.
Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54310
|
| |
|
|
|
|
| |
Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54309
|
|
|
- Decode the Action, Instruction, and Flags fields for these tables
- Omit the Flags field if it is zero
- Omit the Value field for instrunctions that do not use it
Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54308
|
| |
|
|
|
|
|
|
|
|
|
| |
Some drivers want the TLS seqno when offload starts. Capture this
for them by adding a union for initial_seqno, sharing space with
the TLS 1.0 next_seqno.
Reviewed by: jhb
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54275
MFC After: 1 month
|
|
|
This change adds support to iflib for drivers that want to do
transmit-side NIC ktls offload. This change does 2 things:
1) Extends the pkt info to include an optional mbuf pointer.
This gives drivers the ability to find the start of a TLS record if
they need to re-DMA part of the record to re-construct TLS state on
the NIC. This mbuf pointer is only passed when CSUM_SND_TAG is
present on the pkthdr. Note that I don't bother to inspect the send
tag on purpose; this will only be present for TLS offloaded or paced
connections
2) Allows the driver to specify how much ring padding is needed
before the ring is considered to be full using the new isc_tx_pad
field in if_softc_ctx.
This re-uses a field that was marked spare in 2019 via d49e83eac3baf.
Iflib initializes this to the previous value of 2 slots and allows the
driver to override it. The TXQ_AVAIL() macro has been adjusted to
subtract this padding, and uses of the macro have removed +2 from the
other side of the comparison. To avoid potential cache misses from
looking at the ifc_softc_ctx in TXQ_AVAIL(), the value is mirrored in
the txq (in an alignment hole).
Reviewed by: kbowling, kgalazka, sumit.saxena_broadcom.com, shurd
Sponsored by: Netflix
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D54274
|
|
|
This makes it easier to reason about system topology, and to
potentially map applications to NIC queues by (ab)using the
mbuf flowid to select egress NIC and queue in a predictable fashion.
Differential Revision: https://reviews.freebsd.org/D54053
Reviewed by: glebius, kbowling
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
| |
wlun probing was added after my initial work on this and was overlooked
in merging forward. Add the timeout here too, for the same reasons as
for REPORT LUNS. This doesn't change the default.
Fixes: 8ac7a3801c6a cam: Reduce overly long timeout values for initial device probing
Sponsored by: Netflix
Reviewed by: jaeyoon
Differential Revision: https://reviews.freebsd.org/D54184
|
|
|
Currently, we have very long timeouts for the initial probing
commands. However, these are not appropriate for modern (post 2010) SCSI
disks. Sandards since SPC3 state that these commands should not wait for
media access. Since we retry them several times during the initial bus
scan, these delays can delay the boot by minutes (5 minutes per errant
disk in our expereince). These delays don't help and only hurt, so
reduce the TESTUNITREADY, INQUIRY and MODESENSE commands (during the
initial probe). Provide sysctl/tuneables to change the time for these
and also the REPORTLUNS commands for people that might need to adjust
them for devices that violate this belief but none-the-less work with
longer timeouts.
kern.cam.tur_timeout (default was 60s, now 1s)
kern.cam.inquiry_timeout (default was 60s, now 1s)
kern.cam.reportluns_timeout (default is 60s)
kern.cam.modesense_timeout (default was 60s, now 1s)
This can be partially merged: the sysctls can, but the new defaults likely
shouldn't.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D52427
|
| |
|
|
|
|
| |
Only attach CAM to the nvme storage devices.
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
| |
Now that we've moved to newbus methods, we can delete this...
Sponsored by: Netflix
Reviewed by: dab
Differential Revision: https://reviews.freebsd.org/D54095
|
| |
|
|
|
|
| |
Sponsored by: Netflix
Reviewed by: dab
Differential Revision: https://reviews.freebsd.org/D51391
|
| |
|
|
|
|
|
|
|
| |
Nothing uses these at the moment, but it would be useful to use in the
future so convert this functionality to an newbus function dispatch.
Sponsored by: Netflix
Reviewed by: dab
Differential Revision: https://reviews.freebsd.org/D51390
|
| |
|
|
|
|
|
|
| |
Conenct methods to manage namespaces explicitly to replace the old
consumer interface.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D51388
|
| |
|
|
|
|
|
|
|
| |
Connect up the nvme_ns_* events. Copy code from old ways, as needed, and
refactor a little.
Sponsored by: Netflix
Reviewed by: dab
Differential Revision: https://reviews.freebsd.org/D51387
|
| |
|
|
|
|
|
|
|
|
|
| |
Rather than registering as a consumer of the nvme controller, hook into
the child device and use that.
This is a small regression at the moment: we don't fail the device when
that happens at runtime.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D51385
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Rather than registering as a consumer of the nvme controller, hook into
the child device and use that.
This is a small regression at the moment: we don't fail the device when
that happens at runtime, and we don't handle new namespaces when they
arrive (though that feature is currently fragile).
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D51384
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Step 1 in the move from registering consumers for NVMe drives to newbus
nvme drives:
Add a child device and attach them for each controller that we
initialize. Detach them when we detach the main device.
Sponsored by: Netflix
Reviewed by: dab
Differential Revision: https://reviews.freebsd.org/D51383
|
|
|
Interface for the nvme driver notifying its children of different
events: async notifications, namespace events and device failure. These
aren't yet connected.
Sponsored by: Netflix
Reviewed by: dab
Differential Revision: https://reviews.freebsd.org/D51386
|
| |
|
|
|
|
|
| |
A more efficient way to include multiple bits of data in a sense
decriptor was defined in SBC4 in 2020. Decode and print it.
Sponsored by: Netflix
|
| |
|
|
|
|
| |
Decode the descriptors we put into devd.
Sponsored by: Netflix
|
|
|
These were a doodle that escaped into my staging tree. Remove them.
Sponsored by: Netflix
|
|
|
When looking for the boot_params symbol we need to get the UEFI memory
map, use host: prefix. The short-circuit we have for this only works
when we have a filesystem. During the earliest parts of boot, we can
sometimes not have this yet, so making this explicit allows these
environments to function.
It's always in the host path. Print better
error messages, and add newlines in two palces.
Sponsored by: Netflix
|
|
|
- change the state to SPLICE_EXCEPTION to allow so_unsplice() to work
to cleanup failed splices (fixes socket reference leak)
- NULL out sp->dst when unsplicing from so_splice() before so2 has been
been referenced.
- Deal with a null sp->dst / so2 in so_unsplice
- Fix asserts that talked about sp->state == SPLICE_INIT; that state
is not possible here.
Differential Revision: https://reviews.freebsd.org/D54157
Reviewed by: markj
Sponsored by: Netflix
Fixes: c0c5d01e5374 ("so_splice: Synchronize so_unsplice() with so_splice()")
MFC after: 3 days
|
| |
|
|
|
|
|
| |
NVME_NS_ADDED will conflict with a later change, so change it here.
Likewise NVME_NS_CHANGED.
Sponsored by: Netflix
|
|
|
Improve the wording of the invalid namespace value. Reword the comment
and move a line of code to the block it logically belongs to.
No functional changes intended.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D51393
|
|
|
Depreciation notice for net.inet.tcp.newsack is in 15.0.
Remove this tunable for HEAD, streamlining the code slightly.
Reviewed by: tuexen, cc, nickbanks_netflix.com, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D54072
|
|
|
The reladr field wasn't being set, so pmi and reladr args were
nops. That's OK, because they are passed as 0 in the one place in the
tree we use this.
Sponsored by: Netflix
|
|
|
Remove extra arg so that we have type=SMART_ERROR rather than an invalid
message. Also log all aens.
Sponsored by: Netflix
|
| |
|
|
|
|
| |
Fixes: 42421307b115 (sys: remove armv6/6.1 support from debug monitor)
Suggested by: jhb
Sponsored by: Netflix
|