ice: refactor mailbox overflow detection
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest14 patches 14 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | ice: re-order ice_mbx_reset_snapshot functiondrivers/ | +24 | 1 reply | |
| 2/14 | ice: convert ice_mbx_clear_malvf to void and use WARNdrivers/ drivers/ drivers/ +1 more | +14 | 1 reply | |
| 3/14 | ice: track malicious VFs in new ice_mbx_vf_info structuredrivers/ drivers/ drivers/ +3 more | +53 | 1 reply | |
| 4/14 | ice: move VF overflow message count into struct ice_mbx_vf_infodrivers/ drivers/ drivers/ +2 more | +69 | 1 reply | |
| 5/14 | ice: remove ice_mbx_deinit_snapshotdrivers/ drivers/ drivers/ | +1 | 1 reply | |
| 6/14 | ice: merge ice_mbx_report_malvf with ice_mbx_vf_state_handlerdrivers/ drivers/ drivers/ | +28 | 1 reply | |
| 7/14 | ice: initialize mailbox snapshot earlier in PF initdrivers/ drivers/ drivers/ | +5 | 1 reply | |
| 8/14 | ice: declare ice_vc_process_vf_msg in ice_virtchnl.hdrivers/ drivers/ | +6 | 1 reply | |
| 9/14 | ice: always report VF overflowing mailbox even without PF VSIdrivers/ | +4 | 1 reply | |
| 10/14 | ice: remove unnecessary &array[0] and just use arraydrivers/ | +1 | 1 reply | |
| 11/14 | ice: pass mbxdata to ice_is_malicious_vf()drivers/ drivers/ drivers/ | +14 | 1 reply | |
| 12/14 | ice: print message if ice_mbx_vf_state_handler returns an errordrivers/ | +2 | 1 reply | |
| 13/14 | ice: move ice_is_malicious_vf() to ice_virtchnl.cdrivers/ drivers/ drivers/ +1 more | +56 | 1 reply | |
| 14/14 | ice: call ice_is_malicious_vf() from ice_vc_process_vf_msg()drivers/ drivers/ drivers/ | +24 | 1 reply |
Reviews trailers per patch
All 14 patches have a Reviewed-by or Acked-by.
| Patch | Michal Swiatkowski | Marek Szlosek |
|---|---|---|
| 1/14 | R-b | T-b |
| 2/14 | R-b | T-b |
| 3/14 | R-b | T-b |
| 4/14 | R-b | T-b |
| 5/14 | R-b | T-b |
| 6/14 | R-b | T-b |
| 7/14 | R-b | T-b |
| 8/14 | R-b | T-b |
| 9/14 | R-b | T-b |
| 10/14 | R-b | T-b |
| 11/14 | R-b | T-b |
| 12/14 | R-b | T-b |
| 13/14 | R-b | T-b |
| 14/14 | R-b | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Intel-wired-lan] [intel-next PATCH 00/14] ice: refactor mailbox overflow detection
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
Signature · 6 lines
2.39.1.405.gd4c25cc71f83 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan