Commit graph

43026 commits

Author SHA1 Message Date
John Baldwin
bedfac1f02 nvmf_tcp: Fully honor kern.nvmf.tcp.max_transmit_data for C2H_DATA PDUs
The previous version of tcp_send_controller_data avoided sending a
chain of multiple mbufs that exceeded the limit, but if an individual
mbuf was larger than the limit it was sent as a single, over-sized
PDU.  Fix by using m_split() to split individual mbufs larger than the
limit.

Note that this is not a protocol error, per se, as there is no limit
on C2H_DATA PDU lengths (unlike the MAXH2CDATA parameter).  This fix
just honors the administrative limit more faithfully.  This case is
also very unlikely with the default limit of 256k.

Sponsored by:	Chelsio Communications
2024-09-05 17:14:36 -04:00
Justin Hibbits
7b86593f0f sdhci: Match quirk_set/quirk_clear sysctls to type
These quirk fields are u_int, so match the sysctl type to the actual
types, and use SYSCTL_UINT.  This provides room for setting bit 31 quirk
as needed.

Sponsored by:	Juniper Networks, Inc.
MFC after:	1 week
2024-09-05 13:25:16 -04:00
Michael Tuexen
0b45d36510 al_eth: improve TCP LRO
Use the appropriate function to flush correctly all entries. The old
code does not remove the element from the hash table, only from the
active queue.

Reviewed by:		Peter Lei, rscheff
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D46434
2024-09-05 17:35:40 +02:00
Michael Tuexen
5203dcce25 neta: improve TCP LRO
Use the appropriate function to flush correctly all entries. The old
code does not remove the element from the hash table, only from the
active queue.

Reviewed by:		Peter Lei, rscheff
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D46433
2024-09-05 17:31:31 +02:00
Navdeep Parhar
7aeec281b8 cxgbe(4): Always report link-down on an abrupt stop.
This fixes a regression in 5241b210a4 where the driver stopped
reporting link down after a fatal error unless t4_reset_on_fatal_err was
also set.

Fixes:	5241b210a4 cxgbe(4): Basic infrastructure for ULDs to participate in adapter reset.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2024-09-04 21:54:30 -07:00
Mark Johnston
dc450b388b vmm: Remove more of vmmdev_open()
The softc pointer is now unused, just remove it.

Reported by:	se
Fixes:	66fc442421 ("vmm: Remove an incorrect credential check in vmmdev_open()")
2024-09-05 00:36:27 +00:00
Mark Johnston
66fc442421 vmm: Remove an incorrect credential check in vmmdev_open()
Checking pointer equality here is too strict and can lead to incorrect
errors, as credentials are frequently copied to avoid reference counting
overhead.

The check is new with commit 4008758105 and was added with the goal of
allowing non-root users to create VMs in mind.  Just remove it for now.

Reported by:	Alonso Cárdenas Márquez <acardenas@bsd-peru.org>
Reviewed by:	jhb
Fixes:		4008758105 ("vmm: Validate credentials when opening a vmmdev")
Differential Revision:	https://reviews.freebsd.org/D46535
2024-09-04 22:54:25 +00:00
Konstantin Belousov
ba33e74c7d busdma_iommu: indirect dmar-specific method calls in iommu_get_dev_ctx()
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-05 00:50:19 +03:00
Mark Johnston
408c909dc6 ifnet: Remove if_getamcount()
All uses of this function were incorrect.  if_amcount is a reference
count which tracks the number of times the network stack internally set
IFF_ALLMULTI.  (if_pcount is the corresponding counter for IFF_PROMISC.)

Remove if_getamcount() and fix up callers to get the number of assigned
multicast addresses instead, since that's what they actually want.

Sponsored by:	Klara, Inc.
Reviewed by:	zlei, glebius
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D46523
2024-09-04 14:28:28 +00:00
John Baldwin
fcef359272 uart: Use uintptr_t instead of vm_offset_t for pointer arithmetic
Reviewed by:	imp
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D46490
2024-09-04 09:56:21 -04:00
Konstantin Belousov
957e389ca7 dev/mlx5: remove some duplicated macros from device.h
Sponsored by:	NVidia networking
2024-09-04 11:49:38 +03:00
John Baldwin
f5541f9f47 nvmfd/nvmft: Fix a typo "whiled" -> "while"
Sponsored by:	Chelsio Communications
2024-09-03 16:12:04 -04:00
Zhenlei Huang
7ea3fd3bb5 mxge(4): Stop checking for failures from taskqueue_create(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853
2024-09-03 18:25:38 +08:00
Zhenlei Huang
57cd8f27b7 liquidio(4): Stop checking for failures from malloc/taskqueue_create/buf_ring_alloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853
2024-09-03 18:25:38 +08:00
Zhenlei Huang
3fdef8e855 jme(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853
2024-09-03 18:25:38 +08:00
Zhenlei Huang
36ef39831f dpaa2: Stop checking for failures from malloc/taskqueue_create(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853
2024-09-03 18:25:37 +08:00
Zhenlei Huang
af28fc3c19 cas(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853
2024-09-03 18:25:37 +08:00
Zhenlei Huang
d44bc2f07b bge(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853
2024-09-03 18:25:36 +08:00
Zhenlei Huang
b29adaaf44 axgbe: Stop checking for failures from taskqueue_create(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853
2024-09-03 18:25:36 +08:00
Zhenlei Huang
f5524be39e ale(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853
2024-09-03 18:25:35 +08:00
Zhenlei Huang
0cd3976d07 alc(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853
2024-09-03 18:25:35 +08:00
Zhenlei Huang
5cece2c24b age(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853
2024-09-03 18:25:35 +08:00
Zhenlei Huang
3f3f3ca25b ae(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853
2024-09-03 18:25:34 +08:00
Zhenlei Huang
f80483cdd5 sdhci(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:34 +08:00
Zhenlei Huang
59121599bb sound: Stop checking for failures from malloc(M_WAITOK)
Reviewed by:	emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:33 +08:00
Zhenlei Huang
761339c554 sume(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:33 +08:00
Zhenlei Huang
866dc4bd81 qat(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:32 +08:00
Zhenlei Huang
4fb8a80a78 pms(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:32 +08:00
Zhenlei Huang
a38d9ad473 mrsas(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:32 +08:00
Zhenlei Huang
849f9ac370 mpi3mr(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:31 +08:00
Zhenlei Huang
556cd18fb0 mlx(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:31 +08:00
Zhenlei Huang
701308ef40 mfi(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:31 +08:00
Zhenlei Huang
1dc7a7b74b mana: Stop checking for failures from malloc/mallocarray/buf_ring_alloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:30 +08:00
Zhenlei Huang
40a6bbc428 iser(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:30 +08:00
Zhenlei Huang
5f97656fa3 ice(4): Stop checking for failures from malloc(M_WAITOK)
As a consequence now ice_alloc_vsi_qmap() does not fail. Remove unneeded
error checks.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:29 +08:00
Zhenlei Huang
92b0370ec6 hptrr(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:29 +08:00
Zhenlei Huang
a3ec5d3ee7 hptnr(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:29 +08:00
Zhenlei Huang
28e413a699 hpt27xx(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:28 +08:00
Zhenlei Huang
4d47c7ca7b fwip(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:28 +08:00
Zhenlei Huang
d1a89bd9b6 flexspi: Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:27 +08:00
Zhenlei Huang
48741f4cec etherswitch: Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:27 +08:00
Zhenlei Huang
51971340bd ena(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:26 +08:00
Zhenlei Huang
6dbf3aca4f drm2: Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:26 +08:00
Zhenlei Huang
955b380365 cxgbe(4): Stop checking for failures from malloc/mb_alloc_ext_pgs(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:26 +08:00
Zhenlei Huang
bb51f7c8a4 cxgb(4): Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:25 +08:00
Zhenlei Huang
dcd387aaa5 bnxt(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:25 +08:00
Zhenlei Huang
ab0b996bdd axgbe: Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:25 +08:00
Zhenlei Huang
3fdf587ab0 ath(4): Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:24 +08:00
Zhenlei Huang
e06e2c8407 altera: Stop checking for failures from malloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:24 +08:00
Zhenlei Huang
00ae9c1be0 al_eth: Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
2024-09-03 18:25:23 +08:00