[Intel-wired-lan] [iwl-net 0/4] ice: improve validation of virtchnl parameters

2025-02-17 Thread Martyna Szapar-Mudlaw
This patch series introduces improvements to the `ice` driver and `virtchnl` interface by adding stricter validation checks and preventing potential out-of-bounds scenarios. Jan Glaza (3): virtchnl: make proto and filter action count unsigned ice: stop truncating queue ids when checking ice:

[Intel-wired-lan] [iwl-net 1/4] virtchnl: make proto and filter action count unsigned

2025-02-17 Thread Martyna Szapar-Mudlaw
From: Jan Glaza Count can never be negative and valid. Change it to unsigned to simplify handling virtchnl messages in drivers. Fixes: 1f7ea1cd6a374 ("ice: Enable FDIR Configure for AVF") Reviewed-by: Jedrzej Jagielski Signed-off-by: Jan Glaza Signed-off-by: Martyna Szapar-Mudlaw --- include

[Intel-wired-lan] [iwl-net 2/4] ice: stop truncating queue ids when checking

2025-02-17 Thread Martyna Szapar-Mudlaw
From: Jan Glaza Queue IDs can be up to 4096, update invalid check to stop truncating IDs to 8 bits. Fixes: bf93bf791cec8 ("ice: introduce ice_virtchnl.c and ice_virtchnl.h") Reviewed-by: Aleksandr Loktionov Reviewed-by: Jedrzej Jagielski Signed-off-by: Jan Glaza Signed-off-by: Martyna Szapar-

[Intel-wired-lan] [iwl-net 4/4] ice: fix input validation for virtchnl BW

2025-02-17 Thread Martyna Szapar-Mudlaw
From: Lukasz Czapnik Add validation of tc and queue id values sent by a VF in ice_vc_cfg_q_bw(). Additionally fixed logged value in the warning message, where max_tx_rate was incorrectly referenced instead of min_tx_rate. Also improve error handling in this function by properly exiting when inval

[Intel-wired-lan] [iwl-net 3/4] ice: validate queue quanta parameters to prevent OOB access

2025-02-17 Thread Martyna Szapar-Mudlaw
From: Jan Glaza Add queue wraparound prevention in quanta configuration. Ensure end_qid does not overflow by validating start_qid and num_queues. Fixes: 015307754a19 ("ice: Support VF queue rate limit and quanta size configuration") Reviewed-by: Jedrzej Jagielski Signed-off-by: Jan Glaza Sign

[Intel-wired-lan] [iwl-next v3 4/4] ixgbe: turn off MDD while modifying SRRCTL

2025-02-17 Thread Michal Swiatkowski
From: Radoslaw Tyl Modifying SRRCTL register can generate MDD event. Turn MDD off during SRRCTL register write to prevent generating MDD. Fix RCT in ixgbe_set_rx_drop_en(). Reviewed-by: Marcin Szycik Reviewed-by: Przemek Kitszel Signed-off-by: Radoslaw Tyl Signed-off-by: Michal Swiatkowski

[Intel-wired-lan] [iwl-next v3 1/4] ixgbe: add MDD support

2025-02-17 Thread Michal Swiatkowski
From: Paul Greenwalt Add malicious driver detection to ixgbe driver. The supported devices are E610 and X550. Handling MDD events is enabled while VFs are created and turned off when they are disabled. here is no runtime command to enable or disable MDD independently. MDD event is logged when m

[Intel-wired-lan] [iwl-next v3 3/4] ixgbe: add Tx hang detection unhandled MDD

2025-02-17 Thread Michal Swiatkowski
From: Slawomir Mrozowicz Add Tx Hang detection due to an unhandled MDD Event. Previously, a malicious VF could disable the entire port causing TX to hang on the E610 card. Those events that caused PF to freeze were not detected as an MDD event and usually required a Tx Hang watchdog timer to cat

[Intel-wired-lan] [iwl-next v3 2/4] ixgbe: check for MDD events

2025-02-17 Thread Michal Swiatkowski
From: Don Skidmore When an event is detected it is logged and, for the time being, the queue is immediately re-enabled. This is due to the lack of an API to the hypervisor so it could deal with it as it chooses. Reviewed-by: Przemek Kitszel Reviewed-by: Jedrzej Jagielski Reviewed-by: Marcin S

[Intel-wired-lan] [iwl-next v3 0/4] ixgbe: support Malicious Driver Detection (MDD)

2025-02-17 Thread Michal Swiatkowski
Hi, This patchset is adding support for MDD (malicious driver detection) for ixgbe driver. It can catch the error on VF side and reset malicious VF. An MDD event can be triggered for example by sending from VF a TSO packet with segment number set to 0. Add checking for Tx hang in case of MDD is

[Intel-wired-lan] [PATCH iwl-next v2 1/4] igb: Link IRQs to NAPI instances

2025-02-17 Thread Kurt Kanzenbach
Link IRQs to NAPI instances via netdev-genl API. This allows users to query that information via netlink: |$ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ | --dump napi-get --json='{"ifindex": 2}' |[{'defer-hard-irqs': 0, | 'gro-flush-

[Intel-wired-lan] [PATCH iwl-next v2 4/4] igb: Get rid of spurious interrupts

2025-02-17 Thread Kurt Kanzenbach
When running the igc with XDP/ZC in busy polling mode with deferral of hard interrupts, interrupts still happen from time to time. That is caused by the igb task watchdog which triggers Rx interrupts periodically. That mechanism has been introduced to overcome skb/memory allocation failures [1]. S

[Intel-wired-lan] [PATCH iwl-next v2 3/4] igb: Add support for persistent NAPI config

2025-02-17 Thread Kurt Kanzenbach
Use netif_napi_add_config() to assign persistent per-NAPI config. This is useful for preserving NAPI settings when changing queue counts or for user space programs using SO_INCOMING_NAPI_ID. Signed-off-by: Kurt Kanzenbach --- drivers/net/ethernet/intel/igb/igb_main.c | 3 ++- 1 file changed, 2

[Intel-wired-lan] [PATCH iwl-next v2 2/4] igb: Link queues to NAPI instances

2025-02-17 Thread Kurt Kanzenbach
Link queues to NAPI instances via netdev-genl API. This is required to use XDP/ZC busy polling. See commit 5ef44b3cb43b ("xsk: Bring back busy polling support") for details. This also allows users to query the info with netlink: |$ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/n

[Intel-wired-lan] [PATCH iwl-next v2 0/4] igb: XDP/ZC follow up

2025-02-17 Thread Kurt Kanzenbach
This is a follow up for the igb XDP/ZC implementation. The first two patches link the IRQs and queues to NAPI instances. This is required to bring back the XDP/ZC busy polling support. The last patch removes undesired IRQs (injected via igb watchdog) while busy polling with napi_defer_hard_irqs

Re: [Intel-wired-lan] [PATCH iwl-next v4 5/9] igc: Add support for frame preemption verification

2025-02-17 Thread Simon Horman
On Mon, Feb 10, 2025 at 02:02:03AM -0500, Faizal Rahim wrote: ... > diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c > b/drivers/net/ethernet/intel/igc/igc_tsn.c ... > +bool igc_fpe_transmitted_smd_v(union igc_adv_tx_desc *tx_desc) > +{ > + u8 smd = FIELD_GET(IGC_TXD_POPTS_SMD_MASK, t

[Intel-wired-lan] [PATCH iwl-next] igc: Change Tx mode for MQPRIO offloading

2025-02-17 Thread Kurt Kanzenbach
The current MQPRIO offload implementation uses the legacy TSN Tx mode. In this mode the hardware uses four packet buffers and considers queue priorities. In order to harmonize the TAPRIO implementation with MQPRIO switch to the regular TSN Tx mode. In addition to the legacy mode, transmission is a

Re: [Intel-wired-lan] [PATCH iwl-net v2] idpf: check error for register_netdev() on init

2025-02-17 Thread Simon Horman
On Fri, Feb 14, 2025 at 09:18:16AM -0800, Emil Tantilov wrote: > Current init logic ignores the error code from register_netdev(), > which will cause WARN_ON() on attempt to unregister it, if there was one, > and there is no info for the user that the creation of the netdev failed. > > WARNING: CP