Commit Graph

38753 Commits

Author SHA1 Message Date
Allan Jude
11ba8488b8 iicsmb: Request the bus recursively in bread()
ipmi_ssif will `smbus_request_bus()` to do multiple smbus requests
(which requests the iicbus), and then here in `bread()` we also need to
request the bus because `bread()` takes multiple transactions.
This causes deadlock as it's waiting for the bus it already has without
`IIC_RECURSIVE`.

Sponsored by:	Ampere Computing LLC
Submitted by:	Klara Inc.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D28742
2021-02-23 20:06:16 +00:00
Alexander Motin
d510bf133d cxgb(4): Rework my commit 9dc7c250.
The previous implementation was reported to try to coalesce packets
in situations when it should not, that resulted in assertion later.
This implementation better checks the first packet of the chain for
the coallescing elligibility.

MFC after:	3 days
2021-02-22 17:33:43 -05:00
Alexander Motin
6895f89fe5 Coalesce socket reads in software iSCSI.
Instead of 2-4 socket reads per PDU this can do as low as one read
per megabyte, dramatically reducing TCP overhead and lock contention.

With this on iSCSI target I can write more than 4GB/s through a
single connection.

MFC after:	1 month
2021-02-22 12:51:59 -05:00
Alex Richardson
c1b554c868 if_vtnet: Fix pointer-sign and used parameter warnings
Reviewed By:	grehan
Differential Revision: https://reviews.freebsd.org/D28726
2021-02-22 17:41:04 +00:00
Roger Pau Monné
808d4aad10 xen-blkback: fix leak of grant maps on ring setup failure
Multi page rings are mapped using a single hypercall that gets passed
an array of grants to map. One of the grants in the array failing to
map would lead to the failure of the whole ring setup operation, but
there was no cleanup of the rest of the grant maps in the array that
could have likely been created as a result of the hypercall.

Add proper cleanup on the failure path during ring setup to unmap any
grants that could have been created.

This is part of XSA-361.

Sponsored by:	Citrix Systems R&D
2021-02-22 16:47:52 +01:00
Alexander Motin
2c7dc6bae9 Refactor CTL datamove KPI.
- Make frontends call unified CTL core method ctl_datamove_done()
to report move completion.  It allows to reduce code duplication
in differerent backends by accounting DMA time in common code.
 - Add to ctl_datamove_done() and be_move_done() callback samethr
argument, reporting whether the callback is called in the same
context as ctl_datamove().  It allows for some cases like iSCSI
write with immediate data or camsim frontend write save one context
switch, since we know that the context is sleepable.
 - Remove data_move_done() methods from struct ctl_backend_driver,
unused since forever.

MFC after:	 1 month
2021-02-21 16:52:33 -05:00
Navdeep Parhar
0460a45062 cxgbe(4): Use the correct filter width for T5+.
T5 and above have extra bits for the optional filter fields.  This is a
correctness issue and not just a waste because a filter mode valid on a
T4 (36b) may not be valid on a T5+ (40b).

MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2021-02-19 14:23:58 -08:00
Navdeep Parhar
c91dda5ad9 cxgbe(4): Add a driver ioctl to set the filter mask.
Allow the filter mask (aka the hashfilter mode when hashfilters are
in use) to be set any time it is safe to do so.  The requested mask
must be a subset of the filter mode already.  The driver will not change
the mode or ingress config just to support a new mask.

MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2021-02-19 14:23:58 -08:00
Navdeep Parhar
7ac8040a99 cxgbe(4): Use firmware commands to get/set filter configuration.
1. Query the firmware for filter mode, mask, and related ingress config
   instead of trying to figure them out from hardware registers.  Read
   configuration from the registers only when the firmware does not
   support this query.

2. Use the firmware to set the filter mode.  This is the correct way to
   do it and is more flexible as well.  The filter mode (and associated
   ingress config) can now be changed any time it is safe to do so.

   The user can specify a subset of a valid mode and the driver will
   enable enough bits to make sure that the mode is maxed out -- that
   is, it is not possible to set another bit without exceeding the
   total width for optional filter fields.  This is a hardware
   requirement that was not enforced by the driver previously.

MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2021-02-19 14:23:58 -08:00
Alfredo Dal'Ava Junior
50b7c1f530 ofwfb: fix incorrect colors on powerpc* and add new tunable parameters
- Implements little-endian support (powerpc64le)
- Adds 'hw.ofwfb.physaddr' kernel parameter so user can manually
  provide correct address if it's not detected correctly
- Adds 'hw.ofwfb.argb32_pixel' so user can set it manually if
  colors are inverted due to incorrect pixel format (default = 1)
- Automatically selects RGBA32 pixel format if NVidia graphic adapter
  is detected (sets hw.ofwfb.argb32_pixel=0)

Machines equipped with NVidia graphic adapters tend to use RGBA32
pixel format. By default ARGB32 pixel format is used, proved to work
on machines equipped with ATI graphic adapter and the onboard adapter
used on Talos II and Blackbird machines from Raptor Computing Systems.

Original patch developed by bdragon

Reviewed by:	bdragon, luporl
MFC after:	3 days
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D28604
2021-02-19 19:50:36 -03:00
Ravi Pokala
bdde49b7c7 nvdimm(4): Export NVDIMM health flags via sysctl
The ACPI NFIT specification defines a set of "NVDIMM State Flags". These
flags are already reported by `acpidump -t', but this change makes them
available on a per-device basis, in a format that is more easily parsed.

To simplify this, introduce acpi_nfit_get_memory_maps_by_dimm(), which
locates the (ACPI_NFIT_MEMORY_MAP)s associated with a given
(nfit_handle_t).

Reviewed by:	mav, cem
Tested by:	mav, rpokala (version for stable/12)
MFC after:	3 days
Sponsored by:	Panasas
2021-02-18 15:08:33 -08:00
Mitchell Horne
04d2d2d7fd cgem: improve usage of busdma(9) KPI
BUS_DMA_NOCACHE should only be used when one needs to guarantee the
created mapping has uncached memory attributes, usually as a result
of buggy hardware. Normal use cases should pass BUS_DMA_COHERENT, to
create an appropriate mapping based on the flags passed to
bus_dma_tag_create().

This should have no functional change, since the DMA tags in this driver
are created without the BUS_DMA_COHERENT flag.

Reported by:	mmel
Reviewed by:	mmel, Thomas Skibo <thomas-bsd@skibo.net>
MFC after:	3 days
2021-02-18 17:17:41 -04:00
Allan Jude
8c280db0b4 ipmi_ssif: Fix inverted for the end of multi-part reads
As per Intelligent Platform Management Interface Specification v2.0 rev. 1.1,
section 12.5: SSIF Multi-part Read Transactions

Sponsored by:	Ampere Computing LLC
Submitted by:	Klara Inc.
Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D28749
2021-02-18 15:48:01 +00:00
Allan Jude
37ef8d4cd6 ig4(4): Increase timeout to about 1 second
Per the i2c spec, a slave device can stretch SCL idefinitely, so 25ms is
a bit arbitrary in general. smbus does specify an optional timeout
recovery mechanism to be done at about 25~35ms, but the IPMI SSIF spec
says that BMCs don't have any obligation to implement that.
The BMC on Altra seems to mostly respond within 25ms, but occasionally
will stretch SCL for ~300 msec.

Also, the count_us mechanism seems to actually timeout around 25%
earlier than it would claim (timeout really happening around 19ms
instead of 25ms).

Sponsored by:	Ampere Computing LLC
Submitted by:	Klara Inc.
Reviewed by:	manu, imp
Differential Revision:	https://reviews.freebsd.org/D28747
2021-02-18 15:47:17 +00:00
Michal Krawczyk
1c808fcd85 Allocate BAR for ENA MSIx vector table
In the new ENA-based instances like c6gn, the vector table moved to a
new PCIe bar - BAR1. Previously it was always located on the BAR0, so
the resources were already allocated together with the registers.

As the FreeBSD isn't doing any resource allocation behind the scenes,
the driver is responsible to allocate them explicitly, before other
parts of the OS (like the PCI code allocating MSIx) will be able to
access them.

To determine dynamically BAR on which the MSIx vector table is present
the pci_msix_table_bar() is being used and the new BAR is allocated if
needed.

Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon, Inc
MFC after: 3 days
2021-02-18 13:54:36 +01:00
Navdeep Parhar
fae028dd97 cxgbe(4): Break up t4_read_chip_settings.
Read the PF-only hardware settings directly in get_params__post_init.
Split the rest into two routines used by both the PF and VF drivers: one
that reads the SGE rx buffer configuration and another that verifies
miscellaneous hardware configuration.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2021-02-18 01:22:42 -08:00
Warner Losh
955b6109bb uart: only use MSI on devices that advertise 1 MSI vector
This updates r311987/fb1d9b7f4113d which allowed any number of vectors to be
used. Since we're just attaching one instance, the meaning of more than one
vector is not clear and seems to cause problems. Fall back to old methods for
these cards.

PR: 235016
Submitted by: David Cross
2021-02-17 15:08:19 -07:00
John Baldwin
1deaad9364 Handle negative return values from syncache_expand().
These errors do not clear so to NULL, so the existing check was
treating these failures as success.  The rest of do_pass_establish()
then tried to use the listen socket as if it was a connection socket
newly created by syncache_expand().

In addition, for negative return values, do not send a RST to the
peer.

Reported by:	Sony Arpita Das @ Chelsio
Reviewed by:	np
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D28243
2021-02-17 13:28:04 -08:00
John Baldwin
50a61f8db5 fwohci: Cast bitfield to uint32_t before passing it to roundup2().
The fallback for __align_up() used by roundup2() uses __typeof__()
which doesn't work for bitfields.  This fixes the build on GCC which
uses the fallback.

Reviewed by:	arichardson, markj
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D28599
2021-02-17 13:12:06 -08:00
Alexander Motin
294e62bebf cxgbe(4): Save proper zone index on low memory in refill_fl().
When refill_fl() fails to allocate large (9/16KB) mbuf cluster, it
falls back to safe (4KB) ones.  But it still saved into sd->zidx
the original fl->zidx instead of fl->safe_zidx.  It caused problems
with the later use of that cluster, including memory and/or data
corruption.

While there, make refill_fl() to use the safe zone for all following
clusters for the call, since it is unlikely that large succeed.

MFC after:	3 days
Sponsored by:	iXsystems, Inc.
Reviewed by:	np, jhb
Differential Revision:	https://reviews.freebsd.org/D28716
2021-02-16 21:15:28 -05:00
Roger Pau Monné
952667da98 xen/efi: introduce a PV interface for EFI run time services for dom0
FreeBSD when running as a dom0 under Xen is not supposed to access the
run time services directly, and instead should proxy the calls through
Xen using an hypercall interface that exposes access to selected run
time services.

Implement the efirt interface on top of the Xen provided hypercalls.

Sponsored by:		Citrix Systems R&D
Reviewed by:		kib
Differential revision:	https://reviews.freebsd.org/D28621
2021-02-16 15:26:12 +01:00
Roger Pau Monné
27d3902679 efirt: add hooks for diverging EFI implementations
Introduce a set of hooks for MI EFI public functions, so that a new
implementation can be done. This will be used to implement the Xen PV
EFI interface that's used when running FreeBSD as a Xen dom0 from UEFI
firmware. Also make the efi_status_to_errno non-static since it will
be used to evaluate status return values from the PV interface.

No functional change indented.

Sponsored by:		Citrix Systems R&D
Reviewed by:		kib, imp
Differential revision:	https://reviews.freebsd.org/D28620
2021-02-16 15:26:11 +01:00
Hans Petter Selasky
12148d4300 Fix for locking order reversal in USB audio driver, when using mmap().
Locking the second lock which causes the LOR, can be skipped because
the code updating the shared variables is always executing from the
same USB thread.

lock order reversal:
  1st 0xfffff80005cc3840 pcm7:play:dsp7.p0 (pcm play channel, sleep mutex)
@ usb_transfer.c:2342
  2nd 0xfffff80005cc3860 pcm7:record:dsp7.r0 (pcm record channel, sleep mutex)
@ uaudio.c:2317

lock order pcm record channel -> pcm play channel established at:
witness_checkorder+0x461
__mtx_lock_flags+0x98
dsp_mmap_single+0x151
vm_mmap_cdev+0x65
devfs_mmap_f+0x143
kern_mmap_req+0x594
sys_mmap+0x46
amd64_syscall+0x12e
fast_syscall_common+0xf8

lock order pcm play channel -> pcm record channel attempted at:
witness_checkorder+0xd82
__mtx_lock_flags+0x98
uaudio_chan_play_callback+0xeb
usbd_callback_wrapper+0x7ec
usb_command_wrapper+0x7e
usb_callback_proc+0x8e
usb_process+0xf3
fork_exit+0x80
fork_trampoline+0xe

Found by:	Stefan Ehmann <shoesoft@gmx.net>
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2021-02-14 20:32:33 +01:00
Vladimir Kondratyev
f988d7fa05 hidraw: Make HIDIOCGRDESCSIZE ioctl return report descriptor size
defined by hardware rather than cached one to match HIDIOCGRDESC ioctl.
This fixes errors reported by hid-tools being run against /dev/hidraw#
device node belonging to driver which overloads report descriptor.

MFC after:	1 week
2021-02-13 21:19:02 +03:00
Vladimir Kondratyev
812c59ed61 hkbd: Fix handling of keyboard ErrorRollOver reports
Ignore fantom keyboard state reports entirelly rather than ignore
RollOver states for each key separatelly.  Latter results in spurious
release/push pairs of events on each fantom keyboard state report.

Reported by:	Jan Martin Mikkelsen <janm_AT_transactionware_DOT_com>
Submitted by:	Jan Martin Mikkelsen (initial version)
PR:		253249
MFC after:	1 week
2021-02-13 21:18:07 +03:00
Vladimir Kondratyev
032d315387 ukbd: Fix handling of keyboard ErrorRollOver reports
Ignore fantom keyboard state reports entirelly rather than ignore
RollOver states for each key separatelly.  Latter results in spurious
release/push pairs of events on each fantom keyboard state report.

Reported by:	Jan Martin Mikkelsen <janm_AT_transactionware_DOT_com>
Submitted by:	Jan Martin Mikkelsen (initial version)
PR:		253249
MFC after:	1 week
2021-02-13 21:12:56 +03:00
John Baldwin
47769bc557 iscsi: Mark iSCSI CAM sims as non-pollable.
Previously, iscsi_poll() just panicked.  This meant if you got a panic
on a box when using the iSCSI initiator, the attempt to shutdown would
trigger a nested panic and never write out a core.  Now, CCB's sent to
iSCSI devices (such as the sychronize-cache request in dashutdown())
just fail with a timeout during a panic shutdown.

Reviewed by:	scottl, mav
MFC after:	2 weeks
Sponsored by:	Chelsio
Differential Revision:	https://reviews.freebsd.org/D28455
2021-02-11 13:52:18 -08:00
Mark Johnston
29ed53850e mlx4, mthca: Silence warnings about no-op alignment operations
Since commit 8fa6abb6f4 ("Expose clang's alignment builtins and use
them for roundup2/rounddown2"), clang emits warnings for several
alignment operations in these drivers because the operation is a no-op.
The compiler is arguably being too strict here, but in the meantime
let's silence the warnings by conditionally compiling the alignment
operations.

Reviewed by:	arichardson, hselasky
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D28576
2021-02-11 10:16:59 -05:00
Warner Losh
db2f512381 hid: bump HID_ITEM_MAXUSAGES to 8
My YOGA requires a minimum of 7 to parse w/o an error. Since the memory savings
are trivial and the yoga a popular system, bump the default up to 8. There's no
API/ABI issues in doing this. This hid_item struct isn't exported to userland
and the one libusbhid has is different and only shares a name...

MFC After: 3 days
Reviewed by: wulf@
Differential Revision: https://reviews.freebsd.org/D28543
2021-02-08 15:31:39 -07:00
Warner Losh
35af933173 acpi: limit the AMDI0020/AMDI0010 workaround to an option
It appears that production versions of EPYC firmware get the _STA method right
for these nodes. In fact, this workaround breaks on production hardware by
including too many uart nodes. This work around was for pre-release hardware
that wound up not having a large deployment. Move this work around to a kernel
option since the machines that needed it have been powered off and are difficult
to resurrect. Should there be a more significant deployment than is understood,
we can restrict it based on smbios strings.

Discussed with: mmacy@, seanc@, jhb@
MFC After: 3 days
2021-02-08 14:47:49 -07:00
Vladimir Kondratyev
d8c6d4c732 wsp: Add sysctl tunable for Z-Axis inversion
This adds a new sysctl to Wellspring Touchpad driver for controlling
Z-Axis (2-finger vertical scroll) direction "hw.usb.wsp.z_invert".

Submitted by:	James Wright <james.wright_AT_digital-chaos_DOT_com>
Reviewed by:	wulf
PR:		253321
Differential revision:	https://reviews.freebsd.org/D28521
2021-02-09 00:35:39 +03:00
Warner Losh
dd2516fc07 nvme: Make nvme_ctrlr_hw_reset static
nvme_ctrlr_hw_reset is no longer used outside of nvme_ctrlr.c, so
make it static. If we need to change this in the future we can.
2021-02-08 13:29:24 -07:00
Warner Losh
9600aa31aa nvme: use NVME_GONE rather than hard-coded 0xffffffff
Make it clearer that the value 0xfffffff is being used to detect the device is
gone. We use it other places in the driver for other meanings.
2021-02-08 13:08:48 -07:00
Toomas Soome
32bf05ad89 vt: terminal size can grow too big with small font
vt is using static buffers for on screen data, the buffer size is
calculated based on maximum supported screen size and 8x16 font.

When using hi-res graphics and very smaller than 8x16 font, we
need to be careful not to overflow static buffers in vt.

Testing: I did test by building smaller buffers than vt currently is using,
royger was testing on actual 4k capable hardware.

MFC after: 1 week
Tested by: royger
2021-02-08 18:00:37 +02:00
Alfredo Dal'Ava Junior
59fffbcf46 mrsas: unbreak i386 build
Fix build regression introduced by
e34a057ca6

Reviewed by:	jhibbits
Sponsored by:	Eldorado Research Institute (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D28494
2021-02-05 15:43:48 -03:00
Krzysztof Galazka
7d4dceec10 ixl(4): Fix VLAN HW filtering
X700 family of controllers has limited number of available VLAN
HW filters. Driver did not handle properly a case when user
assigned more VLANs to the interface which had all filters
already in use. Fix that by disabling HW filtering when
it is impossible to create filters for all requested VLANs.
Keep track of registered VLANs using bitstring to be able
to re-enable HW filtering when number of requested VLANs
drops below the limit.

Also switch all allocations to use M_IXL malloc type
to ease detecting memory leaks in the driver.

Reviewed by:	erj
Tested by:	gowtham.kumar.ks@intel.com
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D28137
2021-02-04 15:33:42 -08:00
Alfredo Dal'Ava Junior
e34a057ca6 [POWERPC64BE] mrsas: add big-endian support
Add endiannes conversions in order to support big-endian platforms

Submitted by:	Andre Fernando da Silva <andre.silva@eldorado.org.br>
Reviewed by:	luporl, alfredo, kadesai (on email)
Sponsored by:	Eldorado Research Institute (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D26531
2021-02-03 22:06:21 -03:00
Michal Meloun
8727c174b0 dwmmc: Multiple busdma fixes.
- limit maximum segment size to 2048 bytes.  Although dwmmc supports a buffer
  fragment with a maximum length of 4095 bytes, use the nearest lower power
  of two as the maximum fragment size. Otherwise, busdma create excessive
  buffer fragments.
- fix off by one error in computation of the maximum data transfer length.
- in addition, reserve two DMA descriptors that can be used by busdma
  bouncing. The beginning or end of the buffer can be misaligned.
- Don’t ignore errors passed to bus_dmamap_load() callback function.
- In theory, a DMA engine may be running at time when next dma descriptor is
  constructed. Create a full DMA descriptor before OWN bit is set.

MFC after:	2 weeks
2021-02-03 21:15:11 +01:00
Peter Grehan
5aaea4b99e Always clamp curve25519 keys prior to use.
This fixes an issue where a private key	contained bits that should
have been cleared by the clamping process, but were passed through
to the scalar multiplication routine and resulted in an	invalid
public key.

Issue diagnosed	(and an	initial	fix proposed) by shamaz.mazum in
PR 252894.

This fix suggested by Jason Donenfeld.

PR:		252894
Reported by:	shamaz.mazum
Reviewed by:	dch
MFC after:	3 days
2021-02-03 19:05:09 +10:00
Alexander Motin
3dd2a7a5ea Make DataSN counter of solicited Data-Out local.
DataSN for solicited Data-Out is per-R2T.  Since we handle whole R2T
in one go, we don't need to store it anywhere, especially in global
per-command structure.  This may allow us to handle multiple R2T per
command at once, if we decide, or may be relax locking.

Rename the second use of that field to io_referenced_task_tag.

MFC after:	1 month
2021-02-02 13:56:47 -05:00
Toomas Soome
1912d2b15e vt: parse_font_info_static should set refcount, not parse_font_info
As we get started with no memory allocator, we set up static font data
for font passed by loader (if there is any). At this time, we also must
set refcount 1, and refcount will get incremented in cnprobe() callback.

At some point the memory allocator will be available, and we will set up
properly allocated font data, but we should not disturb the refcount.

PR: 253147
2021-02-02 00:33:58 +02:00
Sai Rajesh Tallamraju
38bfc6dee3 iflib: Free resources in a consistent order during detach
Memory and PCI resources are freed with no particular order.  This could
cause use-after-frees when detaching following a failed attach.  For
instance, iflib_tx_structures_free() frees ctx->ifc_txqs[] but
iflib_tqg_detach() attempts to access this array. Similarly, adapter
queues gets freed by IFDI_QUEUES_FREE() but IFDI_DETACH() attempts to
access adapter queues to free PCI resources.

MFC after:	2 weeks
Sponsored by:	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D27634
2021-02-01 11:15:54 -05:00
Navdeep Parhar
3447df8bc5 cxgbe(4): Fixes to tx coalescing.
- The behavior implemented in r362905 resulted in delayed transmission
  of packets in some cases, causing performance issues.  Use a different
  heuristic to predict tx requests.

- Add a tunable/sysctl (hw.cxgbe.tx_coalesce) to disable tx coalescing
  entirely.  It can be changed at any time.  There is no change in
  default behavior.
2021-02-01 03:00:09 -08:00
Alexander Motin
9dc7c250b8 cxgb(4): Remove assumption of physically contiguous mbufs.
Investigation of iSCSI target data corruption reports brought me to
discovery that cxgb(4) expects mbufs to be physically contiguous, that
is not true after I've started using m_extaddref() in software iSCSI
for large zero-copy transmissions.  In case of fragmented memory the
driver transmitted garbage from pages following the first one due to
simple use of pmap_kextract() for the first pointer instead of proper
bus_dmamap_load_mbuf_sg().  Seems like it was done as some optimization
many years ago, and at very least it is wrong in a world of IOMMUs.

This patch just removes that optimization, plus limits packet coalescing
for mbufs crossing page boundary, also depending on assumption of one
segment per packet.

MFC after:	3 days
Sponsored by:	iXsystems, Inc.
Reviewed by:	mmacy, np
Differential revision:	https://reviews.freebsd.org/D28428
2021-01-31 12:55:06 -05:00
Gleb Smirnoff
3f43ada98c Catch up with 6edfd179c8: mechanically rename IFCAP_NOMAP to IFCAP_MEXTPG.
Originally IFCAP_NOMAP meant that the mbuf has external storage pointer
that points to unmapped address.  Then, this was extended to array of
such pointers.  Then, such mbufs were augmented with header/trailer.
Basically, extended mbufs are extended, and set of features is subject
to change.  The new name should be generic enough to avoid further
renaming.
2021-01-29 11:46:24 -08:00
Alexander Motin
8fee65d0c7 Add missing newlines.
MFC after:	3 days
2021-01-28 18:20:00 -05:00
Doug Ambrisko
0c852bb9b9 Add support for some more Intel VMD controllers. Some of the
newer controller have a sparce bus space that can be figured
out by probing the HW.  This gives the starting bus number.
When reading the PCI config. space behind the VMD controller,
the offset of the starting bus needs to be subtracted from
the bus being read.

Fixed a bug in which in which not all of the devices
directly attached to the VMD controller would be probed.
On my initial test HW, a switch was found at bus 0, slot 0
and function 0.  All of the NVME drives were behind that
switch.  Now scan for all slots and functions attached to
bus 0.  If a something was found then run attach after the
scan.  On detach also go through all slots and functions
on bus 0.

Tested with device ID's: 0x201d & 0x9a0b

Tested by:	nc@
MFC after:	7 days
PR:		252253
2021-01-28 15:12:14 -08:00
Alexander Motin
b75168ed24 Make software iSCSI more configurable.
Move software iSCSI tunables/sysctls into kern.icl.soft subtree.
Replace several hardcoded length constants there with variables.

While there, stretch the limits to better match Linux' open-iscsi
and our own initiator with new MAXPHYS of 1MB.  Our CTL target is
also optimized for up to 1MB I/Os, so there is also a match now.
For Windows 10 and VMware 6.7 initiators at default settings it
should make no change, since previous limits were sufficient there.

Tests of QD1 1MB writes from FreeBSD over 10GigE link show throughput
increase by 29% on idle connection and 132% with concurrent QD8 reads.

MFC after:	3 days
Sponsored by:	iXsystems, Inc.
2021-01-28 16:22:45 -05:00
Hans Petter Selasky
b8051298b0 Fix missing value in uar_page field for ratelimit in mlx5en(4).
This is a regression issue after the new UAR API was introduced
by f8f5b459d2 .

MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2021-01-28 14:51:58 +01:00
Mark Johnston
2fccd4f9b6 safexcel: Disallow unsupported buffer layouts
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-01-27 15:31:10 -05:00