Commit graph

152403 commits

Author SHA1 Message Date
Franco Fichtner
1693e3be3b u3g: reorder Quectel devices by product ID
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1410
2024-09-21 05:25:15 -06:00
Kevin Bowling
a924b5ee6a ixgbe: fix fw_recovery_mode callout
Need to pass the softc in with the callout arg

MFC after:	1 week
2024-09-21 04:11:17 -07:00
Kevin Bowling
b6cd053e6d ixgbe: update if_sriov with ix-3.3.38 changes
There are some critical fixes here. The PF must communicate with each VF
slot (vf->pool), only VFs shall use 0 for everything.

IXGBE_FEATURE_SRIOV needs to be set before calling ixgbe_if_init().

With these changes, ixv(4) now attaches to VFs, but after bringing up
VFs, the PF and VF still are not correctly passing traffic.

MFC after:	1 week
2024-09-21 02:59:33 -07:00
Kevin Bowling
f72de14ea1 ixgbe: update if_ix and ixgbe api with ix-3.3.38 changes
MFC after:	1 week
2024-09-21 02:52:21 -07:00
Kevin Bowling
0acea458f8 ixgbe: update ixgbe_mbx with ix-3.3.38 changes
MFC after:	1 week
2024-09-21 02:47:11 -07:00
Kevin Bowling
e06918b94a ixgbe: update ixgbe_phy with ix-3.3.38 changes
MFC after:	1 week
2024-09-21 02:45:12 -07:00
Kevin Bowling
c41a0eeea0 ixgbe: update if_bypass to ix-3.3.38
Bring if_bypass up to date with changes in the out of tree driver

Drop NEEDGIANT as the sysctl handlers have internal mutex for state
changes.

MFC after:	1 week
2024-09-21 02:42:23 -07:00
Kevin Bowling
ddfec1fb68 e1000: Update igb driver version to 2.5.28-fbsd
Bump to the current out of tree driver version since we only have some
gratuitous changes.

MFC after:	1 week
2024-09-20 23:27:54 -07:00
Kevin Bowling
36c516b311 ixgbe: update if_sriov to use the new mailbox apis
This fixes a page fault when creating VFs and updates to the new mailbox
API and naming conventions.

The functionality works to the same level that it did before my recent
changes. In particular on my 82599 it creates both passthru and ixv
interfaces. In either case, the PF seems to lose the ability to pass
traffic. The ixv driver fails to attach. These issues are present with
or without my updates.

If you use SR-IOV on ixgbe I would be interested in hearing what does
or does not work for you.

MFC after:	6 days
2024-09-20 20:26:42 -07:00
WHR
66efdefe78 mfi: Correct a struct member name
This 'struct mfi_evt_pd' typed member should be named 'pd' instead of 'ld'.

PR: 281155
Reviewed by: imp, delphij
Pull Request: https://github.com/freebsd/freebsd-src/pull/1402
2024-09-20 16:22:43 -06:00
Konstantin Belousov
c84d8db0ab procfs: ensure that RLIMIT_IDENT is properly updated when a limit is added
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-21 00:08:51 +03:00
Konstantin Belousov
2c1963d463 procfs rlimit: handle pipebuf
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-21 00:08:51 +03:00
Konstantin Belousov
af96ccc6a5 uifree(9): report non-zero values for all shared resources
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-21 00:08:51 +03:00
Konstantin Belousov
a52b30ff98 sys_pipe: consistently use cr_ruidinfo for accounting of pipebuf
Tested by:	yasu
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-21 00:08:51 +03:00
Gordon Bergling
9046ecff40 bluetooth(3): Fix two typos in source code comments
- s/conficts/conflicts/

MFC after:	3 days
2024-09-20 20:00:04 +02:00
Gordon Bergling
cc49979077 arm64: Fix a typo in a source code comment
- s/parametes/parameters/

MFC after:	3 days
2024-09-20 18:53:42 +02:00
Heyang Zhou
6e45b50342 mac_veriexec_parser: Fix open_file error handling
NDFREE_PNBUF should be called after checking the return value of
vn_open(), and should only be called once.

Reviewed by: imp, zlei, Kornel Dulęba <mindal@semihalf.com>, Elliott Mitchell
Pull Request: https://github.com/freebsd/freebsd-src/pull/1338
2024-09-20 09:22:56 -06:00
Ahmad Khalifa
b538d49110 Add a new sysctl in order to diffrentiate UEFI architectures
With the new 32-bit UEFI loader, it's convenient to have a sysctl to
figure out how we booted. Can be accessed at machdep.efi_arch

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
2024-09-20 08:45:09 -06:00
Konstantin Belousov
40769168a5 pipespace_new(): decrease uidinfo pipebuf usage if reservation check failed
Submitted by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-20 17:03:45 +03:00
Konstantin Belousov
d6074f73af pipe: use pipe subsystem KVA counter instead of pipe_map size
to calculate the superuser-reserved amount of the pipe space

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-20 17:03:45 +03:00
Mark Johnston
283bf3b4b1 socket: Only log splice structs to ktrace if KTR_STRUCT is configured
Fixes:	a1da7dc1cd ("socket: Implement SO_SPLICE")
2024-09-20 11:40:31 +00:00
Siva Mahadevan
75cd1e534c socket: wrap ktrsplice call with KTRACE ifdef
This fixes a build error when the kernel is built without KTRACE
support.

Reviewed by:	emaste, markj
Fixes:		a1da7dc1cd ("socket: Implement SO_SPLICE")
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1426
2024-09-20 11:34:04 +00:00
Michael Tuexen
87fbd9fc7f tcp: remove unused socket option names
These IPPROTO_TCP-level socket option names correspond to socket
options, which are not implemented. So remove them.
Thanks to Peter Lei for suggesting this change.

Reviewed by:		rscheff, thj
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D46623
2024-09-20 13:03:53 +02:00
Zhenlei Huang
1baf6164e4 bpf: Some style and white space cleanup
MFC after:	3 days
2024-09-20 18:06:22 +08:00
Zhenlei Huang
e30b588460 bpf: Add a comment on the large #ifdef _KERNEL block
This improves readability a little.

MFC after:	3 days
2024-09-20 18:06:22 +08:00
Doug Moore
267f223f62 ixgbe: fix compilation for VF
The mailbox API changed in version 15 and these array ops were left out
of the recent code import as applicable to FreeBSD.

Reported by:	vishwin, yasu
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D46708
2024-09-20 00:57:36 -07:00
Konstantin Belousov
7672cbef2c pipes: reserve configured percentage of buffers zone to superuser
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46619
2024-09-20 09:46:07 +03:00
Konstantin Belousov
8ae779832c privs: add PRIV_PIPEBUF
a privilege to allocate reserved pipebuf space.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46619
2024-09-20 09:46:07 +03:00
Konstantin Belousov
3458bbd397 kernel: add RLIMIT_PIPEBUF
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46619
2024-09-20 09:46:06 +03:00
Konstantin Belousov
0ecbb28ce3 vm_map: add vm_map_find_locked(9)
Reviewed by:	alc, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46678
2024-09-20 09:46:06 +03:00
Chinh Cao
420c984470 ixgbe: remove unused function prototypes
DPDK commit message

net/ixgbe/base: remove unused function prototypes
There are some function prototypes that were introduced at some point
but were never implemented, so remove them.

Signed-off-by: Chinh Cao <chinh.t.cao@intel.com>

Obtained from:	DPDK (e9cc1b4)
MFC after:	1 week
2024-09-19 20:37:07 -07:00
Dawid Zielinski
25771c8c1a ixgbe: prevent PBA read over eeprom word size
DPDK commit message

net/ixgbe/base: prevent untrusted loop bound
Added length check against EEPROM size in words to prevent untrusted
loop bound reported by static code analysis.

Signed-off-by: Dawid Zielinski <dawid.zielinski@intel.com>

Obtained from:	DPDK (6b58617)
MFC after:	1 week
2024-09-19 20:33:37 -07:00
Barbara Skobiej
cc99441831 ixgbe: improve Atom C3000 SWFW semaphore acq
DPDK commit message

net/ixgbe/base: improve SWFW semaphore acquisition
HWSW semaphore acquisition in Atom C3000 NIC is a two stage process.
Each time two semaphore acquisitions are required. Each second semaphore
failure requires re-acquisition of first semaphore. This patch decouples
the two acquisitions preventing potentially hundreds of thousands
of unnecessary loop iterations.

Signed-off-by: Barbara Skobiej <barbara.skobiej@intel.com>

Obtained from:	DPDK (99f960c)
MFC after:	1 week
2024-09-19 20:31:18 -07:00
Barbara Skobiej
bfa48c32bc ixgbe: add missing QV defines
DPDK commit message

net/ixgbe/base: add missing QV defines
This patch adds missing QV defines:
- offset of ANVM data
- Immediate Field module pointer offset
- 2.5GBASE-T and 5GBASE-T physical layer types for X550

Signed-off-by: Barbara Skobiej <barbara.skobiej@intel.com>
Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>

Obtained from:	DPDK (a730b83)
MFC after:	1 week
2024-09-19 20:27:21 -07:00
Barbara Skobiej
3167854b9d ixgbe: remove circular dependency in ixgbe_mbx.h
DPDK commit message

net/ixgbe/base: remove circular header dependency
Including one header file in second header file should be avoided, so
fix it by forward declaring the struct instead.

Signed-off-by: Barbara Skobiej <barbara.skobiej@intel.com>

Obtained from:	DPDK (0bc2af5)
MFC after:	1 week
2024-09-19 20:22:35 -07:00
Marcin Jurczak
4530d49e68 ixgbe: use primary and block terminology
DPDK commit message

net/ixgbe/base: replace non-inclusive language
This patch removes non-inclusive language from code, user interface
and comments.

Signed-off-by: Marcin Jurczak <marcin.jurczak@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>

Obtained from:	DPDK (f12a4bd)
MFC after:	1 week
2024-09-19 20:18:00 -07:00
Piotr Skajewski
50455f73c2 ixgbe: replace implicit fall-through comments
DPDK commit message

Convert all "fall-through" comments to actual code. This aligns the code
with the kernel which no longer allows implicit fallthrough.

Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>

Obtained from:	DPDK (ae8211f)
MFC after:	1 week
2024-09-19 20:15:05 -07:00
Marek Mical
f56311e37d ixgbe: Remove Atom C3000 HIC FW access
DPDK commit message

net/ixgbe/base: replace HIC with direct register access
Unify FW access method to direct register read/writes across all
Atom(R) C3000 products.

Atom(R) C3000 fiber exhibited an issue with the Host Interface Command
execution being locked when another LAN function attempted to acquire
the SWFW sync on Manageability Host. This resulted in HIC atomicity
break and bogus data being read since the other LAN function cleared
all semaphores on timeout whereas HIC execution continued after
unlock.  Direct register IOSF access showed higher stability and
reliability.

Signed-off-by: Marek Mical <marekx.mical@intel.com>
Reviewed-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Reviewed-by: Eryk Rybak <eryk.roch.rybak@intel.com>
Reviewed-by: Francis Racicot <Francis.Racicot@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>

Obtained from:	DPDK (e947f1e)
MFC after:	1 week
2024-09-19 20:01:21 -07:00
Radoslaw Tyl
224f7ab8b4 ixgbe: add reset count field to HW struct
DPDK commit message

net/ixgbe/base: add reset count field to HW struct
Add fw_rst_cnt to store the number of resets after fw update.
This value is required to detect if the EICR.MNG event occurred
after firmware update reset.

Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>

Obtained from:	DPDK (9ab0e9c)
MFC after:	1 week
2024-09-19 19:55:35 -07:00
Radoslaw Tyl
edef276948 ixgbe: improve function comments
Some function comments have mismatches between actual function names and
function name in comments, which causes warnings with kernel-doc. Fix
comments to match function names.

Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>

Obtained from:	DPDK (7b5bc85)
MFC after:	1 week
2024-09-19 19:50:23 -07:00
Radoslaw Tyl
1b80ac6fa6 ixgbe: increase DCB BW calculation for MTU
Change max credit and credit refill to a maximum possible value, 9128.
Too small values cause the incorrect calculation of the bandwidth limits
to each traffic class for frames larger than 4088 bytes.

Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Tested-by: Piotr Skajewski <piotrx.skajewski@intel.com>

Obtained from:	DPDK (440823f)
MFC after:	1 week
2024-09-19 19:42:39 -07:00
Jakub Chylkowski
7234c30999 ixgbe: introduce new mailbox API
DPDK commit message

Current mailbox API does not work as described in documentation and
is prone to errors (for example, it is doing locks on read). Introduce
new mailbox API and provide compatibility functions with old API.

New error codes have been introduced:
- IXGBE_ERR_CONFIG - ixgbe_mbx_operations is not correctly set
- IXGBE_ERR_TIMEOUT - mailbox operation, e.g. poll for message, timedout
- IXGBE_ERR_MBX_NOMSG - no message available on read

In addition, some refactoring has been done: mailbox structures were
defined twice: in ixgbe_type.h and ixgbe_vf.h. Move them into
ixgbe_mbx.h as this header is dedicated for mailbox.

Signed-off-by: Jakub Chylkowski <jakubx.chylkowski@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Reviewed-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Tested-by: Alice Michael <alice.michael@intel.com>
Tested-by: Piotr Skajewski <piotrx.skajewski@intel.com>

Obtained from:	DPDK (6d243d2)
MFC after:	1 week

Reapply message

This reverts commit d80c12ba68.
2024-09-19 19:38:59 -07:00
Kevin Bowling
d80c12ba68 Revert "ixgbe: introduce new mailbox API"
This is missing the ixgbe_mbx.h changes, revert so it can be
committed atomically.

This reverts commit 68ba3eabd4.
2024-09-19 19:18:25 -07:00
Jakub Chylkowski
68ba3eabd4 ixgbe: introduce new mailbox API
DPDK commit message

Current mailbox API does not work as described in documentation and
is prone to errors (for example, it is doing locks on read). Introduce
new mailbox API and provide compatibility functions with old API.

New error codes have been introduced:
- IXGBE_ERR_CONFIG - ixgbe_mbx_operations is not correctly set
- IXGBE_ERR_TIMEOUT - mailbox operation, e.g. poll for message, timedout
- IXGBE_ERR_MBX_NOMSG - no message available on read

In addition, some refactoring has been done: mailbox structures were
defined twice: in ixgbe_type.h and ixgbe_vf.h. Move them into
ixgbe_mbx.h as this header is dedicated for mailbox.

Signed-off-by: Jakub Chylkowski <jakubx.chylkowski@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Reviewed-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Tested-by: Alice Michael <alice.michael@intel.com>
Tested-by: Piotr Skajewski <piotrx.skajewski@intel.com>

Obtained from:	DPDK (6d243d2)
MFC after:	1 week
2024-09-19 18:39:35 -07:00
Jakub Chylkowski
b3c7fde6fe ixgbe: correct register names to match datasheet
DPDK commit message

net/ixgbe/base: correct registers names to match datasheet
Some of mailbox-related registers have different names than it is
specified in datasheet. Correct these names to correspond to their
datasheet counterparts. Additionally, several calculations are changed
to no longer use magic numbers but dedicated macros instead.

Signed-off-by: Jakub Chylkowski <jakubx.chylkowski@intel.com>
Reviewed-by: Marek Zalfresso-jundzillo <marekx.zalfresso-jundzillo@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Tested-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Tested-by: Alice Michael <alice.michael@intel.com>

Obtained from:	DPDK (10fd55e)
MFC after:	1 week
2024-09-19 16:25:09 -07:00
Jakub Chylkowski
1074604082 ixgbe: rename VF message type macros
DPDK commit message

There is name similarity within IXGBE_VT_MSGTYPE_ACK and
PFMAILBOX.ACK / VFMAILBOX.ACK which may cause confusion. Rename MSGTYPE
macros to SUCCESS and FAILURE as they are not specified in datasheet and
now will be easily distinguishable.

Signed-off-by: Jakub Chylkowski <jakubx.chylkowski@intel.com>
Reviewed-by: Marek Zalfresso-jundzillo <marekx.zalfresso-jundzillo@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Tested-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Tested-by: Alice Michael <alice.michael@intel.com>

Obtained from:	DPDK (4f675c9)
MFC after:	1 week
2024-09-19 14:03:18 -07:00
Radoslaw Tyl
9b56dfd27c ixgbe: fix PHY ID for X550
DPDK commit message

net/ixgbe/base: fix PHY ID for X550
Function ixgbe_get_phy_type_from_id() for X550_PHY_ID2 and
X550_PHY_ID3 always return ixgbe_phy_unknown instead of ixgbe_phy_aq
because phy ID's last 4 bits are always masked, and should not be
taken into account when selecting phy type.

This patch adds default PHY ID for X550 devices with mask on last 4
bits (0xFFFFFFF0), and fixes the switch statement to use it.

Fixes: 58ddc80 ("ixgbe/base: add new X550 PHY ids")
Cc: stable@dpdk.org

Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>

Obtained from:	DPDK (a9f5a3b)
MFC after:	1 week
2024-09-19 13:42:14 -07:00
Piotr Skajewski
ab92cab026 ixv: fix x550 VF link speed reported
DPDK commit message

net/ixgbe/base: fix 5G link speed reported on VF
When 5000 Base-T was set on PF the VF reported 100 Base-T. This patch
changes ixgbe_check_mac_link_vf function where there was an incorrect
conditional which checks using PF mac types, now it is correctly
using VF mac types.

Fixes: 12e2090 ("net/ixgbe/base: include new speeds in VFLINK interpretation")
Cc: stable@dpdk.org

Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>

Obtained from:	DPDK (9eb7fdb)
MFC after:	1 week
2024-09-19 13:32:24 -07:00
Kevin Traynor
28fdb212ad ixgbe: increase VF reset timeout
DPDK commit meesage

When VF issues a reset to PF there is a 50 msec wait plus an additional
max of 1 msec (200 * 5us) for the PF to indicate the reset is complete
before timeout.

In some cases, it is seen that the reset is timing out, in which case
the reset does not complete and an error is returned.

In order to account for this, continue to wait an initial 50 msecs, but
then allow a max of an additional 50 msecs (10,000 * 5us) for the
command to complete.

Fixes: af75078 ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

Obtained from:	DPDK (64e714f)
MFC after:	1 week
2024-09-19 13:29:34 -07:00
Doug Moore
c3d743a67a vm_object: use reclaim callback to free pages
Instead of iterating over object->memq to free pages, use a callback
in VM_RADIX_PCTRIE_RECLAIM_CALLBACK to do it.

Reviewed by:	rlibby
Differential Revision:	https://reviews.freebsd.org/D45588
2024-09-19 15:23:19 -05:00