Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [intel-next PATCH 00/14] ice: refactor mailbox overflow detection
@ 2023-02-22 17:09 Jacob Keller
  2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 01/14] ice: re-order ice_mbx_reset_snapshot function Jacob Keller
                   ` (13 more replies)
  0 siblings, 14 replies; 29+ messages in thread
From: Jacob Keller @ 2023-02-22 17:09 UTC (permalink / raw)
  To: Intel Wired LAN; +Cc: Anthony Nguyen, Jesse Brandeburg

The primary motivation of this series is to cleanup and refactor the mailbox
overflow detection logic such that it will work with Scalable IOV. In
addition a few other minor cleanups are done while I was working on the
code in the area.

First, the mailbox overflow functions in ice_vf_mbx.c are refactored to
store the data per-VF as an embedded structure in struct ice_vf, rather than
stored separately as a fixed-size array which only works with Single Root
IOV. This reduces the overall memory footprint when only a handful of VFs
are used.

The overflow detection functions are also cleaned up to reduce the need for
multiple separate calls to determine when to report a VF as potentially
malicious.

Finally, the ice_is_malicious_vf function is cleaned up and moved into
ice_virtchnl.c since it is not Single Root IOV specific, and thus does not
belong in ice_sriov.c

I could probably have done this in fewer patches, but I split pieces out to
hopefully aid in reviewing the overall sequence of changes. This does cause
some additional thrash as it results in intermediate versions of the
refactor, but I think its worth it for making each step easier to
understand.

Jacob Keller (14):
  ice: re-order ice_mbx_reset_snapshot function
  ice: convert ice_mbx_clear_malvf to void and use WARN
  ice: track malicious VFs in new ice_mbx_vf_info structure
  ice: move VF overflow message count into struct ice_mbx_vf_info
  ice: remove ice_mbx_deinit_snapshot
  ice: merge ice_mbx_report_malvf with ice_mbx_vf_state_handler
  ice: initialize mailbox snapshot earlier in PF init
  ice: declare ice_vc_process_vf_msg in ice_virtchnl.h
  ice: always report VF overflowing mailbox even without PF VSI
  ice: remove unnecessary &array[0] and just use array
  ice: pass mbxdata to ice_is_malicious_vf()
  ice: print message if ice_mbx_vf_state_handler returns an error
  ice: move ice_is_malicious_vf() to ice_virtchnl.c
  ice: call ice_is_malicious_vf() from ice_vc_process_vf_msg()

 drivers/net/ethernet/intel/ice/ice_main.c     |  12 +-
 drivers/net/ethernet/intel/ice/ice_sriov.c    |  77 +-----
 drivers/net/ethernet/intel/ice/ice_sriov.h    |  14 -
 drivers/net/ethernet/intel/ice/ice_type.h     |  17 +-
 drivers/net/ethernet/intel/ice/ice_vf_lib.c   |  15 +-
 drivers/net/ethernet/intel/ice/ice_vf_lib.h   |   2 +-
 drivers/net/ethernet/intel/ice/ice_vf_mbx.c   | 251 ++++++------------
 drivers/net/ethernet/intel/ice/ice_vf_mbx.h   |  17 +-
 drivers/net/ethernet/intel/ice/ice_virtchnl.c |  49 +++-
 drivers/net/ethernet/intel/ice/ice_virtchnl.h |   8 +
 10 files changed, 165 insertions(+), 297 deletions(-)


base-commit: c6ce92e9dcb102b82599f9be908c3a9ad815d6dd
-- 
2.39.1.405.gd4c25cc71f83

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2023-03-10 13:19 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-22 17:09 [Intel-wired-lan] [intel-next PATCH 00/14] ice: refactor mailbox overflow detection Jacob Keller
2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 01/14] ice: re-order ice_mbx_reset_snapshot function Jacob Keller
2023-03-10 13:15   ` Szlosek, Marek
2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 02/14] ice: convert ice_mbx_clear_malvf to void and use WARN Jacob Keller
2023-03-10 13:15   ` Szlosek, Marek
2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 03/14] ice: track malicious VFs in new ice_mbx_vf_info structure Jacob Keller
2023-03-10 13:15   ` Szlosek, Marek
2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 04/14] ice: move VF overflow message count into struct ice_mbx_vf_info Jacob Keller
2023-03-10 13:16   ` Szlosek, Marek
2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 05/14] ice: remove ice_mbx_deinit_snapshot Jacob Keller
2023-03-10 13:16   ` Szlosek, Marek
2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 06/14] ice: merge ice_mbx_report_malvf with ice_mbx_vf_state_handler Jacob Keller
2023-03-10 13:17   ` Szlosek, Marek
2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 07/14] ice: initialize mailbox snapshot earlier in PF init Jacob Keller
2023-03-10 13:17   ` Szlosek, Marek
2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 08/14] ice: declare ice_vc_process_vf_msg in ice_virtchnl.h Jacob Keller
2023-03-10 13:17   ` Szlosek, Marek
2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 09/14] ice: always report VF overflowing mailbox even without PF VSI Jacob Keller
2023-03-10 13:17   ` Szlosek, Marek
2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 10/14] ice: remove unnecessary &array[0] and just use array Jacob Keller
2023-03-10 13:18   ` Szlosek, Marek
2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 11/14] ice: pass mbxdata to ice_is_malicious_vf() Jacob Keller
2023-03-10 13:18   ` Szlosek, Marek
2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 12/14] ice: print message if ice_mbx_vf_state_handler returns an error Jacob Keller
2023-03-10 13:18   ` Szlosek, Marek
2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 13/14] ice: move ice_is_malicious_vf() to ice_virtchnl.c Jacob Keller
2023-03-10 13:19   ` Szlosek, Marek
2023-02-22 17:09 ` [Intel-wired-lan] [intel-next PATCH 14/14] ice: call ice_is_malicious_vf() from ice_vc_process_vf_msg() Jacob Keller
2023-03-10 13:19   ` Szlosek, Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox