pciconf: Add option to write into a BAR region
Add option -W that allows to write into a BAR region.
Also, add an option -R that allows to read from a BAR region that
works similar to -r that reads from the PCI config space.
Reviewed by: bcr (manpages), jhb
Differential Revision: https://reviews.freebsd.org/D55915
OFED: Various changes from Linux 4.20
This contains changes from the following Linux commits:
627212c9d49b RDMA/core: Replace open-coded variant of get_device
adee9f3f3bbb RDMA/core: Depend on device_add() to add device attributes
954a8e3aea87 RDMA/cma: Protect cma dev list with lock
722c7b2bfead RDMA/{cma, core}: Avoid callback on rdma_addr_cancel()
f9d08f1e1939 RDMA/core: Rate limit MAD error messages
e1f540c3ed0e RDMA/core: Define client_data_lock as rwlock instead of spinlock
2d65f49ff961 RDMA/core: Use simpler spin lock irq API from blocking context
4512acd0d34c RDMA/core: Remove context entries from list while unregistering device
f7b65d9bf2db RDMA/core: Use simplified list_for_each
93688ddbe1da RDMA/core: No need to protect kfree with spin lock and semaphore
50704e039ab1 RDMA/umem: Restore lockdep check while downgrading lock
eb93c82ed8c7 RDMA/core: Document QP @event_handler function
4269024639f6 RDMA/core: Document CM @event_handler function
77addc524473 RDMA/core: Rename rdma_copy_addr to rdma_copy_src_l2_addr
a362ea1d9e1a RDMA/core: Introduce and use rdma_set_src_addr() between IPv4 and IPv6
[20 lines not shown]
OFED: Various changes from Linux 4.16
This contains changes from the following Linux commits:
c5c4e40e90b5 IB/CM: Change sgid to IB GID when handling CM request
54a6d63f14bd IB/mlx4: Potential buffer overflow in _mlx4_set_path()
56d0a7d9a0f0 IB/core: Depend on IPv6 stack to resolve link local address for RoCEv2
1060f8653414 IB/{core/cm}: Fix generating a return AH for RoCEE
981b5a2384b7 RDMA/cma: Introduce and use helper functions to init work
c42388053758 RDMA/cma: Avoid setting path record type twice
4367ec7fe2dd RDMA/cma: Simplify netdev check
151ed9d70097 IB/core: Refactor to avoid unnecessary check on GID lookup miss
b0dd0d335364 IB/core: Avoid unnecessary type cast
86937fcd6ed2 RDMA/core: Avoid redundant memcpy in rdma_addr_find_l2_eth_by_grh
1c43d5d308f0 IB/core: Avoid exporting module internal ib_find_gid_by_filter()
dbb12562f7c2 IB/{core, ipoib}: Simplify ib_find_gid to search only for IB link layer
f6bdb14267ba IB/{core, umad, cm}: Rename ib_init_ah_from_wc to ib_init_ah_attr_from_wc
4ad6a0245ec8 IB/{core, cm, cma, ipoib}: Rename ib_init_ah_from_path to ib_init_ah_attr_from_path
33f93e1ebcf5 IB/cm: Fix sleeping while spin lock is held
[37 lines not shown]
OFED: Various changes from Linux 4.19
Many of these changes deal with shifting from fetcing SGID attributes
via an index in drivers to including references to SGID attributes in
other structures passed to driver callbacks which can be used directly
avoiding the need for fetching attributes via lookup functions. I had
to fixup the ROCE GID management code directly as the version in
FreeBSD is very different from Linux.
I also tweaked the change from commit
475c8de7bf2dc86d9806709a04e9c8f524d4ec32 to use a goto to reduce diffs
with upstream to minimize conflicts when merging upstream changes.
This contains changes from the following Linux commits:
a1a4caeebac9 IB/core: Do not set the gid type when reserving default entries
1c36cf912ad1 IB/core: Store default GID property per-table instead of per-entry
1dfce2945771 IB: Replace ib_query_gid/ib_get_cached_gid with rdma_query_gid
83f6f8d29dd3 IB/core: Make rdma_find_gid_by_filter support all protocols
[57 lines not shown]
OFED: Various changes from Linux 4.18
This contains changes from the following Linux commits:
e822ff213fe6 IB/cm: Store and restore ah_attr during CM message processing
0e225dcb7681 IB/cm: Store and restore ah_attr during LAP msg processing
a5c57d327272 IB/cm: Avoid AV ah_attr overwriting during LAP message handling
724631a9c6e9 IB/core: Introduce and use rdma_gid_table()
25e62655c793 IB/core: Reduce the places that use zgid
08bb558ac11a IB/core: Make testing MR flags for writability a static inline function
Commit 0e225dcb7681 was partially merged previously as
cm_init_av_for_lap() already existed in FreeBSD matching the version
from the Linux commit.
Tested by: Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Sponsored by: Chelsio Communications
OFED: Calculate UDP source port based on flow label or lqpn/rqpn
Calculate and set UDP source port based on the flow label. If flow label
is not defined in GRH then calculate it based on lqpn/rqpn.
Tested by: Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Obtained from: Linux commit 18451db82ef7f943c60a7fce685f16172bda5106
Sponsored by: Chelsio Communications
OFED: A few channges from Linux 5.0
The main point of these changes is the last commit adding a couple of
helper functions used in ROCE drivers.
This contains changes from the following Linux commits:
a70c07397fd8 RDMA: Introduce and use GID attr helper to read RoCE L2 fields
8f9748602491 IB/cm: Reduce dependency on gid attribute ndev check
adb4a57a7a1d RDMA/cma: Use rdma_read_gid_attr_ndev_rcu to access netdev
b4fb4cc5ba83 RDMA/cma: Fix unbalanced cm_id reference count during address resolve
d5665a21250e RDMA/core: Add hash functions to calculate RoCEv2 flowlabel and UDP source port
Tested by: Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Sponsored by: Chelsio Communications
OFED: Malloc API cleanups from Linux 4.18
This contains changes from the following Linux commits:
acafe7e30216 treewide: Use struct_size() for kmalloc()-family
fad953ce0b22 treewide: Use array_size() in vzalloc()
6396bb221514 treewide: kzalloc() -> kcalloc()
6da2ec56059c treewide: kmalloc() -> kmalloc_array()
Tested by: Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Sponsored by: Chelsio Communications
OFED: Various changes from Linux 4.17
This contains changes from the following Linux commits:
a3b641af72ba RDMA/CM: move rdma_id_private to cma_priv.h
6612b4983f7e IB/core: Fix comments of GID query functions
b26c4a1138df IB/{core, ipoib}: Simplify ib_find_gid() for unused ndev
5ac08a341303 IB/cma: Use rdma_protocol_roce() and remove cma_protocol_roce_dev_port()
a9c06aeba997 IB/core: Remove rdma_resolve_ip_route() as exported symbol
a22af59ea9a5 IB/cm: Add and use a helper function to add cm_id's to the port list
cb12a8e2fa5f IB/cm: Introduce and use helper function to get cm_port from path
0a5141593567 IB/core: Refactor ib_init_ah_attr_from_path() for RoCE
e41a7c41947d IB/core: Move rdma_addr_find_l2_eth_by_grh to core_priv.h
98f1f4e0ed26 IB/core: Refer to RoCE port property instead of GID table property
114cc9c4b182 IB/cma: Resolve route only while receiving CM requests
9137108cc3d6 RDMA/rdma_cm: Fix use after free race with process_one_req
190fb9c4d130 IB/core: Refer to RoCE port property to decide building cache
22d24f75a193 IB/core: Search GID only for IB link layer
4ab7cb4bf362 IB/core: Refer to RoCE port property instead of GID table property
[21 lines not shown]
OFED: Use _ib_modify_qp to implement ib_modify_qp
This was missed when merging in ib_modify_qp_with_udata() previously.
Tested by: Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Fixes: b633e08c705f ("ibcore: Kernel space update based on Linux 5.7-rc1.")
Sponsored by: Chelsio Communications
OFED: Various changes from Linux 4.10
This contains changes from the following Linux commits:
850d8fd76507 IB/mlx4: Handle IPv4 header when demultiplexing MAD
a0b3455fcb2d IB/core: Remove debug prints after allocation failure
74226649f42d IB/ipoib: Remove and fix debug prints after allocation failure
870b28524552 IB/mthca: Remove debug prints after allocation failure
aa6aae38f7fb IB/core: Release allocated memory in cache setup failure
f73a1dbc45a5 infiniband: remove WARN that is not kernel bug
5f24410408fd rdma_cm: add rdma_consumer_reject_data helper function
5042a73d3e9d rdma_cm: add rdma_is_consumer_reject() helper function
d3f4aadd614c RDMA/core: Add the function ib_mtu_int_to_enum
Tested by: Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Sponsored by: Chelsio Communications
OFED: Various changes from Linux 4.14
This contains changes from the following Linux commits:
1cb2fc0db764 IB/mad: Change slid in RMPP recv from 16 to 32 bits
7e93e2cb835c IB/IPoIB: Increase local_lid to 32 bits
d541e45500bd IB/core: Convert ah_attr from OPA to IB when copying to user
6b3c0e6e6d5a IB/CM: Create appropriate path records when handling CM request
e92aa00a5189 IB/CM: Add OPA Path record support to CM
7db20ecd1d97 IB/core: Change wc.slid from 16 to 32 bits
db58540b021a IB/core: Change port_attr.sm_lid from 16 to 32 bits
582faf3150f5 IB/core: Change port_attr.lid size from 16 to 32 bits
ac3a949fb2ff IB/CM: Set appropriate slid and dlid when handling CM request
06f8174a9782 IB/core: Protect sysfs entry on ib_unregister_device
62ede7779904 Add OPA extended LID support
13c19222889d IB/rdmavt, hfi1, qib: Modify check_ah() to account for extended LIDs
d98bb7f7e6fa IB/hfi1: Determine 9B/16B L2 header type based on Address handle
dcc9881e6767 RDMA/(core, ulp): Convert register/unregister event handler to be void
f808c13fd373 lib/interval_tree: fast overlap detection
[4 lines not shown]
OFED: Various changes from Linux 4.13
This contains changes from the following Linux commits:
28b5b3a23ba6 RDMA/core: Document confusing code
5fff41e1f89d IB/core: Fix race condition in resolving IP to MAC
b1a89257f28e IB/umem: update to new mmu_notifier semantic
Tested by: Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Sponsored by: Chelsio Communications
OFED: Various changes from Linux 4.15
This contains changes from the following Linux commits:
c0b64f58e8d4 RDMA/cma: Avoid triggering undefined behavior
c0348eb06968 IB: Let ib_core resolve destination mac address
5a3dc3237243 IB/cm: Fix memory corruption in handling CM request
fec99ededf6b RDMA/umem: Avoid partial declaration of non-static function
19b57c6c4499 IB/core: Convert OPA AH to IB for Extended LIDs only
e08ce2e82b2f RDMA/core: Make function rdma_copy_addr return void
4190b4e96954 RDMA/core: Rename kernel modify_cq to better describe its usage
Tested by: Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Sponsored by: Chelsio Communications
OFED: Various changes from Linux 4.12
Most of the changes involve renaming InfiBand address handles (AH) to
RDMA address handles including renaming various types and functions.
Address handles now also include type-specific fields and a set of
wrapper accessor functions for getting and setting fields. For some
of the type and function renames, drivers in sys/dev had to be updated
directly (typically via sed).
This contains changes from the following Linux commits:
f039f44fc331 IB/core: Add support for draining IB_POLL_DIRECT completion queues
fedd9e1f7582 IB/cq: Don't process more than the given budget
403cd12e2cf7 IB/umem: Add contiguous ODP support
0008b84ea9af IB/umem: Add support to huge ODP
3e7e1193e28a IB: Replace ib_umem page_size by page_shift
cb8637660ae8 IB/SA: Move functions update_sm_ah() and ib_sa_event()
680562b56939 IB/SA: Remove unwanted braces
dbb6c91fd8e0 IB/SA: Add braces when using sizeof
[38 lines not shown]
OFED: Various changes from Linux 4.11
This contains changes from the following Linux commits:
55efcfcd7776 RDMA/core: Fix incorrect structure packing for booleans
aaaca121c7cf RDMA/core: add port state cache
9e2c3f1c7f3e RDMA/core: export ib_get_cached_port_state
93b1f29de71f RDMA/cma: resolve to first active ib port
d43dbacfc063 IB/core: Change the type of an ib_dma_alloc_coherent() argument
6532c380bf40 IB/core: Remove ib_dma_*map_single_attrs()
0bbb3b7496ea IB/rxe, IB/rdmavt: Use dma_virt_ops instead of duplicating it
f57e8ca50e23 IB/mad: Add port_num to error message
828f6fa65ce7 IB/umem: Release pid in error and ODP flow
19b752a19dce IB/cma: Allow port reuse for rdma_id
21d6454a392d RDMA/core: create struct ib_port_cache
25bf14d6f589 IB/core: Add implicit MR flag
d9d0674c0f8a IB/umem: Indicate that process is being terminated
d07d1d70ce1a IB/umem: Update on demand page (ODP) support
a748d60df32e IB/mlx4: Take source GID by index from HW GID table
[9 lines not shown]
jail: call PR_METHOD_ATTACH again (with old jail) if the first call fails
jail_attach lets modules do attachment-specific work by calling
osd_jail_call(PR_METHOD_ATTACH). If one of the modules returns an
error, the call needs to be repeated with the thread's current prison,
so possible earlier modules and undo any changes they may have made.
(cherry picked from commit e91e8ebefadcce9d57c8ff945ff70050cbbe1ce1)
libcxxrt: Fix diagnostics for derived classes
In terminate_with_diagnostics the cast_to arguments were swapped, so it
always failed. The diagnostic handler produced output like "Terminating
due to uncaught exception 0x24891e08000 of type std::runtime_error".
Now, e->what() will actually be included in the output, e.g.
"Terminating due to uncaught exception 0x2bba49208000 'Model file
doesn't exist' of type std::runtime_error".
Reviewed by: dim
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57822
p9fs: Remove the "cancel" transport method
Nothing calls it, and the existing virtio transport doesn't implement
it. No functional change intended.
MFC after: 1 week
Revert "fts: refactor to use fd-relative operations internally"
This reverts commit e03ed9daeb49fffa1d16b8d00240c65e92650d01.
The change to the size of struct FTSENT is breaking backwards
compatibility for some binaries. Jitendra is working on a new version
that will move the new field into a private struct.
Reported by: bdrewery
Fixes: e03ed9daeb4 ("fts: refactor to use fd-relative operations")
Sponsored by: ConnectWise
linuxkpi: Define `ULL()`
It simply appends "ULL" to its argument.
The amdgpu DRM driver used it at some point in the development cycle of
Linux 6.14 but the use case was dropped later. Let's still add it to
linuxkpi because it will help if we need to do a git bisect in drm-kmod.
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57703
linuxkpi: Defined more Intel vendor/family/model constants
The i915 DRM driver started to use them in Linux 6.14.
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57699
linuxkpi: Define and fill `struct cpuinfo_x86->x86_stepping`
This will be used in a follow-up commit to implement `x86_match_cpu()`.
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57698