Commit graph

152357 commits

Author SHA1 Message Date
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
Kristof Provost
bc4b0defb0 pf: do not pass af to PFLOG_PACKET
Do not pass AF specific information to pf_test_rule() and PFLOG_PACKET()
because either the info is already available in struct pd or easy
to figure out.  Makes pf_test() and pf_test6() even more similar
(with the target to remove one of them in the near future).
OK henning@

Reviewed by:	zlei
Obtained from:	OpenBSD, claudio <claudio@openbsd.org>, 5480721ed1
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46596
2024-09-19 22:20:15 +02:00
Kristof Provost
7d381d0a5b pf: exclude link local address from the dynamic interface address pool
so that rules like "pass out on vr1 inet6 nat-to (vr1)" won't map
to the non routable ipv6 link local address; with suggestions and
ok claudio, henning

Reviewed by:	zlei
Obtained from:	OpenBSD, mikeb <mikeb@openbsd.org>, e41548933f
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46594
2024-09-19 22:20:14 +02:00
Kristof Provost
b450a0f928 pf: remove unneeded double pointer to pf_scrub_ip(6)()
pf_scrub_ip() does not modify the given mbuf pointer.  So don't
pass a pointer to a pointer to make the code in pf_test() clearer.
ok henning@

Reviewed by:	zlei
Obtained from:	OpenBSD, bluhm <bluhm@openbsd.org>, aac78b59b9
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46593
2024-09-19 22:20:14 +02:00
Kristof Provost
dea41633e5 pf: handle ACK prioritization for v6
Obtained from:	OpenBSD, sthen <sthen@openbsd.org>, 1a3657e9c6
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46592
2024-09-19 22:20:14 +02:00
Kristof Provost
5130165be1 pf: remove redundant checks
pf_test() and pf_test6() drop IPv4-ICMP6 and IPv6-ICMP packets.  Do
not do the same check in pf_test_rule() again.
ok henning

Reviewed by:	zlei
Obtained from:	OpenBSD, bluhm <bluhm@openbsd.org>, de5c2bfb74
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46591
2024-09-19 22:20:14 +02:00
Kristof Provost
1fd02d1e15 pf: factor out rule counter update code
Break out rule counter update code into a separate function, makes the
behaviour consistent between IPv4 and IPv6.

From martin.pelikan@gmail.com

Obtained from:	OpenBSD, mcbride <mcbride@openbsd.org>, ce38da5678
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46590
2024-09-19 22:20:14 +02:00
Kristof Provost
f3ab00c2b6 pf: add a new log opt PF_LOG_MATCHES
forces logging on all subsequent matching rules
new log opt "matches"
awesome for debugging, a rule like
match log(matches) from $testbox
will show you exactly which subsequent rules match on that packet
real ok theo assumed oks ryan & dlg bikeshedding many

Obtained from:	OpenBSD, henning <henning@openbsd.org>, 1603e01ae4
Obtained from:	OpenBSD, henning <henning@openbsd.org>, f496e91672
Obtained from:	OpenBSD, henning <henning@openbsd.org>, 07481a9fee
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46588
2024-09-19 22:20:13 +02:00
Kristof Provost
589c67771e pf: drop packets if pullup fails
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46587
2024-09-19 22:20:13 +02:00
Kristof Provost
9ec74b675e pf: factor out pf_setup_pdesc()
factor our the code to set up pf_pdesc, a central structure in pf carrying
information about the packet we're currently dealing with, into its own
function. ok ryan dlg and additional testing sthen

Obtained from:	OpenBSD, henning <henning@openbsd.org>, c4202972a3
Obtained from:	OpenBSD, claudio <claudio@openbsd.org>, 78d25123ea
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46586
2024-09-19 22:20:13 +02:00
Kristof Provost
650dcb48b0 pf: print rule number in debug output
When printing states in debug output, print the rule number that created
it if we have it.

Requested by dlg, ok henning.

Obtained from:	OpenBSD, mcbride <mcbride@openbsd.org>, c06d1661a6
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46585
2024-09-19 22:20:12 +02:00
Kristof Provost
03d11291d8 pf: fix potential memory leaks in pf_create_state()
If we fail to init TCP (or SCTP) initialization we have to remember to free
state keys as well. They will not be freed for us when we free the state until
we've inserted the state (i.e. pf_insert_state()).

Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46583
2024-09-19 22:20:12 +02:00
Simon J. Gerraty
4a5fa10861 procfs require PRIV_PROC_MEM_WRITE to write mem
Add a priv_check for PRIV_PROC_MEM_WRITE which will be blocked
by mac_veriexec if being enforced, unless the process has a maclabel
to grant priv.

Reviewed by:	stevek
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D46692
2024-09-19 13:10:27 -07:00
Jamie Gritton
ae1a0648b0 jail: unbreak the zfs.mount_snapshot option
The change of its description from integer to boolean didn't actually
change it to a boolean, but only made it impossible to set as either
a boolean or an integer.

Rather than make it work as a boolean parameter should, just revert
to the old (working) integer parameter, and change the documentation
to match.

PR:		274263
Reported by:	andrew.hotlab at hotmail
2024-09-19 12:49:01 -07:00
Anatoly Burakov
811912c46b e1000: fix link power down
DPDK commit message

net/e1000/base: fix link power down
Current code is a result of work to reduce duplication between various
device models. However, the logic that was replaced did not exactly
match the new logic, and as a result the link power down was not
working correctly for some NICs, and the link remained up even when
the interface is down.

Fix it to correctly power down the link under all circumstances that
were supported by old logic.

Fixes: 44dddd1 ("net/e1000/base: remove duplicated codes")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Obtained from:	DPDK (a8218d0)
MFC after:	1 week
2024-09-19 12:04:47 -07:00
Oskar Holmlund
ad7c98797b Remove TI reference from arm/GENERIC
Approved by: imp, manu (mentor)
Differential revision: https://reviews.freebsd.org/D46702
2024-09-19 20:15:47 +02:00
Doug Moore
450a6690f5 vm_radix: offer pctrie_iterator access
Add to the vm_radix and vm_page interfaces methods to use pctrie
iterators with vm_radix tries.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D46663
2024-09-19 11:49:40 -05:00
Mark Johnston
1ae4951ba7 netmap: Make the memory ops function pointer table const
No functional change intended.

Reviewed by:	vmaffione
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D46664
2024-09-19 09:56:30 +00:00
Mark Johnston
06e7bc83f6 dtrace/amd64: Remove the dtrace_invop_callsite symbol
It is not needed after commit 7e80fd5ef397.  No functional change
intended.

Reviewed by:	avg
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D46675
2024-09-19 09:22:13 +00:00
Mark Johnston
d439598dd0 dtrace tests: Add a test case which validates FBT probe arguments
Reviewed by:	avg
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D46674
2024-09-19 09:22:03 +00:00
Mark Johnston
5bd7b976c1 dtrace_test: Remove the dependency on dtraceall
FBT refuses to create probes in modules which depend on dtrace(all), but
dtrace_test is a convenient place to add functions specifically for
testing dtrace.

The dependency on dtraceall is not needed, so just remove it.  In fact,
it can be useful to test SDT probe creation by loading dtrace_test with
and without dtraceall loaded.

Reviewed by:	avg
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D46673
2024-09-19 09:21:55 +00:00
Mark Johnston
9aabab09c4 dtrace/amd64: Fix probe argument fetching
dtrace_getarg() previously walked the call stack looking for a frame
matching the dtrace_invop_callsite symbol, in order to look for a
trapframe corresponding to an invop (i.e., FBT or kinst) probe.  Commit
3ba8e9dc4a broke this in some cases by breaking the expected alignment
of the dtrace_invop_callsite symbol.

Rather than groveling around the stack to find invop probe arguments,
simply use the trapframe reference saved by dtrace_invop().  This is
simpler and less fragile.

Reported by:	avg
Reviewed by:	avg
MFC after:	2 weeks
Fixes:	3ba8e9dc4a ("dtrace/amd64: Implement emulation of call instructions")
Differential Revision:	https://reviews.freebsd.org/D46672
2024-09-19 09:21:38 +00:00
Mark Johnston
767723ddeb iflib: Use if_alloc_dev() to allocate the ifnet
This ensures that the ifnet's NUMA affinity is accurate.

Reviewed by:	kbowling
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D46667
2024-09-19 09:21:05 +00:00
Kevin Bowling
14561f1eda ixl: Increase tx/rx ring size to 8160
I've verified the tx queue (table 8-22) in addition.

DPDK commit message

net/i40e: increase max descriptor queue length
According to the Intel X710/XXV710/XL710 Datasheet, the maximum receive
queue descriptor length is 0x1FE0 (8160 in base 10). This is specified
as QLEN in table 8-12, page 1083.

I've tested this change with an XXV710 NIC and it has positive effect on
performance under high load scenarios. Where previously I'd get
~2000 packets/sec miss rate, now I get only ~40 packets/sec miss rate.

Signed-off-by: Igor Gutorov <igootorov@gmail.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Obtained from:	DPDK (ce9470f)
MFC after:	1 week
2024-09-18 22:30:24 -07:00
Alexander Motin
a1bb5bdb0a ure(4): Add ID for LAN port in Thinkpad OneLink+ dock
That's a pretty old dock for Thinkpad X1 Carbon Gen4 and few others.

MFC after:	1 week
2024-09-18 21:55:24 -04:00
Stephen J. Kiernan
77d7da1dc8 Revert "mca: Allow for passing ECC error record to memory controller driver"
This reverts commit 996a832d2e.
2024-09-18 10:44:37 -04:00
Stephen J. Kiernan
996a832d2e mca: Allow for passing ECC error record to memory controller driver
Added (de)registration functions for memory controller driver to be
notified when ECC errors occur. This allows for decoding of the
specific error by the driver.

Submitted by:	Lakshman Likith Nudurupati <lnlakshman@juniper.net>
Sponsored by:	Juniper Networks, Inc.
Obtained from:	Semihalf
2024-09-18 10:37:14 -04:00
Richard Scheffenegger
0a05ea1f56 tcp: keep syncache flags when updating ECN info
While processing the ECN flags of an incoming packet,
incorrectly cleared all other syncache flags.

Reported by: tuexen
Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D46694
2024-09-18 11:18:30 +02:00
Gordon Bergling
3e614fb600 e1000: Fix a typo in a source code comment
- s/chekcsums/checksums/

MFC after: 3 days
2024-09-18 04:32:41 +02:00
Cheng Cui
ee45061051
cc_cubic: use newreno to emulate AIMD in TCP-friendly region
Reviewed by: rscheff, tuexen
Differential Revision: https://reviews.freebsd.org/D46546
2024-09-17 10:37:00 -04:00
Cheng Cui
b6c137de0a
tcp cc: re-organize newreno functions into parts that can be re-used
Reviewed by: rscheff, tuexen
Differential Revision: https://reviews.freebsd.org/D46046
2024-09-17 09:54:17 -04:00
Konstantin Belousov
666303f598 sysarch: improve checks for max user address
making LA48 processes have the same limit as with the pre-LA57 kernels.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-17 02:02:14 +03:00
Konstantin Belousov
29a0a720c3 amd64 sysarch(2): style
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-17 02:02:14 +03:00
Konstantin Belousov
e134cd9580 amd64: pml5 entries do not support PAT bits
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-17 02:02:14 +03:00
Konstantin Belousov
4f82af24f1 amd64 pmap: do not set PG_G for usermode pmap pml5 kernel entry
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-17 02:02:14 +03:00
Konstantin Belousov
bbb00b1719 pmap_bootstrap_la57(): reload IDT
after the trip through protected mode.  This is required by AMD64 ARM.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-17 02:02:14 +03:00
Navdeep Parhar
07f47e8850 cxgbe/t4_tom: completely avoid L2T entries during stop/suspend.
1. Mark the L2T entry valid only if t4_write_l2e succeeds, which won't
   happen if the adapter is stopped.  This prevents L2T entries from
   sometimes getting (re)promoted to VALID on Tx activity during stop.
2. Discard a work request immediately instead of enqueueing it to the
   arp queue if the adapter is stopped.

Fixes:	c1c524852f cxgbe/t4_tom: Implement uld_stop and uld_restart for ULD_TOM.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2024-09-16 10:24:32 -07:00
Tom Jones
855c3dacfc imx clk: Skip reconfiguring the clock if we don't have a new best_parent
imx_clk_composite_find_best_parent can fail, when it does for all the
clocks checked we attempt to configure an uninitialized best_parent
leading to a panic.

Initialize best_parent and skip reconfiguring the clock if we don't find
a new best_parent to use.

Reviewed By: manu
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46662
2024-09-16 15:45:26 +01:00
Kristof Provost
2339ead638 pf: allow filtering on the receive interface
add support to pf for filtering a packet by the interface it was received
on. use the received-on IFNAME filter option on a pf.conf rule to restrict
which packet the interface had to be received on. eg:

  pass out on em0 from $foo to $bar received-on fxp0

ive been running this in production for a week now. i find it particularly
usefull with interface groups.

no objections, and a few "i like"s from henning, claudio, deraadt, mpf

Obtained from:	OpenBSD, dlg <dlg@openbsd.org>, 95b4320893
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46577
2024-09-16 13:47:07 +02:00
Kristof Provost
50ecaf1bd4 pf: use AF_INET6 when comparing IPv6 addresses
Reviewed by:	zlei
MFC after:	1 week
Obtained from:	OpenBSD, henning <henning@openbsd.org>, cf7c0bf78a
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46576
2024-09-16 13:46:14 +02:00
Kristof Provost
2ca286d0d2 pf: always drop ICMPv6 in IPv4 datagrams
Not only when compiled with INET6.

Suggested by Max Laier.
ok henning@

Reviewed by:	zlei
Obtained from:	OpenBSD, jsing <jsing@openbsd.org>, 0ba1e6e32b9
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46575
2024-09-16 13:46:09 +02:00
Michael Tuexen
1c6bb4c578 tcp: remove TCP_OFFLOAD_DISABLE
TCP_OFFLOAD_DISABLE is nowhere else used or defined. So remove it.
No functional change intended.

Reviewed by:		np
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D46669
2024-09-15 11:44:49 +02:00
Konstantin Belousov
678bc2281c la57: do not set global bit for PML5 entry
The bit is reserved for PLM5, causing #PF on KVA access on real
hardware, unlike QEMU.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-16 11:13:51 +03:00
Konstantin Belousov
280e50461a amd64 la57_trampoline: save registers in memory
AMD64 ARM states that 64bit part of the architectural state is undefined
after 32<->64 mode switching.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-16 11:12:25 +03:00
Konstantin Belousov
687b896f8e amd64 la57_trampoline: lgdt descriptor is always 10 bytes in long mode
Extend its storage to be compliant.
This is currently nop due to padding and nul gdt descriptor right after
the lgdt descriptor.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-16 11:11:54 +03:00
Konstantin Belousov
1be58e67eb amd64 la57_trampoline: turn off global pages and PCID before turning off paging
SDM is explicit that having CR4.PCID=1 while toggling CR3.PG causes #GP.
To be safe and to avoid some more effects, also turn off CR4.PGE.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-09-16 11:10:16 +03:00
Konstantin Belousov
b7ea2b69ef amd64 la57_trampoline: disable EFER.LME around setting CR4.LA57
Changing paging mode while LME is set seems to be not allowed.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	jThe FreeBSD Foundation
MFC after:	1 week
2024-09-16 11:09:38 +03:00