ice: convert VF storage to hash table
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest11 patches 0 repliesNew
- v111 patches 0 repliesSuperseded
Changes in v2 from the cover letter
* Add missing ice_put_vf in ice_vc_process_vf_msg, fixing memory leak of VF
* Fix a few checkpatch.pl complaints reported by NIPA
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | ice: refactor unwind cleanup in eswitch modedrivers/ drivers/ | +54 | 1 reply | |
| 2/11 | ice: store VF pointer instead of VF IDdrivers/ drivers/ drivers/ +7 more | +142 | 1 reply | |
| 3/11 | ice: pass num_vfs to ice_set_per_vf_res()drivers/ | +26 | 1 reply | |
| 4/11 | ice: move clear_malvf call in ice_free_vfsdrivers/ | +6 | 1 reply | |
| 5/11 | ice: move VFLR acknowledge during ice_free_vfsdrivers/ | +8 | 1 reply | |
| 6/11 | ice: remove checks in ice_vc_send_msg_to_vfdrivers/ | +3 | 1 reply | |
| 7/11 | ice: use ice_for_each_vf for iteration during removaldrivers/ | +4 | 1 reply | |
| 8/11 | ice: convert ice_for_each_vf to include VF entry iteratordrivers/ drivers/ drivers/ +5 more | +162 | 1 reply | |
| 9/11 | ice: factor VF variables to separate structuredrivers/ drivers/ drivers/ +4 more | +83 | 1 reply | |
| 10/11 | ice: introduce VF accessor functionsdrivers/ drivers/ drivers/ +2 more | +116 | 1 reply | |
| 11/11 | ice: convert VF storage to hash table with krefs and RCUdrivers/ drivers/ drivers/ +5 more | +364 | 1 reply |
Reviews trailers per patch
None of the 11 patches has a Reviewed-by or Acked-by.
| Patch | Sandeep Penigalapati | Konrad Jankowski |
|---|---|---|
| 1/11 | T-b | |
| 2/11 | T-b | |
| 3/11 | T-b | |
| 4/11 | T-b | |
| 5/11 | T-b | |
| 6/11 | T-b | |
| 7/11 | T-b | |
| 8/11 | T-b | |
| 9/11 | T-b | |
| 10/11 | T-b | |
| 11/11 | 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] [net-next PATCH v2 00/11] ice: convert VF storage to hash table
This series refactors the ice networking driver VF storage from a simple static array to a hash table. It also introduces krefs and proper locking and protection to prevent common use-after-free and concurrency issues.
There are two motivations for this work. First is to make the ice driver more resilient by preventing a whole class of use-after-free bugs that can occur around concurrent access to VF structures while removing VFs.
The second is to prepare the ice driver for future virtualization work to support Scalable IOV, an alternative VF implementation compared to Single Root IOV. The new VF implementation will allow for more dynamic VF creation and removal, necessitating a more robust implementation for VF storage that can't rely on the existing mechanisms to prevent concurrent access violations.
The first few patches are cleanup and preparatory work needed to make the conversion to the hash table safe. Following this preparatory work is a patch to migrate the VF structures and variables to a new sub-structure for code clarity. Next introduce new interface functions to abstract the VF storage. Finally, the driver is actually converted to the hash table and kref implementation.
Changes since v1:
* Add missing ice_put_vf in ice_vc_process_vf_msg, fixing memory leak of VF
* Fix a few checkpatch.pl complaints reported by NIPA
Jacob Keller (11):
ice: refactor unwind cleanup in eswitch mode
ice: store VF pointer instead of VF ID
ice: pass num_vfs to ice_set_per_vf_res()
ice: move clear_malvf call in ice_free_vfs
ice: move VFLR acknowledge during ice_free_vfs
ice: remove checks in ice_vc_send_msg_to_vf
ice: use ice_for_each_vf for iteration during removal
ice: convert ice_for_each_vf to include VF entry iterator
ice: factor VF variables to separate structure
ice: introduce VF accessor functions
ice: convert VF storage to hash table with krefs and RCU
drivers/net/ethernet/intel/ice/ice.h | 13 +- drivers/net/ethernet/intel/ice/ice_base.c | 4 +- drivers/net/ethernet/intel/ice/ice_eswitch.c | 161 ++-- drivers/net/ethernet/intel/ice/ice_ethtool.c | 20 +- drivers/net/ethernet/intel/ice/ice_lib.c | 203 +++-- drivers/net/ethernet/intel/ice/ice_lib.h | 3 +- drivers/net/ethernet/intel/ice/ice_main.c | 64 +- drivers/net/ethernet/intel/ice/ice_repr.c | 70 +- drivers/net/ethernet/intel/ice/ice_txrx.c | 2 +- .../ethernet/intel/ice/ice_vf_vsi_vlan_ops.c | 19 +- .../ethernet/intel/ice/ice_virtchnl_fdir.c | 13 +- .../net/ethernet/intel/ice/ice_virtchnl_pf.c | 784 +++++++++++------- .../net/ethernet/intel/ice/ice_virtchnl_pf.h | 83 +- 13 files changed, 879 insertions(+), 560 deletions(-)
base-commit: 477606a501d0705cb1bb86fe7aa86f553861ae7f
Signature · 1 line
2.35.1.129.gb80121027d12