2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/net/ethernet/intel/i40e
Aleksandr Loktionov 07af482e64 i40e: add ability to reset VF for Tx and Rx MDD events
Implement "mdd-auto-reset-vf" priv-flag to handle Tx and Rx MDD events for VFs.
This flag is also used in other network adapters like ICE.

Usage:
- "on"  - The problematic VF will be automatically reset
	  if a malformed descriptor is detected.
- "off" - The problematic VF will be disabled.

In cases where a VF sends malformed packets classified as malicious, it can
cause the Tx queue to freeze, rendering it unusable for several minutes. When
an MDD event occurs, this new implementation allows for a graceful VF reset to
quickly restore operational state.

Currently, VF queues are disabled if an MDD event occurs. This patch adds the
ability to reset the VF if a Tx or Rx MDD event occurs. It also includes MDD
event logging throttling to avoid dmesg pollution and unifies the format of
Tx and Rx MDD messages.

Note: Standard message rate limiting functions like dev_info_ratelimited()
do not meet our requirements. Custom rate limiting is implemented,
please see the code for details.

Co-developed-by: Jan Sokolowski <jan.sokolowski@intel.com>
Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
Co-developed-by: Padraig J Connolly <padraig.j.connolly@intel.com>
Signed-off-by: Padraig J Connolly <padraig.j.connolly@intel.com>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Michal Schmidt <mschmidt@redhat.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://patch.msgid.link/20250106221929.956999-13-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-01-07 18:16:02 -08:00
..
i40e_adminq_cmd.h i40e: Include types.h to some headers 2024-01-18 09:52:52 -08:00
i40e_adminq.c i40e: Remove unused i40e_asq_send_command_v2 2025-01-06 13:31:48 -08:00
i40e_adminq.h i40e: fix: remove needless retries of NVM update 2024-07-11 17:31:52 -07:00
i40e_alloc.h i40e: Move memory allocation structures to i40e_alloc.h 2023-10-05 09:13:42 -07:00
i40e_client.c i40e: Add helper to access main VSI 2024-04-30 09:33:05 -07:00
i40e_common.c i40e: Deadcode profile code 2025-01-06 13:31:48 -08:00
i40e_dcb_nl.c i40e: Introduce and use macros for iterating VSIs and VEBs 2024-02-16 09:28:14 -08:00
i40e_dcb.c i40e: Remove unused i40e_dcb_hw_get_num_tc 2025-01-06 13:31:49 -08:00
i40e_dcb.h i40e: Remove unused i40e_dcb_hw_get_num_tc 2025-01-06 13:31:49 -08:00
i40e_ddp.c i40e: Add helper to access main VSI 2024-04-30 09:33:05 -07:00
i40e_debug.h i40e: Initialize hardware capabilities at single place 2023-11-14 20:05:44 -08:00
i40e_debugfs.c i40e: add ability to reset VF for Tx and Rx MDD events 2025-01-07 18:16:02 -08:00
i40e_devids.h
i40e_devlink.c i40e: Do not call devlink_port_type_clear() 2023-11-06 16:16:13 -08:00
i40e_devlink.h i40e: Add initial devlink support 2023-10-15 14:33:41 +01:00
i40e_diag.c
i40e_diag.h i40e: Include types.h to some headers 2024-01-18 09:52:52 -08:00
i40e_ethtool.c i40e: add ability to reset VF for Tx and Rx MDD events 2025-01-07 18:16:02 -08:00
i40e_hmc.c i40e: Remove circular header dependencies and fix headers 2023-10-05 09:18:09 -07:00
i40e_hmc.h i40e: Remove circular header dependencies and fix headers 2023-10-05 09:18:09 -07:00
i40e_io.h i40e: Split i40e_osdep.h 2023-10-05 09:13:43 -07:00
i40e_lan_hmc.c i40e: Remove circular header dependencies and fix headers 2023-10-05 09:18:09 -07:00
i40e_lan_hmc.h i40e: Remove circular header dependencies and fix headers 2023-10-05 09:18:09 -07:00
i40e_main.c i40e: add ability to reset VF for Tx and Rx MDD events 2025-01-07 18:16:02 -08:00
i40e_nvm.c i40e: avoid forward declarations in i40e_nvm.c 2024-03-29 08:58:44 -07:00
i40e_prototype.h i40e: Remove unused i40e_asq_send_command_v2 2025-01-06 13:31:48 -08:00
i40e_ptp.c i40e: Add helper to access main VSI 2024-04-30 09:33:05 -07:00
i40e_register.h i40e: Enforce software interrupt during busy-poll exit 2024-03-26 08:34:40 -07:00
i40e_trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
i40e_txrx_common.h i40e: Remove circular header dependencies and fix headers 2023-10-05 09:18:09 -07:00
i40e_txrx.c i40e: Add helper to access main VSI 2024-04-30 09:33:05 -07:00
i40e_txrx.h i40e: Refactor argument of i40e_detect_recover_hung() 2024-04-30 09:33:01 -07:00
i40e_type.h net: intel: introduce {, Intel} Ethernet common library 2024-04-24 11:06:25 -07:00
i40e_virtchnl_pf.c i40e: add ability to reset VF for Tx and Rx MDD events 2025-01-07 18:16:02 -08:00
i40e_virtchnl_pf.h i40e: add ability to reset VF for Tx and Rx MDD events 2025-01-07 18:16:02 -08:00
i40e_xsk.c xsk: make xsk_buff_add_frag() really add the frag via __xdp_buff_add_frag() 2024-12-19 19:51:14 -08:00
i40e_xsk.h i40e: Remove circular header dependencies and fix headers 2023-10-05 09:18:09 -07:00
i40e.h i40e: add ability to reset VF for Tx and Rx MDD events 2025-01-07 18:16:02 -08:00
Makefile net: intel: Use *-y instead of *-objs in Makefile 2024-06-10 19:52:44 -07:00