[Intel-wired-lan] [intel-next PATCH 03/14] ice: track malicious VFs in new ice_mbx_vf_info structure
Szlosek, Marek
marek.szlosek at intel.com
Fri Mar 10 13:15:52 UTC 2023
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Jacob Keller
> Sent: środa, 22 lutego 2023 18:09
> To: Intel Wired LAN <intel-wired-lan at lists.osuosl.org>
> Cc: Nguyen, Anthony L <anthony.l.nguyen at intel.com>; Brandeburg, Jesse
> <jesse.brandeburg at intel.com>
> Subject: [Intel-wired-lan] [intel-next PATCH 03/14] ice: track malicious VFs in
> new ice_mbx_vf_info structure
>
> Currently the PF tracks malicious VFs in a malvfs bitmap which is used by the
> ice_mbx_clear_malvf and ice_mbx_report_malvf functions. This bitmap is
> used to ensure that we only report a VF as malicious once rather than
> continuously spamming the event log.
>
> This mechanism of storage for the malicious indication works well enough for
> SR-IOV. However, it will not work with Scalable IOV. This is because Scalable
> IOV VFs can be allocated dynamically and might change VF ID when their
> underlying VSI changes.
>
> To support this, the mailbox overflow logic will need to be refactored.
> First, introduce a new ice_mbx_vf_info structure which will be used to store
> data about a VF. Embed this structure in the struct ice_vf, and ensure it gets
> initialized when a new VF is created.
>
> For now this only stores the malicious indicator bit. Pass a pointer to the VF's
> mbx_info structure instead of using a bitmap to keep track of these bits.
>
> A future change will extend this structure and the rest of the logic associated
> with the overflow detection.
>
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski at linux.intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_sriov.c | 7 +-
> drivers/net/ethernet/intel/ice/ice_type.h | 7 ++
> drivers/net/ethernet/intel/ice/ice_vf_lib.c | 10 +--
> drivers/net/ethernet/intel/ice/ice_vf_lib.h | 2 +-
> drivers/net/ethernet/intel/ice/ice_vf_mbx.c | 71 +++++++++------------
> drivers/net/ethernet/intel/ice/ice_vf_mbx.h | 9 +--
> 6 files changed, 53 insertions(+), 53 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_sriov.c
> b/drivers/net/ethernet/intel/ice/ice_sriov.c
> index 7107c279752a..44b94276df91 100644
> --- a/drivers/net/ethernet/intel/ice/ice_sriov.c
> +++ b/drivers/net/ethernet/intel/ice/ice_sriov.c
Tested-by: Marek Szlosek <marek.szlosek at intel.com>
More information about the Intel-wired-lan
mailing list