linux.git
14 months agowifi: rtl8xxxu: add hw crypto support for AP mode
Martin Kaistra [Fri, 22 Dec 2023 10:14:40 +0000 (11:14 +0100)]
wifi: rtl8xxxu: add hw crypto support for AP mode

Add a custom function for allocating entries in the sec cam. This allows
us to store multiple keys with the same keyidx.

The maximum number of sec cam entries for 8188f is 16 according to the
vendor driver. Add the number to rtl8xxxu_fileops, so that other chips
which might support more entries, can set a different number there.

Set the bssid as mac address for group keys instead of just using the
ethernet broadcast address and use BIT(6) in the sec cam ctrl entry
for differentiating them from pairwise keys like in the vendor driver.

Add the TXDESC_EN_DESC_ID bit and the hw_key_idx to tx
broadcast/multicast packets in AP mode.

Finally, allow the usage of rtl8xxxu_set_key() for AP mode.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-20-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: remove obsolete priv->vif
Martin Kaistra [Fri, 22 Dec 2023 10:14:39 +0000 (11:14 +0100)]
wifi: rtl8xxxu: remove obsolete priv->vif

Now that all uses of priv->vif have been converted to priv->vifs[]
remove the old attribute.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-19-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: add macids for STA mode
Martin Kaistra [Fri, 22 Dec 2023 10:14:38 +0000 (11:14 +0100)]
wifi: rtl8xxxu: add macids for STA mode

Until now, the driver only assigned a dedicated macid for connections
made in AP mode, in STA mode the return value of rtl8xxxu_get_macid()
was simply 0.
To differentiate between port 0 and 1, when both are in STA mode,
allocate a second macid (with value 1) and set sta_info->macid according
to the used port_num in rtl8xxxu_sta_add().

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-18-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: support multiple interface in start_ap()
Martin Kaistra [Fri, 22 Dec 2023 10:14:37 +0000 (11:14 +0100)]
wifi: rtl8xxxu: support multiple interface in start_ap()

Call set_bssid() with the correct port_num now.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-17-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: support multiple interfaces in bss_info_changed()
Martin Kaistra [Fri, 22 Dec 2023 10:14:36 +0000 (11:14 +0100)]
wifi: rtl8xxxu: support multiple interfaces in bss_info_changed()

Call set_linktype and set_bssid now with correct port_num. Call
stop_tx_beacon only for port 0, as we don't support beacons on port 1.
Explicit changes to BEACON will only happen for AP type interfaces, so
we don't need an additional check there.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-16-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: support multiple interfaces in {add,remove}_interface()
Martin Kaistra [Fri, 22 Dec 2023 10:14:35 +0000 (11:14 +0100)]
wifi: rtl8xxxu: support multiple interfaces in {add,remove}_interface()

Add a custom struct to store in vif->drv_priv with a reference to
port_num and fill it when a new interface is added. Choose a free
port_num for the newly added interface.

As we only want to support AP mode/sending beacons on port 0, only change
the beacon settings if a new interface is actually assigned to port 0.

Call set_linktype() and set_mac() with the appropriate port_num.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-15-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: support multiple interfaces in watchdog_callback()
Martin Kaistra [Fri, 22 Dec 2023 10:14:34 +0000 (11:14 +0100)]
wifi: rtl8xxxu: support multiple interfaces in watchdog_callback()

Check first whether priv->vifs[0] exists and is of type STATION, then go
to priv->vifs[1]. Make sure to call refresh_rate_mask for both
interfaces.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-14-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: support multiple interfaces in configure_filter()
Martin Kaistra [Fri, 22 Dec 2023 10:14:33 +0000 (11:14 +0100)]
wifi: rtl8xxxu: support multiple interfaces in configure_filter()

As we only want to support AP mode/sending beacons on port 0, change
from priv->vif to priv->vifs[0] in the check for AP mode.
Additionally, if we are in AP mode, don't filter RX beacon and probe
response frames to still allow working STATION mode on the other
interface.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-13-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: support multiple interfaces in update_beacon_work_callback()
Martin Kaistra [Fri, 22 Dec 2023 10:14:32 +0000 (11:14 +0100)]
wifi: rtl8xxxu: support multiple interfaces in update_beacon_work_callback()

As we only want to support AP mode/sending beacons on port 0, it is
enough to replace priv->vif with priv->vifs[0].

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-12-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: support multiple interfaces in set_aifs()
Martin Kaistra [Fri, 22 Dec 2023 10:14:31 +0000 (11:14 +0100)]
wifi: rtl8xxxu: support multiple interfaces in set_aifs()

In concurrent mode supported by this driver, both interfaces will use
the same channel and same wireless mode.
It is therefore possible to get the wireless mode by checking the first
connected interface.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-11-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: support setting bssid register for multiple interfaces
Martin Kaistra [Fri, 22 Dec 2023 10:14:30 +0000 (11:14 +0100)]
wifi: rtl8xxxu: support setting bssid register for multiple interfaces

To prepare for concurrent mode, enhance rtl8xxxu_set_bssid() to write the
BSSID of the respective interface to REG_BSSID or REG_BSSID1.

Like done with rtl8xxxu_set_mac(), call rtl8xxxu_set_bssid() with
port_num = 0, until the callers also support multiple interfaces.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-10-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: don't parse CFO, if both interfaces are connected in STA mode
Martin Kaistra [Fri, 22 Dec 2023 10:14:29 +0000 (11:14 +0100)]
wifi: rtl8xxxu: don't parse CFO, if both interfaces are connected in STA mode

If both interfaces are in STATION mode and both are connected to an AP,
there might be conflicting CFO values for the two connections. Ignore
the CFO information in this case.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-9-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: extend check for matching bssid to both interfaces
Martin Kaistra [Fri, 22 Dec 2023 10:14:28 +0000 (11:14 +0100)]
wifi: rtl8xxxu: extend check for matching bssid to both interfaces

The driver will support two interfaces soon, which both can be in
station mode, so extend the check, whether cfo information should be
parsed, to cover both interfaces.

For better code readability put the lines with priv->vifs[port_num] in a
separate function.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-8-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: extend wifi connected check to both interfaces
Martin Kaistra [Fri, 22 Dec 2023 10:14:27 +0000 (11:14 +0100)]
wifi: rtl8xxxu: extend wifi connected check to both interfaces

There are multiple places in the code where the current connection
status of wifi is checked. The driver will support two interfaces soon
and either one of them (or both) could be connected.

Convert all uses of (vif && vif->cfg.assoc) to a new helper
function rtl8xxxu_is_assoc() which checks both interfaces.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-7-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: support setting mac address register for both interfaces
Martin Kaistra [Fri, 22 Dec 2023 10:14:26 +0000 (11:14 +0100)]
wifi: rtl8xxxu: support setting mac address register for both interfaces

To prepare for concurrent mode, enhance rtl8xxxu_set_mac() to write the
mac address of the respective interface to REG_MACID or REG_MACID1.

Remove the call to rtl8xxxu_set_mac() from the init function as we set
it in rtl8xxxu_add_interface() later anyway.

Until rtl8xxxu_add_interface() can handle both interfaces, call
rtl8xxxu_set_mac() with port_num = 0.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-6-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: 8188e: convert usage of priv->vif to priv->vifs[0]
Martin Kaistra [Fri, 22 Dec 2023 10:14:25 +0000 (11:14 +0100)]
wifi: rtl8xxxu: 8188e: convert usage of priv->vif to priv->vifs[0]

The driver currently does not support AP or concurrent mode for 8188e,
so just use priv->vifs[0] instead of priv->vif for now.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-5-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: support setting linktype for both interfaces
Martin Kaistra [Fri, 22 Dec 2023 10:14:24 +0000 (11:14 +0100)]
wifi: rtl8xxxu: support setting linktype for both interfaces

To prepare for concurrent mode, enhance the set_linktype function to be
able to set the linktype in the MSR register for both hardware ports.

Until the users of set_linktype can handle multiple interfaces, use
port_num = 0.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-4-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: prepare supporting two virtual interfaces
Martin Kaistra [Fri, 22 Dec 2023 10:14:23 +0000 (11:14 +0100)]
wifi: rtl8xxxu: prepare supporting two virtual interfaces

To prepare for concurrent mode, add an array ("vifs") to rtl8xxxu_priv
to keep track of both interfaces.

Keep the old priv->vif as long there are still users of it and let
priv->vifs[0] point to the same location.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-3-martin.kaistra@linutronix.de
14 months agowifi: rtl8xxxu: remove assignment of priv->vif in rtl8xxxu_bss_info_changed()
Martin Kaistra [Fri, 22 Dec 2023 10:14:22 +0000 (11:14 +0100)]
wifi: rtl8xxxu: remove assignment of priv->vif in rtl8xxxu_bss_info_changed()

priv->vif gets already set in rtl8xxxu_add_interface, there is no need
to set it also in rtl8xxxu_bss_info_changed().

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-2-martin.kaistra@linutronix.de
14 months agowifi: rtw88: 8822ce: refine power parameters for RFE type 5
Ping-Ke Shih [Wed, 3 Jan 2024 07:01:55 +0000 (15:01 +0800)]
wifi: rtw88: 8822ce: refine power parameters for RFE type 5

Refine the power parameters for better step response especially at high
current ramp case that is caused by power inductor variation.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240103070155.119488-1-pkshih@realtek.com
14 months agowifi: rtw89: mac: Fix spelling mistakes "notfify" -> "notify"
Colin Ian King [Wed, 20 Dec 2023 14:18:31 +0000 (14:18 +0000)]
wifi: rtw89: mac: Fix spelling mistakes "notfify" -> "notify"

There are two spelling mistakes in rtw89_err error messages. Fix these
and also add space between [ERR] and message text.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231220141831.10063-1-colin.i.king@gmail.com
14 months agowifi: rtw89: phy: set channel_info for WiFi 7 chips
Ping-Ke Shih [Fri, 5 Jan 2024 06:44:40 +0000 (14:44 +0800)]
wifi: rtw89: phy: set channel_info for WiFi 7 chips

The channel_info is hardware settings to reflect operational status, such
as scale factor, report unit, buffer matrix size, RU size and so on. Then,
we can get desired reports to do further tuning.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240105064440.36926-1-pkshih@realtek.com
14 months agowifi: rtw89: phy: add BB wrapper of TX power for WiFi 7 chips
Ping-Ke Shih [Fri, 5 Jan 2024 06:44:33 +0000 (14:44 +0800)]
wifi: rtw89: phy: add BB wrapper of TX power for WiFi 7 chips

TX power is controlled by BB layer basically, but it should interact with
MAC layer, so these registers are put on MAC register domain and called
BB wrapper, which contains TX power for each MAC ID, OFDMA RU power, and
consideration of power type table.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240105064433.36870-1-pkshih@realtek.com
14 months agowifi: rtw89: 8922a: add NCTL pre-settings for WiFi 7 chips
Ping-Ke Shih [Fri, 5 Jan 2024 06:44:22 +0000 (14:44 +0800)]
wifi: rtw89: 8922a: add NCTL pre-settings for WiFi 7 chips

NCTL standing for nano-controller is used to assist RF calibration.
Basically, we write settings from a table, but format of the table can't
describe register mask and additional conditions, so add a function to
set this kind of settings.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240105064422.36812-1-pkshih@realtek.com
14 months agowifi: rtw89: phy: ignore special data from BB parameter file
Ping-Ke Shih [Fri, 5 Jan 2024 06:44:07 +0000 (14:44 +0800)]
wifi: rtw89: phy: ignore special data from BB parameter file

BB parameter file is a list of tuple {addr, val} with conditional hardware
version. However, tuples within a condition can't be empty, so insert a
special dummy tuple for this case. Then, ignore this tuple when writing.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240105064407.36750-1-pkshih@realtek.com
14 months agowifi: rtw89: 8922a: update the register used in DIG and the DIG flow
Cheng-Chieh Hsieh [Fri, 5 Jan 2024 06:42:24 +0000 (14:42 +0800)]
wifi: rtw89: 8922a: update the register used in DIG and the DIG flow

DIG standing for dynamic initial gain that is used to adjust RX coverage,
and PD lower threshold is packet detection power level by received signal
strength to avoid false detection of the WiFi packet.

Because of the hardware is different between WiFi 7 and 6 ICs, we adjust
flow and add register definition for 8922A.

Signed-off-by: Cheng-Chieh Hsieh <cj.hsieh@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240105064228.36580-5-pkshih@realtek.com
14 months agowifi: rtw89: 8922a: set RX gain along with set_channel operation
Chung-Hsuan Hung [Fri, 5 Jan 2024 06:42:23 +0000 (14:42 +0800)]
wifi: rtw89: 8922a: set RX gain along with set_channel operation

Set values of LNA, TIA and RPL gain compensation read from firmware file
when channel is changed.

Signed-off-by: Chung-Hsuan Hung <hsuan8331@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240105064228.36580-4-pkshih@realtek.com
14 months agowifi: rtw89: phy: add parser to support RX gain dynamic setting flow
Chung-Hsuan Hung [Fri, 5 Jan 2024 06:42:22 +0000 (14:42 +0800)]
wifi: rtw89: phy: add parser to support RX gain dynamic setting flow

Add RX gain offset dynamic setting flow according to different bands
and bandwidths. RX gain offset values will be different according to
different channel bands, therefore, this dynamic mechanism is needed
while channel is changed. Add this to parse data from the element of
firmware file, and then we can use them easier at runtime.

Signed-off-by: Chung-Hsuan Hung <hsuan8331@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240105064228.36580-3-pkshih@realtek.com
14 months agowifi: rtw89: phy: move bb_gain_info used by WiFi 6 chips to union
Ping-Ke Shih [Fri, 5 Jan 2024 06:42:21 +0000 (14:42 +0800)]
wifi: rtw89: phy: move bb_gain_info used by WiFi 6 chips to union

WiFi 7 chips use different bb_gain_info struct, so move existing struct to
a union in advance. This doesn't change logic at all.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240105064228.36580-2-pkshih@realtek.com
14 months agowifi: rtw89: 8851b: update TX power tables to R37
Zong-Zhe Yang [Wed, 3 Jan 2024 01:41:14 +0000 (09:41 +0800)]
wifi: rtw89: 8851b: update TX power tables to R37

Update TX power tables to RF version R37. Mainly update configurations for
Canada 5.9 GHz (U-NII 4) according to IC (Industry Canada) certification.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240103014114.9558-2-pkshih@realtek.com
14 months agowifi: rtw89: 8852b: update TX power tables to R36
Zong-Zhe Yang [Wed, 3 Jan 2024 01:41:13 +0000 (09:41 +0800)]
wifi: rtw89: 8852b: update TX power tables to R36

Update TX power tables to RF version R36. Mainly update configurations for
Canada 5.9 GHz (U-NII 4) according to IC (Industry Canada) certification.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240103014114.9558-1-pkshih@realtek.com
14 months agowifi: rtw89: pci: use DBI function for 8852AE/8852BE/8851BE
Chin-Yen Lee [Wed, 3 Jan 2024 01:23:46 +0000 (09:23 +0800)]
wifi: rtw89: pci: use DBI function for 8852AE/8852BE/8851BE

Sometimes driver can't use kernel API pci_read/write_config_byte
to access the PCI config space of above address 0x100 due to
the negotiated PCI setting. 8852AE/8852BE/8851BE provide another
way called DBI function, which belongs to WiFi mac and could
access all PCI config space for this case.

Link: https://lore.kernel.org/linux-wireless/79fe81b7db7148b9a7da2353c16d70fb@realtek.com/T/#t
Signed-off-by: Chin-Yen Lee <timlee@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240103012346.6822-1-pkshih@realtek.com
14 months agoRevert "mlx5 updates 2023-12-20"
Jakub Kicinski [Mon, 8 Jan 2024 01:14:51 +0000 (17:14 -0800)]
Revert "mlx5 updates 2023-12-20"

Revert "net/mlx5: Implement management PF Ethernet profile"
This reverts commit 22c4640698a1d47606b5a4264a584e8046641784.
Revert "net/mlx5: Enable SD feature"
This reverts commit c88c49ac9c18fb7c3fa431126de1d8f8f555e912.
Revert "net/mlx5e: Block TLS device offload on combined SD netdev"
This reverts commit 83a59ce0057b7753d7fbece194b89622c663b2a6.
Revert "net/mlx5e: Support per-mdev queue counter"
This reverts commit d72baceb92539a178d2610b0e9ceb75706a75b55.
Revert "net/mlx5e: Support cross-vhca RSS"
This reverts commit c73a3ab8fa6e93a783bd563938d7cf00d62d5d34.
Revert "net/mlx5e: Let channels be SD-aware"
This reverts commit e4f9686bdee7b4dd89e0ed63cd03606e4bda4ced.
Revert "net/mlx5e: Create EN core HW resources for all secondary devices"
This reverts commit c4fb94aa822d6c9d05fc3c5aee35c7e339061dc1.
Revert "net/mlx5e: Create single netdev per SD group"
This reverts commit e2578b4f983cfcd47837bbe3bcdbf5920e50b2ad.
Revert "net/mlx5: SD, Add informative prints in kernel log"
This reverts commit c82d360325112ccc512fc11a3b68cdcdf04a1478.
Revert "net/mlx5: SD, Implement steering for primary and secondaries"
This reverts commit 605fcce33b2d1beb0139b6e5913fa0b2062116b2.
Revert "net/mlx5: SD, Implement devcom communication and primary election"
This reverts commit a45af9a96740873db9a4b5bb493ce2ad81ccb4d5.
Revert "net/mlx5: SD, Implement basic query and instantiation"
This reverts commit 63b9ce944c0e26c44c42cdd5095c2e9851c1a8ff.
Revert "net/mlx5: SD, Introduce SD lib"
This reverts commit 4a04a31f49320d078b8078e1da4b0e2faca5dfa3.
Revert "net/mlx5: Fix query of sd_group field"
This reverts commit e04984a37398b3f4f5a79c993b94c6b1224184cc.
Revert "net/mlx5e: Use the correct lag ports number when creating TISes"
This reverts commit a7e7b40c4bc115dbf2a2bb453d7bbb2e0ea99703.

There are some unanswered questions on the list, and we don't
have any docs. Given the lack of replies so far and the fact
that v6.8 merge window has started - let's revert this and
revisit for v6.9.

Link: https://lore.kernel.org/all/20231221005721.186607-1-saeed@kernel.org/
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agoRevert "net: stmmac: Enable Per DMA Channel interrupt"
Jakub Kicinski [Mon, 8 Jan 2024 01:11:38 +0000 (17:11 -0800)]
Revert "net: stmmac: Enable Per DMA Channel interrupt"

Revert "net: stmmac: Use interrupt mode INTM=1 for per channel irq"
This reverts commit 36af9f25ddfd311da82628f194c794786467cb12.
Revert "net: stmmac: Add support for TX/RX channel interrupt"
This reverts commit 9072e03d32088137a435ddf3aa95fd6e038d69d8.
Revert "net: stmmac: Make MSI interrupt routine generic"
This reverts commit 477bd4beb93bf9ace9bda71f1437b191befa9cf4.
Revert "dt-bindings: net: snps,dwmac: per channel irq"
This reverts commit 67d47c8ada0f8795bfcdb85cc8f2ad3ce556674b.

Device tree bindings need to be reviewed.

Link: https://lore.kernel.org/all/2df9fe3e-7971-4aa2-89a9-0e085b3b00d7@linaro.org/
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agoipvlan: Remove usage of the deprecated ida_simple_xx() API
Christophe JAILLET [Fri, 5 Jan 2024 09:27:09 +0000 (10:27 +0100)]
ipvlan: Remove usage of the deprecated ida_simple_xx() API

ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().

This is less verbose.

Note that the upper bound of ida_alloc_range() is inclusive while the one
of ida_simple_get() was exclusive. So calls have been updated accordingly.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agoipvlan: Fix a typo in a comment
Christophe JAILLET [Fri, 5 Jan 2024 09:27:08 +0000 (10:27 +0100)]
ipvlan: Fix a typo in a comment

s/diffentiate/differentiate/

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet/sched: Remove ipt action tests
Jamal Hadi Salim [Sat, 6 Jan 2024 13:11:28 +0000 (08:11 -0500)]
net/sched: Remove ipt action tests

Commit ba24ea129126 ("net/sched: Retire ipt action") removed the ipt action
but not the testcases. This patch removes the outstanding tdc tests.

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agoMerge branch 'stmmac-per-dma-channel-interrupt'
David S. Miller [Sun, 7 Jan 2024 16:33:50 +0000 (16:33 +0000)]
Merge branch 'stmmac-per-dma-channel-interrupt'

Swee Leong Ching says:

====================
net: stmmac: Enable Per DMA Channel interrupt

Add Per DMA Channel interrupt feature for DWXGMAC IP.

Patchset (link below) contains per DMA channel interrupt, But it was
achieved.
https://lore.kernel.org/lkml/20230821203328.GA2197059-
robh@kernel.org/t/#m849b529a642e1bff89c05a07efc25d6a94c8bfb4

Some of the changes in this patchset are based on reviewer comment on
patchset mentioned beforehand.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: stmmac: Use interrupt mode INTM=1 for per channel irq
Swee Leong Ching [Fri, 5 Jan 2024 07:09:25 +0000 (15:09 +0800)]
net: stmmac: Use interrupt mode INTM=1 for per channel irq

Enable per DMA channel interrupt that uses shared peripheral
interrupt (SPI), so only per channel TX and RX intr (TI/RI)
are handled by TX/RX ISR without calling common interrupt ISR.

Signed-off-by: Teoh Ji Sheng <ji.sheng.teoh@intel.com>
Signed-off-by: Swee Leong Ching <leong.ching.swee@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: stmmac: Add support for TX/RX channel interrupt
Swee Leong Ching [Fri, 5 Jan 2024 07:09:24 +0000 (15:09 +0800)]
net: stmmac: Add support for TX/RX channel interrupt

Enable TX/RX channel interrupt registration for MAC that interrupts CPU
through shared peripheral interrupt (SPI).

Per channel interrupts and interrupt-names are registered through,
Eg: 4 tx and 4 rx channels:
interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
             <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
             <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
             <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
             <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
             <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
             <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
             <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "dma_tx0",
                  "dma_tx1",
                  "dma_tx2",
                  "dma_tx3",
                  "dma_rx0",
                  "dma_rx1",
                  "dma_rx2",
                  "dma_rx3";

Signed-off-by: Teoh Ji Sheng <ji.sheng.teoh@intel.com>
Signed-off-by: Swee Leong Ching <leong.ching.swee@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: stmmac: Make MSI interrupt routine generic
Swee Leong Ching [Fri, 5 Jan 2024 07:09:23 +0000 (15:09 +0800)]
net: stmmac: Make MSI interrupt routine generic

There is no support for per DMA channel interrupt for non-MSI platform,
where the MAC's per channel interrupt hooks up to interrupt controller(GIC)
through shared peripheral interrupt(SPI) to handle interrupt from TX/RX
transmit channel.

This patch generalize the existing MSI ISR to also support non-MSI
platform.

Signed-off-by: Teoh Ji Sheng <ji.sheng.teoh@intel.com>
Signed-off-by: Swee Leong Ching <leong.ching.swee@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agodt-bindings: net: snps,dwmac: per channel irq
Swee Leong Ching [Fri, 5 Jan 2024 07:09:22 +0000 (15:09 +0800)]
dt-bindings: net: snps,dwmac: per channel irq

Add dt-bindings for per channel irq.

Signed-off-by: Rohan G Thomas <rohan.g.thomas@intel.com>
Signed-off-by: Swee Leong Ching <leong.ching.swee@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agoMerge branch 'at803x-more-generalization'
David S. Miller [Sun, 7 Jan 2024 16:23:22 +0000 (16:23 +0000)]
Merge branch 'at803x-more-generalization'

Christian Marangi says:

====================
net: phy: at803x: even more generalization

This is part 3 of at803x required patches to split the PHY driver
in more specific PHY Family driver.

While adding support for a new PHY Family qca807x it was notice lots
of similarities with the qca808x cdt function. Hence this series
is done to make things easier in the future when qca807x PHY will be
submitted.

Changes v4:
- Fix Smatch warning
Changes v3:
- Rebase on top of net-next
Changes v2:
- Address request from Russell in a previous series on cdt get
  status improvement
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: phy: at803x: make read_status more generic
Christian Marangi [Thu, 4 Jan 2024 21:30:41 +0000 (22:30 +0100)]
net: phy: at803x: make read_status more generic

Make read_status more generic in preparation on moving it to shared
library as other PHY Family Driver will have the exact same
implementation.

The only specific part was a check for AR8031/33 if 1000basex was used.
The check is moved to a dedicated function specific for those PHYs.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: phy: at803x: add support for cdt cross short test for qca808x
Christian Marangi [Thu, 4 Jan 2024 21:30:40 +0000 (22:30 +0100)]
net: phy: at803x: add support for cdt cross short test for qca808x

QCA808x PHY Family supports Cable Diagnostic Test also for Cross Pair
Short.

Add all the define to make enable and support these additional tests.

Cross Short test was previously disabled by default, this is now changed
and enabled by default. In this mode, the mask changed a bit and length
is shifted based on the fault condition.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: phy: at803x: refactor qca808x cable test get status function
Christian Marangi [Thu, 4 Jan 2024 21:30:39 +0000 (22:30 +0100)]
net: phy: at803x: refactor qca808x cable test get status function

Refactor qca808x cable test get status function to remove code
duplication and clean things up.

The same logic is applied to each pair hence it can be generalized and
moved to a common function.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: phy: at803x: generalize cdt fault length function
Christian Marangi [Thu, 4 Jan 2024 21:30:38 +0000 (22:30 +0100)]
net: phy: at803x: generalize cdt fault length function

Generalize cable test fault length function since they all base on the
same magic values (already reverse engineered to understand the meaning
of it) to have consistenct values on every PHY.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agofib: rules: remove repeated assignment in fib_nl2rule
Zhengchao Shao [Fri, 5 Jan 2024 06:56:34 +0000 (14:56 +0800)]
fib: rules: remove repeated assignment in fib_nl2rule

In fib_nl2rule(), 'err' variable has been set to -EINVAL during
declaration, and no need to set the 'err' variable to -EINVAL again.
So, remove it.

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet/sched: simplify tc_action_load_ops parameters
Pedro Tammela [Fri, 5 Jan 2024 00:38:10 +0000 (21:38 -0300)]
net/sched: simplify tc_action_load_ops parameters

Instead of using two bools derived from a flags passed as arguments to
the parent function of tc_action_load_ops, just pass the flags itself
to tc_action_load_ops to simplify its parameters.

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonfp: flower: Remove usage of the deprecated ida_simple_xx() API
Christophe JAILLET [Fri, 5 Jan 2024 09:10:37 +0000 (10:10 +0100)]
nfp: flower: Remove usage of the deprecated ida_simple_xx() API

ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().

This is less verbose.

Note that the upper bound of ida_alloc_range() is inclusive while the one
of ida_simple_get() was exclusive.
So NFP_FL_LAG_GROUP_MAX has been decreased by 1. It now better watch the
comment stating that "1 to 31 are valid".

The only other user of NFP_FL_LAG_GROUP_MAX has been updated accordingly in
nfp_fl_lag_put_unprocessed().

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: ethtool: reject unsupported RSS input xfrm values
Ahmed Zaki [Thu, 4 Jan 2024 21:26:53 +0000 (14:26 -0700)]
net: ethtool: reject unsupported RSS input xfrm values

RXFH input_xfrm currently has three supported values: 0 (clear all),
symmetric_xor and NO_CHANGE.

Reject any other value sent from user-space.

Fixes: 13e59344fb9d ("net: ethtool: add support for symmetric-xor RSS hash")
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com>
Link: https://lore.kernel.org/r/20240104212653.394424-1-ahmed.zaki@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agoselftests: forwarding: Avoid failures to source net/lib.sh
Benjamin Poirier [Thu, 4 Jan 2024 14:11:09 +0000 (09:11 -0500)]
selftests: forwarding: Avoid failures to source net/lib.sh

The expression "source ../lib.sh" added to net/forwarding/lib.sh in commit
25ae948b4478 ("selftests/net: add lib.sh") does not work for tests outside
net/forwarding which source net/forwarding/lib.sh (1). It also does not
work in some cases where only a subset of tests are exported (2).

Avoid the problems mentioned above by replacing the faulty expression with
a copy of the content from net/lib.sh which is used by files under
net/forwarding.

A more thorough solution which avoids duplicating content between
net/lib.sh and net/forwarding/lib.sh has been posted here:
https://lore.kernel.org/netdev/20231222135836.992841-1-bpoirier@nvidia.com/

The approach in the current patch is a stopgap solution to avoid submitting
large changes at the eleventh hour of this development cycle.

Example of problem 1)

tools/testing/selftests/drivers/net/bonding$ ./dev_addr_lists.sh
./net_forwarding_lib.sh: line 41: ../lib.sh: No such file or directory
TEST: bonding cleanup mode active-backup                            [ OK ]
TEST: bonding cleanup mode 802.3ad                                  [ OK ]
TEST: bonding LACPDU multicast address to slave (from bond down)    [ OK ]
TEST: bonding LACPDU multicast address to slave (from bond up)      [ OK ]

An error message is printed but since the test does not use functions from
net/lib.sh, the test results are not affected.

Example of problem 2)

tools/testing/selftests$ make install TARGETS="net/forwarding"
tools/testing/selftests$ cd kselftest_install/net/forwarding/
tools/testing/selftests/kselftest_install/net/forwarding$ ./pedit_ip.sh veth{0..3}
lib.sh: line 41: ../lib.sh: No such file or directory
TEST: ping                                                          [ OK ]
TEST: ping6                                                         [ OK ]
./pedit_ip.sh: line 135: busywait: command not found
TEST: dev veth1 ingress pedit ip src set 198.51.100.1               [FAIL]
        Expected to get 10 packets, but got .
./pedit_ip.sh: line 135: busywait: command not found
TEST: dev veth2 egress pedit ip src set 198.51.100.1                [FAIL]
        Expected to get 10 packets, but got .
./pedit_ip.sh: line 135: busywait: command not found
TEST: dev veth1 ingress pedit ip dst set 198.51.100.1               [FAIL]
        Expected to get 10 packets, but got .
./pedit_ip.sh: line 135: busywait: command not found
TEST: dev veth2 egress pedit ip dst set 198.51.100.1                [FAIL]
        Expected to get 10 packets, but got .
./pedit_ip.sh: line 135: busywait: command not found
TEST: dev veth1 ingress pedit ip6 src set 2001:db8:2::1             [FAIL]
        Expected to get 10 packets, but got .
./pedit_ip.sh: line 135: busywait: command not found
TEST: dev veth2 egress pedit ip6 src set 2001:db8:2::1              [FAIL]
        Expected to get 10 packets, but got .
./pedit_ip.sh: line 135: busywait: command not found
TEST: dev veth1 ingress pedit ip6 dst set 2001:db8:2::1             [FAIL]
        Expected to get 10 packets, but got .
./pedit_ip.sh: line 135: busywait: command not found
TEST: dev veth2 egress pedit ip6 dst set 2001:db8:2::1              [FAIL]
        Expected to get 10 packets, but got .

In this case, the test results are affected.

Fixes: 25ae948b4478 ("selftests/net: add lib.sh")
Suggested-by: Ido Schimmel <idosch@nvidia.com>
Suggested-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://lore.kernel.org/r/20240104141109.100672-1-bpoirier@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agoMerge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf...
Jakub Kicinski [Sat, 6 Jan 2024 03:15:32 +0000 (19:15 -0800)]
Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

Daniel Borkmann says:

====================
pull-request: bpf-next 2024-01-05

We've added 40 non-merge commits during the last 2 day(s) which contain
a total of 73 files changed, 1526 insertions(+), 951 deletions(-).

The main changes are:

1) Fix a memory leak when streaming AF_UNIX sockets were inserted
   into multiple sockmap slots/maps, from John Fastabend.

2) Fix gotol in s390 BPF JIT with large offsets, from Ilya Leoshkevich.

3) Fix reattachment branch in bpf_tracing_prog_attach() and reject
   the request if there is no valid attach_btf, from Jiri Olsa.

4) Remove deprecated bpfilter kernel leftovers given the project
   is developed in user space (https://github.com/facebook/bpfilter),
   from Quentin Deslandes.

5) Relax tracing BPF program recursive attach rules given right now
   it is not possible to create tracing program call cycles,
   from Dmitrii Dolgov.

6) Fix excessive memory consumption for the bpf_global_percpu_ma
   for systems with a large number of CPUs, from Yonghong Song.

7) Small x86 BPF JIT cleanup to reuse emit_nops instead of open-coding
   memcpy of x86_nops, from Leon Hwang.

8) Follow-up for libbpf to support __arg_ctx global function argument tag
   semantics to complement the merged kernel side, from Andrii Nakryiko.

9) Introduce "volatile compare" macros for BPF selftests in order
   to make the latter more robust against compiler optimization,
   from Alexei Starovoitov.

10) Small simplification in verifier's size checking of helper accesses
    along with additional selftests, from Andrei Matei.

* tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (40 commits)
  selftests/bpf: Test re-attachment fix for bpf_tracing_prog_attach
  bpf: Fix re-attachment branch in bpf_tracing_prog_attach
  selftests/bpf: Add test for recursive attachment of tracing progs
  bpf: Relax tracing prog recursive attach rules
  bpf, x86: Use emit_nops to replace memcpy x86_nops
  selftests/bpf: Test gotol with large offsets
  selftests/bpf: Double the size of test_loader log
  s390/bpf: Fix gotol with large offsets
  bpfilter: remove bpfilter
  bpf: Remove unnecessary cpu == 0 check in memalloc
  selftests/bpf: add __arg_ctx BTF rewrite test
  selftests/bpf: add arg:ctx cases to test_global_funcs tests
  libbpf: implement __arg_ctx fallback logic
  libbpf: move BTF loading step after relocation step
  libbpf: move exception callbacks assignment logic into relocation step
  libbpf: use stable map placeholder FDs
  libbpf: don't rely on map->fd as an indicator of map being created
  libbpf: use explicit map reuse flag to skip map creation steps
  libbpf: make uniform use of btf__fd() accessor inside libbpf
  selftests/bpf: Add a selftest with > 512-byte percpu allocation size
  ...
====================

Link: https://lore.kernel.org/r/20240105170105.21070-1-daniel@iogearbox.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agoptp_ocp: adjust MAINTAINERS and mailmap
Vadim Fedorenko [Thu, 4 Jan 2024 17:25:40 +0000 (09:25 -0800)]
ptp_ocp: adjust MAINTAINERS and mailmap

The fb.com domain is going to be deprecated.
Use personal one for kernel contributions.

Signed-off-by: Vadim Fedorenko <vadfed@fb.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240104172540.2379128-1-vadfed@meta.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agogeneve: use DEV_STATS_INC()
Eric Dumazet [Thu, 4 Jan 2024 16:36:33 +0000 (16:36 +0000)]
geneve: use DEV_STATS_INC()

geneve updates dev->stats fields locklessly.

Adopt DEV_STATS_INC() to avoid races.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240104163633.2070538-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agoMerge branch 'net-gro-reduce-extension-header-parsing-overhead'
Jakub Kicinski [Fri, 5 Jan 2024 16:11:51 +0000 (08:11 -0800)]
Merge branch 'net-gro-reduce-extension-header-parsing-overhead'

Richard Gobert says:

====================
net: gro: reduce extension header parsing overhead

This series attempts to reduce the parsing overhead of IPv6 extension
headers in GRO and GSO, by removing extension header specific code and
enabling the frag0 fast path.

The following changes were made:

 - Removed some unnecessary HBH conditionals by adding HBH offload
   to inet6_offloads
 - Added a utility function to support frag0 fast path in ipv6_gro_receive
 - Added selftests for IPv6 packets with extension headers in GRO

v2: https://lore.kernel.org/netdev/127b8199-1cd4-42d7-9b2b-875abaad93fe@gmail.com/
v1: https://lore.kernel.org/netdev/f4eff69d-3917-4c42-8c6b-d09597ac4437@gmail.com/
====================

Link: https://lore.kernel.org/r/ac6fb684-c00e-449c-92c3-99358a927ade@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agoselftests/net: fix GRO coalesce test and add ext header coalesce tests
Richard Gobert [Wed, 3 Jan 2024 14:48:35 +0000 (15:48 +0100)]
selftests/net: fix GRO coalesce test and add ext header coalesce tests

Currently there is no test which checks that IPv6 extension header packets
successfully coalesce. This commit adds a test, which verifies two IPv6
packets with HBH extension headers do coalesce, and another test which
checks that packets with different extension header data do not coalesce
in GRO.

I changed the receive socket filter to accept a packet with one extension
header. This change exposed a bug in the fragment test -- the old BPF did
not accept the fragment packet. I updated correct_num_packets in the
fragment test accordingly.

Signed-off-by: Richard Gobert <richardbgobert@gmail.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/69282fed-2415-47e8-b3d3-34939ec3eb56@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agonet: gro: parse ipv6 ext headers without frag0 invalidation
Richard Gobert [Wed, 3 Jan 2024 14:44:21 +0000 (15:44 +0100)]
net: gro: parse ipv6 ext headers without frag0 invalidation

The existing code always pulls the IPv6 header and sets the transport
offset initially. Then optionally again pulls any extension headers in
ipv6_gso_pull_exthdrs and sets the transport offset again on return from
that call. skb->data is set at the start of the first extension header
before calling ipv6_gso_pull_exthdrs, and must disable the frag0
optimization because that function uses pskb_may_pull/pskb_pull instead of
skb_gro_ helpers. It sets the GRO offset to the TCP header with
skb_gro_pull and sets the transport header. Then returns skb->data to its
position before this block.

This commit introduces a new helper function - ipv6_gro_pull_exthdrs -
which is used in ipv6_gro_receive to pull ipv6 ext headers instead of
ipv6_gso_pull_exthdrs. Thus, there is no modification of skb->data, all
operations use skb_gro_* helpers, and the frag0 fast path can be taken for
IPv6 packets with ext headers.

Signed-off-by: Richard Gobert <richardbgobert@gmail.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/504130f6-b56c-4dcc-882c-97942c59f5b7@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agonet: gso: add HBH extension header offload support
Richard Gobert [Wed, 3 Jan 2024 14:40:44 +0000 (15:40 +0100)]
net: gso: add HBH extension header offload support

This commit adds net_offload to IPv6 Hop-by-Hop extension headers (as it
is done for routing and dstopts) since it is supported in GSO and GRO.
This allows to remove specific HBH conditionals in GSO and GRO when
pulling and parsing an incoming packet.

Signed-off-by: Richard Gobert <richardbgobert@gmail.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/d4f8825a-1d55-4b12-9d67-a254dbbfa6ae@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agonet: fill in MODULE_DESCRIPTION()s for CAIF
Jakub Kicinski [Thu, 4 Jan 2024 14:48:55 +0000 (06:48 -0800)]
net: fill in MODULE_DESCRIPTION()s for CAIF

W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add descriptions to all the CAIF sub-modules.

Link: https://lore.kernel.org/r/20240104144855.1320993-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agonet: fill in MODULE_DESCRIPTION() for AF_PACKET
Jakub Kicinski [Thu, 4 Jan 2024 14:41:19 +0000 (06:41 -0800)]
net: fill in MODULE_DESCRIPTION() for AF_PACKET

W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add description to net/packet/af_packet.c

Acked-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20240104144119.1319055-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agonet: fill in MODULE_DESCRIPTION()s for DSA tags
Jakub Kicinski [Thu, 4 Jan 2024 14:37:59 +0000 (06:37 -0800)]
net: fill in MODULE_DESCRIPTION()s for DSA tags

W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add descriptions to all the DSA tag modules.

The descriptions are copy/pasted Kconfig names, with s/^Tag/DSA tag/.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Acked-by: Kurt Kanzenbach <kurt@linutronix.de>
Link: https://lore.kernel.org/r/20240104143759.1318137-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agonet: fill in MODULE_DESCRIPTION()s for ATM
Jakub Kicinski [Thu, 4 Jan 2024 14:37:37 +0000 (06:37 -0800)]
net: fill in MODULE_DESCRIPTION()s for ATM

W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add descriptions to all the ATM modules and drivers.

Link: https://lore.kernel.org/r/20240104143737.1317945-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agoMerge branch 'dpll-expose-fractional-frequency-offset-value-to-user'
Jakub Kicinski [Fri, 5 Jan 2024 15:58:21 +0000 (07:58 -0800)]
Merge branch 'dpll-expose-fractional-frequency-offset-value-to-user'

Jiri Pirko says:

====================
dpll: expose fractional frequency offset value to user

Allow to expose pin fractional frequency offset value over new DPLL
generic netlink attribute. Add an op to get the value from the driver.
Implement this new op in mlx5 driver.
====================

Link: https://lore.kernel.org/r/20240103132838.1501801-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agonet/mlx5: DPLL, Implement fractional frequency offset get pin op
Jiri Pirko [Wed, 3 Jan 2024 13:28:38 +0000 (14:28 +0100)]
net/mlx5: DPLL, Implement fractional frequency offset get pin op

Implement ffo_get() pin op filling it up to MSEED.frequency_diff value.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Acked-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Acked-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Link: https://lore.kernel.org/r/20240103132838.1501801-4-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agonet/mlx5: DPLL, Use struct to get values from mlx5_dpll_synce_status_get()
Jiri Pirko [Wed, 3 Jan 2024 13:28:37 +0000 (14:28 +0100)]
net/mlx5: DPLL, Use struct to get values from mlx5_dpll_synce_status_get()

Instead of passing separate args, introduce
struct mlx5_dpll_synce_status to hold the values obtained by
mlx5_dpll_synce_status_get().

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Acked-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Acked-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Link: https://lore.kernel.org/r/20240103132838.1501801-3-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agodpll: expose fractional frequency offset value to user
Jiri Pirko [Wed, 3 Jan 2024 13:28:36 +0000 (14:28 +0100)]
dpll: expose fractional frequency offset value to user

Add a new netlink attribute to expose fractional frequency offset value
for a pin. Add an op to get the value from the driver.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Acked-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Link: https://lore.kernel.org/r/20240103132838.1501801-2-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agoMerge branch 'user_mii_bus-cleanup-part-one'
David S. Miller [Fri, 5 Jan 2024 11:56:37 +0000 (11:56 +0000)]
Merge branch 'user_mii_bus-cleanup-part-one'

Vladimir Oltean says:

====================
ds->user_mii_bus cleanup (part 1)

There are some drivers which assign ds->user_mii_bus when they
don't really need its specific functionality, aka non-OF based
dsa_user_phy_connect(). There was some confusion regarding the
fact that yes, this is why ds->user_mii_bus really exists, so
I've started a cleanup series which aims to eliminate the usage
of ds->user_mii_bus from drivers when there is nothing to gain
from it.

Today's drivers are lantiq_gswip, qca8k and bcm_sf2. The work is
not done here, but a "part 2" may or may not come, depending on
other priorities.

All patches were only compile-tested.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: dsa: bcm_sf2: drop priv->master_mii_dn
Vladimir Oltean [Thu, 4 Jan 2024 14:00:37 +0000 (16:00 +0200)]
net: dsa: bcm_sf2: drop priv->master_mii_dn

There used to be a of_node_put(priv->master_mii_dn) call in
bcm_sf2_mdio_unregister(), which was accidentally deleted in commit
6ca80638b90c ("net: dsa: Use conduit and user terms").

But it's not needed - we don't need to hold a reference on the
"brcm,unimac-mdio" OF node for that long, since we don't do anything
with it. We can release it as soon as we finish bcm_sf2_mdio_register().

Also reduce "if (err && dn)" to just "if (err)". We know "dn", aka the
former priv->master_mii_dn, is non-NULL. Otherwise, of_mdio_find_bus(dn)
would not have been able to find the bus behind "brcm,unimac-mdio".

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: dsa: bcm_sf2: stop assigning an OF node to the ds->user_mii_bus
Vladimir Oltean [Thu, 4 Jan 2024 14:00:36 +0000 (16:00 +0200)]
net: dsa: bcm_sf2: stop assigning an OF node to the ds->user_mii_bus

The bcm_sf2 driver does something strange. Instead of calling
of_mdiobus_register() with an OF node argument, it manually assigns the
bus->dev->of_node and then calls the non-OF mdiobus_register(). This
circumvents some code from __of_mdiobus_register() from running, which
sets the auto-scan mask, parses some device tree properties, etc.

I'm going to go out on a limb and say that the OF node isn't, in fact,
needed at all, and can be removed. The MDIO diversion as initially
implemented in commit 461cd1b03e32 ("net: dsa: bcm_sf2: Register our
slave MDIO bus") looked quite different than it is now, after commit
771089c2a485 ("net: dsa: bcm_sf2: Ensure that MDIO diversion is used").
Initially, it made sense, as bcm_sf2 was registering another set of
driver ops for the "brcm,unimac-mdio" OF node. But now, it deletes all
phandles, which makes "phy-handle"s unable to find PHYs, which means
that it always goes through the OF-unaware dsa_user_phy_connect().

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: dsa: qca8k: use "dev" consistently within qca8k_mdio_register()
Vladimir Oltean [Thu, 4 Jan 2024 14:00:35 +0000 (16:00 +0200)]
net: dsa: qca8k: use "dev" consistently within qca8k_mdio_register()

Accessed either through priv->dev or ds->dev, it is the same device
structure. Keep a single variable which holds a reference to it, and use
it consistently.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: dsa: qca8k: consolidate calls to a single devm_of_mdiobus_register()
Vladimir Oltean [Thu, 4 Jan 2024 14:00:34 +0000 (16:00 +0200)]
net: dsa: qca8k: consolidate calls to a single devm_of_mdiobus_register()

__of_mdiobus_register() already calls __mdiobus_register() if the
OF node provided as argument is NULL. We can take advantage of that
and simplify the 2 code path, calling devm_of_mdiobus_register() only
once for both cases.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: dsa: qca8k: assign ds->user_mii_bus only for the non-OF case
Vladimir Oltean [Thu, 4 Jan 2024 14:00:33 +0000 (16:00 +0200)]
net: dsa: qca8k: assign ds->user_mii_bus only for the non-OF case

To simplify reasoning about why the DSA framework provides the
ds->user_mii_bus functionality, drivers should only use it if they
need to. The qca8k driver appears to also use it simply as storage
for a pointer, which is not a good enough reason to make the core
much more difficult to follow.

ds->user_mii_bus is useful for only 2 cases:

1. The driver probes on platform_data (no OF)
2. The driver probes on OF, but there is no OF node for the MDIO bus.

It is unclear if case (1) is supported with qca8k. It might not be:
the driver might crash when of_device_get_match_data() returns NULL
and then it dereferences priv->info without NULL checking.

Anyway, let us limit the ds->user_mii_bus usage only to the above cases,
and not assign it when an OF node is present.

The bus->phy_mask assignment follows along with the movement, because
__of_mdiobus_register() overwrites this bus field anyway. The value set
by the driver only matters for the non-OF code path.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: dsa: qca8k: skip MDIO bus creation if its OF node has status = "disabled"
Vladimir Oltean [Thu, 4 Jan 2024 14:00:32 +0000 (16:00 +0200)]
net: dsa: qca8k: skip MDIO bus creation if its OF node has status = "disabled"

Currently the driver calls the non-OF devm_mdiobus_register() rather
than devm_of_mdiobus_register() for this case, but it seems to rather
be a confusing coincidence, and not a real use case that needs to be
supported.

If the device tree says status = "disabled" for the MDIO bus, we
shouldn't need an MDIO bus at all. Instead, just exit as early as
possible and do not call any MDIO API.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: dsa: qca8k: put MDIO bus OF node on qca8k_mdio_register() failure
Vladimir Oltean [Thu, 4 Jan 2024 14:00:31 +0000 (16:00 +0200)]
net: dsa: qca8k: put MDIO bus OF node on qca8k_mdio_register() failure

of_get_child_by_name() gives us an OF node with an elevated refcount,
which should be dropped when we're done with it. This is so that,
if (of_node_check_flag(node, OF_DYNAMIC)) is true, the node's memory can
eventually be freed.

There are 2 distinct paths to be considered in qca8k_mdio_register():

- devm_of_mdiobus_register() succeeds: since commit 3b73a7b8ec38 ("net:
  mdio_bus: add refcounting for fwnodes to mdiobus"), the MDIO core
  treats this well.

- devm_of_mdiobus_register() or anything up to that point fails: it is
  the duty of the qca8k driver to release the OF node.

This change addresses the second case by making sure that the OF node
reference is not leaked.

The "mdio" node may be NULL, but of_node_put(NULL) is safe.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: dsa: lantiq_gswip: ignore MDIO buses disabled in OF
Vladimir Oltean [Thu, 4 Jan 2024 14:00:30 +0000 (16:00 +0200)]
net: dsa: lantiq_gswip: ignore MDIO buses disabled in OF

If the "lantiq,xrx200-mdio" child has status = "disabled", the MDIO bus
creation should be avoided. Use of_device_is_available() to check for
that, and take advantage of 2 facts:

- of_device_is_available(NULL) returns false
- of_node_put(NULL) is a no-op

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: dsa: lantiq_gswip: use devres for internal MDIO bus, not ds->user_mii_bus
Vladimir Oltean [Thu, 4 Jan 2024 14:00:29 +0000 (16:00 +0200)]
net: dsa: lantiq_gswip: use devres for internal MDIO bus, not ds->user_mii_bus

This driver does not need any of the functionalities that make
ds->user_mii_bus special. Those use cases are listed here:
https://lore.kernel.org/netdev/20231221174746.hylsmr3f7g5byrsi@skbuf/

It just makes use of ds->user_mii_bus only as storage for its own MDIO
bus, which otherwise has no connection to the framework. This is because:

- the gswip driver only probes on OF: it fails if of_device_get_match_data()
  returns NULL

- when the child OF node of the MDIO bus is absent, no MDIO bus is
  registered at all, not even by the DSA framework. In order for that to
  have happened, the gswip driver would have needed to provide
  ->phy_read() and ->phy_write() in struct dsa_switch_ops, which it does
  not.

We can break the connection between the gswip driver and the DSA
framework and still preserve the same functionality.

Since commit 3b73a7b8ec38 ("net: mdio_bus: add refcounting for fwnodes
to mdiobus"), MDIO buses take ownership of the OF node handled to them,
and release it on their own. The gswip driver no longer needs to do
this.

Combine that with devres, and we no longer need to keep track of
anything for teardown purposes.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: dsa: lantiq_gswip: delete irrelevant use of ds->phys_mii_mask
Vladimir Oltean [Thu, 4 Jan 2024 14:00:28 +0000 (16:00 +0200)]
net: dsa: lantiq_gswip: delete irrelevant use of ds->phys_mii_mask

__of_mdiobus_register(), called right next, overwrites the phy_mask
we just configured on the bus, so this is redundant and confusing.
Delete it.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agonet: sched: move block device tracking into tcf_block_get/put_ext()
Jiri Pirko [Thu, 4 Jan 2024 12:58:44 +0000 (13:58 +0100)]
net: sched: move block device tracking into tcf_block_get/put_ext()

Inserting the device to block xarray in qdisc_create() is not suitable
place to do this. As it requires use of tcf_block() callback, it causes
multiple issues. It is called for all qdisc types, which is incorrect.

So, instead, move it to more suitable place, which is tcf_block_get_ext()
and make sure it is only done for qdiscs that use block infrastructure
and also only for blocks which are shared.

Symmetrically, alter the cleanup path, move the xarray entry removal
into tcf_block_put_ext().

Fixes: 913b47d3424e ("net/sched: Introduce tc block netdev tracking infra")
Reported-by: Ido Schimmel <idosch@nvidia.com>
Closes: https://lore.kernel.org/all/ZY1hBb8GFwycfgvd@shredder/
Reported-by: Kui-Feng Lee <sinquersw@gmail.com>
Closes: https://lore.kernel.org/all/ce8d3e55-b8bc-409c-ace9-5cf1c4f7c88e@gmail.com/
Reported-and-tested-by: syzbot+84339b9e7330daae4d66@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/0000000000007c85f5060dcc3a28@google.com/
Reported-and-tested-by: syzbot+806b0572c8d06b66b234@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/00000000000082f2f2060dcc3a92@google.com/
Reported-and-tested-by: syzbot+0039110f932d438130f9@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/0000000000007fbc8c060dcc3a5c@google.com/
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Victor Nogueira <victor@mojatatu.com>
Tested-by: Victor Nogueira <victor@mojatatu.com>
Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 months agoMerge branch 'relax-tracing-prog-recursive-attach-rules'
Alexei Starovoitov [Fri, 5 Jan 2024 04:31:34 +0000 (20:31 -0800)]
Merge branch 'relax-tracing-prog-recursive-attach-rules'

Dmitrii Dolgov says:

====================
Relax tracing prog recursive attach rules

Currently, it's not allowed to attach an fentry/fexit prog to another
fentry/fexit. At the same time it's not uncommon to see a tracing
program with lots of logic in use, and the attachment limitation
prevents usage of fentry/fexit for performance analysis (e.g. with
"bpftool prog profile" command) in this case. An example could be
falcosecurity libs project that uses tp_btf tracing programs for
offloading certain part of logic into tail-called programs, but the
use-case is still generic enough -- a tracing program could be
complicated and heavy enough to warrant its profiling, yet frustratingly
it's not possible to do so use best tooling for that.

Following the corresponding discussion [1], the reason for that is to
avoid tracing progs call cycles without introducing more complex
solutions. But currently it seems impossible to load and attach tracing
programs in a way that will form such a cycle. Replace "no same type"
requirement with verification that no more than one level of attachment
nesting is allowed. In this way only one fentry/fexit program could be
attached to another fentry/fexit to cover profiling use case, and still
no cycle could be formed.

The series contains a test for recursive attachment, as well as a fix +
test for an issue in re-attachment branch of bpf_tracing_prog_attach.
When preparing the test for the main change set, I've stumbled upon the
possibility to construct a sequence of events when attach_btf would be
NULL while computing a trampoline key. It doesn't look like this issue
is triggered by the main change, because the reproduces doesn't actually
need to have an fentry attachment chain.

[1]: https://lore.kernel.org/bpf/20191108064039.2041889-16-ast@kernel.org/
====================

Link: https://lore.kernel.org/r/20240103190559.14750-1-9erthalion6@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
14 months agoselftests/bpf: Test re-attachment fix for bpf_tracing_prog_attach
Dmitrii Dolgov [Wed, 3 Jan 2024 19:05:47 +0000 (20:05 +0100)]
selftests/bpf: Test re-attachment fix for bpf_tracing_prog_attach

Add a test case to verify the fix for "prog->aux->dst_trampoline and
tgt_prog is NULL" branch in bpf_tracing_prog_attach. The sequence of
events:

1. load rawtp program
2. load fentry program with rawtp as target_fd
3. create tracing link for fentry program with target_fd = 0
4. repeat 3

Acked-by: Jiri Olsa <olsajiri@gmail.com>
Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com>
Link: https://lore.kernel.org/r/20240103190559.14750-5-9erthalion6@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
14 months agobpf: Fix re-attachment branch in bpf_tracing_prog_attach
Jiri Olsa [Wed, 3 Jan 2024 19:05:46 +0000 (20:05 +0100)]
bpf: Fix re-attachment branch in bpf_tracing_prog_attach

The following case can cause a crash due to missing attach_btf:

1) load rawtp program
2) load fentry program with rawtp as target_fd
3) create tracing link for fentry program with target_fd = 0
4) repeat 3

In the end we have:

- prog->aux->dst_trampoline == NULL
- tgt_prog == NULL (because we did not provide target_fd to link_create)
- prog->aux->attach_btf == NULL (the program was loaded with attach_prog_fd=X)
- the program was loaded for tgt_prog but we have no way to find out which one

    BUG: kernel NULL pointer dereference, address: 0000000000000058
    Call Trace:
     <TASK>
     ? __die+0x20/0x70
     ? page_fault_oops+0x15b/0x430
     ? fixup_exception+0x22/0x330
     ? exc_page_fault+0x6f/0x170
     ? asm_exc_page_fault+0x22/0x30
     ? bpf_tracing_prog_attach+0x279/0x560
     ? btf_obj_id+0x5/0x10
     bpf_tracing_prog_attach+0x439/0x560
     __sys_bpf+0x1cf4/0x2de0
     __x64_sys_bpf+0x1c/0x30
     do_syscall_64+0x41/0xf0
     entry_SYSCALL_64_after_hwframe+0x6e/0x76

Return -EINVAL in this situation.

Fixes: f3a95075549e0 ("bpf: Allow trampoline re-attach for tracing and lsm programs")
Cc: stable@vger.kernel.org
Signed-off-by: Jiri Olsa <olsajiri@gmail.com>
Acked-by: Jiri Olsa <olsajiri@gmail.com>
Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com>
Link: https://lore.kernel.org/r/20240103190559.14750-4-9erthalion6@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
14 months agoselftests/bpf: Add test for recursive attachment of tracing progs
Dmitrii Dolgov [Wed, 3 Jan 2024 19:05:45 +0000 (20:05 +0100)]
selftests/bpf: Add test for recursive attachment of tracing progs

Verify the fact that only one fentry prog could be attached to another
fentry, building up an attachment chain of limited size. Use existing
bpf_testmod as a start of the chain.

Acked-by: Jiri Olsa <olsajiri@gmail.com>
Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com>
Link: https://lore.kernel.org/r/20240103190559.14750-3-9erthalion6@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
14 months agobpf: Relax tracing prog recursive attach rules
Dmitrii Dolgov [Wed, 3 Jan 2024 19:05:44 +0000 (20:05 +0100)]
bpf: Relax tracing prog recursive attach rules

Currently, it's not allowed to attach an fentry/fexit prog to another
one fentry/fexit. At the same time it's not uncommon to see a tracing
program with lots of logic in use, and the attachment limitation
prevents usage of fentry/fexit for performance analysis (e.g. with
"bpftool prog profile" command) in this case. An example could be
falcosecurity libs project that uses tp_btf tracing programs.

Following the corresponding discussion [1], the reason for that is to
avoid tracing progs call cycles without introducing more complex
solutions. But currently it seems impossible to load and attach tracing
programs in a way that will form such a cycle. The limitation is coming
from the fact that attach_prog_fd is specified at the prog load (thus
making it impossible to attach to a program loaded after it in this
way), as well as tracing progs not implementing link_detach.

Replace "no same type" requirement with verification that no more than
one level of attachment nesting is allowed. In this way only one
fentry/fexit program could be attached to another fentry/fexit to cover
profiling use case, and still no cycle could be formed. To implement,
add a new field into bpf_prog_aux to track nested attachment for tracing
programs.

[1]: https://lore.kernel.org/bpf/20191108064039.2041889-16-ast@kernel.org/

Acked-by: Jiri Olsa <olsajiri@gmail.com>
Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com>
Link: https://lore.kernel.org/r/20240103190559.14750-2-9erthalion6@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
14 months agobpf, x86: Use emit_nops to replace memcpy x86_nops
Leon Hwang [Thu, 4 Jan 2024 14:22:23 +0000 (22:22 +0800)]
bpf, x86: Use emit_nops to replace memcpy x86_nops

Move emit_nops() before emit_prologue() and replace
memcpy(prog, x86_nops[5], X86_PATCH_SIZE) with emit_nops(&prog, X86_PATCH_SIZE).

Signed-off-by: Leon Hwang <hffilwlqm@gmail.com>
Link: https://lore.kernel.org/r/20240104142226.87869-2-hffilwlqm@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
14 months agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Jakub Kicinski [Fri, 5 Jan 2024 02:04:58 +0000 (18:04 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Cross-merge networking fixes after downstream PR.

Conflicts:

drivers/net/ethernet/broadcom/bnxt/bnxt.c
  e009b2efb7a8 ("bnxt_en: Remove mis-applied code from bnxt_cfg_ntp_filters()")
  0f2b21477988 ("bnxt_en: Fix compile error without CONFIG_RFS_ACCEL")
https://lore.kernel.org/all/20240105115509.225aa8a2@canb.auug.org.au/

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agoMerge tag 'wireless-next-2024-01-03' of git://git.kernel.org/pub/scm/linux/kernel...
Jakub Kicinski [Fri, 5 Jan 2024 01:00:07 +0000 (17:00 -0800)]
Merge tag 'wireless-next-2024-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next

Johannes Berg says:

====================
Just a couple of more things over the holidays:

 - first kunit tests for both cfg80211 and mac80211
 - a few multi-link fixes
 - DSCP mapping update
 - RCU fix

* tag 'wireless-next-2024-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next:
  wifi: mac80211: remove redundant ML element check
  wifi: cfg80211: parse all ML elements in an ML probe response
  wifi: cfg80211: correct comment about MLD ID
  wifi: cfg80211: Update the default DSCP-to-UP mapping
  wifi: cfg80211: tests: add some scanning related tests
  wifi: mac80211: kunit: extend MFP tests
  wifi: mac80211: kunit: generalize public action test
  wifi: mac80211: add kunit tests for public action handling
  kunit: add a convenience allocation wrapper for SKBs
  kunit: add parameter generation macro using description from array
  wifi: mac80211: fix spelling typo in comment
  wifi: cfg80211: fix RCU dereference in __cfg80211_bss_update
====================

Link: https://lore.kernel.org/r/20240103144423.52269-3-johannes@sipsolutions.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agor8169: fix building with CONFIG_LEDS_CLASS=m
Heiner Kallweit [Wed, 3 Jan 2024 15:52:04 +0000 (16:52 +0100)]
r8169: fix building with CONFIG_LEDS_CLASS=m

When r8169 is built-in but LED support is a loadable module, the new
code to drive the LED causes a link failure:

ld: drivers/net/ethernet/realtek/r8169_leds.o: in function `rtl8168_init_leds':
r8169_leds.c:(.text+0x36c): undefined reference to `devm_led_classdev_register_ext'

LED support is an optional feature, so fix this issue by adding a Kconfig
symbol R8169_LEDS that is guaranteed to be false if r8169 is built-in
and LED core support is a module. As a positive side effect of this change
r8169_leds.o no longer is built under this configuration.

Fixes: 18764b883e15 ("r8169: add support for LED's on RTL8168/RTL8101")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312281159.9TPeXbNd-lkp@intel.com/
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Simon Horman <horms@kernel.org> # build-tested
Tested-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/d055aeb5-fe5c-4ccf-987f-5af93a17537b@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agonet: enetc: allow phy-mode = "1000base-x"
Vladimir Oltean [Wed, 3 Jan 2024 11:34:45 +0000 (13:34 +0200)]
net: enetc: allow phy-mode = "1000base-x"

The driver code proper is handled by the lynx_pcs. The enetc just needs
to populate phylink's supported_interfaces array, and return true for
this phy-mode in enetc_port_has_pcs(), such that it creates an internal
MDIO bus through which the Lynx PCS registers are accessed.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20240103113445.3892971-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agoMerge tag 'net-6.7-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Linus Torvalds [Fri, 5 Jan 2024 00:34:50 +0000 (16:34 -0800)]
Merge tag 'net-6.7-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Jakub Kicinski:
 "Including fixes from wireless and netfilter.

  We haven't accumulated much over the break. If it wasn't for the
  uninterrupted stream of fixes for Intel drivers this PR would be very
  slim. There was a handful of user reports, however, either they stood
  out because of the lower traffic or users have had more time to test
  over the break. The ones which are v6.7-relevant should be wrapped up.

  Current release - regressions:

   - Revert "net: ipv6/addrconf: clamp preferred_lft to the minimum
     required", it caused issues on networks where routers send prefixes
     with preferred_lft=0

   - wifi:
      - iwlwifi: pcie: don't synchronize IRQs from IRQ, prevent deadlock
      - mac80211: fix re-adding debugfs entries during reconfiguration

  Current release - new code bugs:

   - tcp: print AO/MD5 messages only if there are any keys

  Previous releases - regressions:

   - virtio_net: fix missing dma unmap for resize, prevent OOM

  Previous releases - always broken:

   - mptcp: prevent tcp diag from closing listener subflows

   - nf_tables:
      - set transport header offset for egress hook, fix IPv4 mangling
      - skip set commit for deleted/destroyed sets, avoid double deactivation

   - nat: make sure action is set for all ct states, fix openvswitch
     matching on ICMP packets in related state

   - eth: mlxbf_gige: fix receive hang under heavy traffic

   - eth: r8169: fix PCI error on system resume for RTL8168FP

   - net: add missing getsockopt(SO_TIMESTAMPING_NEW) and cmsg handling"

* tag 'net-6.7-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (52 commits)
  net/tcp: Only produce AO/MD5 logs if there are any keys
  net: Implement missing SO_TIMESTAMPING_NEW cmsg support
  bnxt_en: Remove mis-applied code from bnxt_cfg_ntp_filters()
  net: ravb: Wait for operating mode to be applied
  asix: Add check for usbnet_get_endpoints
  octeontx2-af: Re-enable MAC TX in otx2_stop processing
  octeontx2-af: Always configure NIX TX link credits based on max frame size
  net/smc: fix invalid link access in dumping SMC-R connections
  net/qla3xxx: fix potential memleak in ql_alloc_buffer_queues
  virtio_net: fix missing dma unmap for resize
  igc: Fix hicredit calculation
  ice: fix Get link status data length
  i40e: Restore VF MSI-X state during PCI reset
  i40e: fix use-after-free in i40e_aqc_add_filters()
  net: Save and restore msg_namelen in sock_sendmsg
  netfilter: nft_immediate: drop chain reference counter on error
  netfilter: nf_nat: fix action not being set for all ct states
  net: bcmgenet: Fix FCS generation for fragmented skbuffs
  mptcp: prevent tcp diag from closing listener subflows
  MAINTAINERS: add Geliang as reviewer for MPTCP
  ...

14 months agoRevert "Introduce PHY listing and link_topology tracking"
Jakub Kicinski [Fri, 5 Jan 2024 00:04:35 +0000 (16:04 -0800)]
Revert "Introduce PHY listing and link_topology tracking"

This reverts commit 32bb4515e34469975abc936deb0a116c4a445817.
This reverts commit d078d480639a4f3b5fc2d56247afa38e0956483a.
This reverts commit fcc4b105caa4b844bf043375bf799c20a9c99db1.
This reverts commit 345237dbc1bdbb274c9fb9ec38976261ff4a40b8.
This reverts commit 7db69ec9cfb8b4ab50420262631fb2d1908b25bf.
This reverts commit 95132a018f00f5dad38bdcfd4180d1af955d46f6.
This reverts commit 63d5eaf35ac36cad00cfb3809d794ef0078c822b.
This reverts commit c29451aefcb42359905d18678de38e52eccb3bb5.
This reverts commit 2ab0edb505faa9ac90dee1732571390f074e8113.
This reverts commit dedd702a35793ab462fce4c737eeba0badf9718e.
This reverts commit 034fcc210349b873ece7356905be5c6ca11eef2a.
This reverts commit 9c5625f559ad6fe9f6f733c11475bf470e637d34.
This reverts commit 02018c544ef113e980a2349eba89003d6f399d22.

Looks like we need more time for reviews, and incremental
changes will be hard to make sense of. So revert.

Link: https://lore.kernel.org/all/ZZP6FV5sXEf+xd58@shell.armlinux.org.uk/
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agox86/csum: clean up `csum_partial' further
Linus Torvalds [Tue, 27 Jun 2023 20:55:32 +0000 (13:55 -0700)]
x86/csum: clean up `csum_partial' further

Commit 688eb8191b47 ("x86/csum: Improve performance of `csum_partial`")
ended up improving the code generation for the IP csum calculations, and
in particular special-casing the 40-byte case that is a hot case for
IPv6 headers.

It then had _another_ special case for the 64-byte unrolled loop, which
did two chains of 32-byte blocks, which allows modern CPU's to improve
performance by doing the chains in parallel thanks to renaming the carry
flag.

This just unifies the special cases and combines them into just one
single helper the 40-byte csum case, and replaces the 64-byte case by a
80-byte case that just does that single helper twice.  It avoids having
all these different versions of inline assembly, and actually improved
performance further in my tests.

There was never anything magical about the 64-byte unrolled case, even
though it happens to be a common size (and typically is the cacheline
size).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 months agox86/csum: Remove unnecessary odd handling
Noah Goldstein [Sun, 24 Sep 2023 14:35:49 +0000 (09:35 -0500)]
x86/csum: Remove unnecessary odd handling

The special case for odd aligned buffers is unnecessary and mostly
just adds overhead. Aligned buffers is the expectations, and even for
unaligned buffer, the only case that was helped is if the buffer was
1-byte from word aligned which is ~1/7 of the cases. Overall it seems
highly unlikely to be worth to extra branch.

It was left in the previous perf improvement patch because I was
erroneously comparing the exact output of `csum_partial(...)`, but
really we only need `csum_fold(csum_partial(...))` to match so its
safe to remove.

All csum kunit tests pass.

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Laight <david.laight@aculab.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 months agoMerge branch 's390-bpf-fix-gotol-with-large-offsets'
Alexei Starovoitov [Thu, 4 Jan 2024 19:35:40 +0000 (11:35 -0800)]
Merge branch 's390-bpf-fix-gotol-with-large-offsets'

Ilya Leoshkevich says:

====================
s390/bpf: Fix gotol with large offsets

Hi,

While looking at a pyperf180 failure on s390x (must be related to [1],
I'm not done with the investigation yet) I noticed that I have
unfortunately messed up the gotol implementation. Patch 1 is the fix,
patch 2 is a small test infrastructure tweak, and patch 3 adds a
test.

[1] https://github.com/llvm/llvm-project/issues/55669

Best regards,
Ilya
====================

Link: https://lore.kernel.org/r/20240102193531.3169422-1-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
14 months agoselftests/bpf: Test gotol with large offsets
Ilya Leoshkevich [Tue, 2 Jan 2024 19:30:37 +0000 (20:30 +0100)]
selftests/bpf: Test gotol with large offsets

Test gotol with offsets that don't fit into a short (i.e., larger than
32k or smaller than -32k).

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/r/20240102193531.3169422-4-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
14 months agoselftests/bpf: Double the size of test_loader log
Ilya Leoshkevich [Tue, 2 Jan 2024 19:30:36 +0000 (20:30 +0100)]
selftests/bpf: Double the size of test_loader log

Testing long jumps requires having >32k instructions. That many
instructions require the verifier log buffer of 2 megabytes.

The regular test_progs run doesn't need an increased buffer, since
gotol test with 40k instructions doesn't request a log,
but test_progs -v will set the verifier log level.
Hence to avoid breaking gotol test with -v increase the buffer size.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/r/20240102193531.3169422-3-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
14 months agoMerge tag 'ieee802154-for-net-next-2023-12-20' of gitolite.kernel.org:pub/scm/linux...
Jakub Kicinski [Thu, 4 Jan 2024 22:20:14 +0000 (14:20 -0800)]
Merge tag 'ieee802154-for-net-next-2023-12-20' of gitolite.kernel.org:pub/scm/linux/kernel/git/wpan/wpan-next

Miquel Raynal says:

====================
This pull request mainly brings support for dynamic associations in
the WPAN world. Thanks to the recent improvements it was possible to
discover nearby devices, it is now also possible to associate with them
to form a sub-network using a specific PAN ID. The support includes
several functions, such as:

* Requesting an association to a coordinator, waiting for the response
* Sending a disassociation notification to a coordinator
* Receiving an association request when we are coordinator, answering
  the request (for now all devices are accepted up to a limit, to be
  refined)
* Sending a disassociation notification to a child
* Users may request the list of associated devices (the parent and the
  children).

Here are a few example of userspace calls that can be made:
 # iwpan dev <dev> associate pan_id 2 coord $COORD
 # iwpan dev <dev> list_associations
 # iwpan dev <dev> disassociate ext_addr $COORD

There are as well two patches from Uwe turning remove callbacks into
void functions.

* tag 'ieee802154-for-net-next-2023-12-20' of gitolite.kernel.org:pub/scm/linux/kernel/git/wpan/wpan-next:
  mac802154: Avoid new associations while disassociating
  ieee802154: Avoid confusing changes after associating
  mac802154: Only allow PAN controllers to process association requests
  mac802154: Use the PAN coordinator parameter when stamping packets
  mac80254: Provide real PAN coordinator info in beacons
  ieee802154: Give the user the association list
  mac802154: Handle disassociation notifications from peers
  mac802154: Follow the number of associated devices
  ieee802154: Add support for limiting the number of associated devices
  mac802154: Handle association requests from peers
  mac802154: Handle disassociations
  ieee802154: Add support for user disassociation requests
  mac802154: Handle associating
  ieee802154: Add support for user association requests
  ieee802154: Internal PAN management
  ieee802154: Let PAN IDs be reset
  ieee802154: hwsim: Convert to platform remove callback returning void
  ieee802154: fakelb: Convert to platform remove callback returning void
====================

Link: https://lore.kernel.org/r/20231220095556.4d9cef91@xps-13
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agonet: phy: aquantia: switch to crc_itu_t()
Stephen Rothwell [Thu, 21 Dec 2023 02:09:46 +0000 (13:09 +1100)]
net: phy: aquantia: switch to crc_itu_t()

After merging the net-next tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/net/phy/aquantia/aquantia_firmware.c: In function 'aqr_fw_load_memory':
drivers/net/phy/aquantia/aquantia_firmware.c:135:23: error: implicit declaration of function 'crc_ccitt_false'; did you mean 'crc_ccitt_byte'? [-Werror=implicit-function-declaration]
  135 |                 crc = crc_ccitt_false(crc, crc_data, sizeof(crc_data));
      |                       ^~~~~~~~~~~~~~~
      |                       crc_ccitt_byte

Caused by commit e93984ebc1c8 ("net: phy: aquantia: add firmware load support")
interacting with commit ("lib: crc_ccitt_false() is identical to crc_itu_t()")
from the mm tree.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: https://lore.kernel.org/r/20231221130946.7ed9a805@canb.auug.org.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agoRevert "octeon_ep_vf: add octeon_ep_vf driver"
Jakub Kicinski [Thu, 4 Jan 2024 21:00:44 +0000 (13:00 -0800)]
Revert "octeon_ep_vf: add octeon_ep_vf driver"

This reverts commit c902ba322cfda8ebe54ffd53392ef7e2ef5d1c65.
This reverts commit 50648968b3e3c193b45eaca07840111c9d4fdb74.
This reverts commit 77cef1e02104529f54c5b8b4126317eda3ff132d.
This reverts commit 8f8d322bc47c1c5ecab1f2238b644e30f69cc475.
This reverts commit 6ca7b5486ebd5e7985f0c98a2ac7ae49078043a4.
This reverts commit db468f92c3b9437dfeb1dcf55d9b7d1b97769a6c.
This reverts commit 5f8c64c2344c888a03fa4b7fd8c3b5e0c235d879.
This reverts commit ebdc193b2ce209bfc1ebec2f777cd7bac00b547c.

The driver needs more work.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 months agos390/bpf: Fix gotol with large offsets
Ilya Leoshkevich [Tue, 2 Jan 2024 19:30:35 +0000 (20:30 +0100)]
s390/bpf: Fix gotol with large offsets

The gotol implementation uses a wrong data type for the offset: it
should be s32, not s16.

Fixes: c690191e23d8 ("s390/bpf: Implement unconditional jump with 32-bit offset")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/r/20240102193531.3169422-2-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This page took 0.125326 seconds and 4 git commands to generate.