[Intel-wired-lan] [PATCH iwl-next v5] i40e: add ability to reset VF for Tx and Rx MDD events

Michal Schmidt mschmidt at redhat.com
Thu Dec 12 13:11:50 UTC 2024


On Fri, Dec 6, 2024 at 4:41 PM Romanowski, Rafal
<rafal.romanowski at intel.com> wrote:
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> on behalf of Aleksandr Loktionov <aleksandr.loktionov at intel.com>
> Sent: Friday, November 15, 2024 8:42 PM
> To: intel-wired-lan at lists.osuosl.org <intel-wired-lan at lists.osuosl.org>; Nguyen, Anthony L <anthony.l.nguyen at intel.com>; Loktionov, Aleksandr <aleksandr.loktionov at intel.com>
> Cc: netdev at vger.kernel.org <netdev at vger.kernel.org>; Sokolowski, Jan <jan.sokolowski at intel.com>; Connolly, Padraig J <padraig.j.connolly at intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next v5] 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 at intel.com>
> Signed-off-by: Jan Sokolowski <jan.sokolowski at intel.com>
> Co-developed-by: Padraig J Connolly <padraig.j.connolly at intel.com>
> Signed-off-by: Padraig J Connolly <padraig.j.connolly at intel.com>
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
> ---
> v4->v5 + documentation - 2nd clear_bit(__I40E_MDD_EVENT_PENDING) * rate limit
> v3->v4 refactor two helper functions into one
> v2->v3 fix compilation issue
> v1->v2 fix compilation issue
> ---
>  .../device_drivers/ethernet/intel/i40e.rst    |  12 ++
>  drivers/net/ethernet/intel/i40e/i40e.h        |   4 +-
>  .../net/ethernet/intel/i40e/i40e_debugfs.c    |   2 +-
>  .../net/ethernet/intel/i40e/i40e_ethtool.c    |   2 +
>  drivers/net/ethernet/intel/i40e/i40e_main.c   | 107 +++++++++++++++---
>  .../ethernet/intel/i40e/i40e_virtchnl_pf.c    |   2 +-
>  .../ethernet/intel/i40e/i40e_virtchnl_pf.h    |  11 +-
>  7 files changed, 123 insertions(+), 17 deletions(-)
>
> diff --git a/Documentation/networking/device_drivers/ethernet/intel/i40e.rst b/Documentation/networking/device_drivers/ethernet/intel/i40e.rst
> index 4fbaa1a..53d9d58 100644
> --- a/Documentation/networking/device_drivers/ethernet/intel/i40e.rst
> +++ b/Documentation/networking/device_drivers/ethernet/intel/i40e.rst
> @@ -299,6 +299,18 @@ Use ethtool to view and set link-down-on-close, as follows::
>
>
> Tested-by: Rafal Romanowski <rafal.romanowski at intel.com>

Hi Tony,

Did your tools miss this "Tested-by" from Rafal? Maybe because of the
weird quoting in Rafal's email?
I see you refreshed dev-queue yesterday, but the Tested-by is not there.

Michal



More information about the Intel-wired-lan mailing list