Skip to content

implement devlink reload in ice

Michal Swiatkowski intel-wired-lan 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 8 repliesIn review
  2. v210 patches 1 replySuperseded
  3. v110 patches 5 repliesSuperseded

Changes in v3 from the cover letter

* there was another crash, this time in rmmod (apologize for that) -> cleanup remove path
* KASAN found that there was memory leak because calling setting cpu rx map twice, fix it by calling it only in VSI config path

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10ice: move RDMA init to ice_idc.cdrivers/net/ethernet/intel/ice/ice.h drivers/net/ethernet/intel/ice/ice_idc.c drivers/net/ethernet/intel/ice/ice_main.c+57 -250 replies
2/10ice: alloc id for RDMA using xa_arraydrivers/net/ethernet/intel/ice/ice_idc.c+6 -50 replies
3/10ice: cleanup in VSI config/deconfig codedrivers/net/ethernet/intel/ice/ice.h drivers/net/ethernet/intel/ice/ice_ethtool.c drivers/net/ethernet/intel/ice/ice_lib.c +2 more+26 -441 reply
4/10ice: split ice_vsi_setup into smaller functionsdrivers/net/ethernet/intel/ice/ice_lib.c drivers/net/ethernet/intel/ice/ice_lib.h drivers/net/ethernet/intel/ice/ice_main.c +1 more+469 -5361 reply
5/10ice: stop hard coding the ICE_VSI_CTRL locationdrivers/net/ethernet/intel/ice/ice_lib.c+15 -191 reply
6/10ice: split probe into smaller functionsdrivers/net/ethernet/intel/ice/ice.h drivers/net/ethernet/intel/ice/ice_common.c drivers/net/ethernet/intel/ice/ice_main.c+559 -3861 reply
7/10ice: sync netdev filters after clearing VSIdrivers/net/ethernet/intel/ice/ice_fltr.c+5 -01 reply
8/10ice: move VSI delete outside deconfigdrivers/net/ethernet/intel/ice/ice_lib.c drivers/net/ethernet/intel/ice/ice_lib.h drivers/net/ethernet/intel/ice/ice_main.c+14 -201 reply
9/10ice: update VSI instead of init in some casedrivers/net/ethernet/intel/ice/ice_lib.c drivers/net/ethernet/intel/ice/ice_lib.h drivers/net/ethernet/intel/ice/ice_main.c+13 -91 reply
10/10ice: implement devlink reinit actiondrivers/net/ethernet/intel/ice/ice_devlink.c+81 -221 reply

Reviews trailers per patch

1 of 10 patches has a Reviewed-by or Acked-by.

PatchDave ErtmanGurucharan G
1/10A-b
2/10
3/10T-b
4/10T-b
5/10T-b
6/10T-b
7/10T-b
8/10T-b
9/10T-b
10/10T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Intel-wired-lan] [PATCH net-next v3 00/10] implement devlink reload in ice

Hi,

This is a part of changes done in patchset [0]. Resource management is kind of controversial part, so I split it into two patchsets.

It is the first one, covering refactor and implement reload API call. The refactor will unblock some of the patches needed by SIOV or subfunction.

Most of this patchset is about implementing driver reload mechanism. Part of code from probe and rebuild is used to not duplicate code. To allow this reuse probe and rebuild path are split into smaller functions.

Patch "ice: split ice_vsi_setup into smaller functions" changes boolean variable in function call to integer and adds define for it. Instead of having the function called with true/false now it can be called with readable defines ICE_VSI_FLAG_INIT or ICE_VSI_FLAG_NO_INIT. It was suggested by Jacob Keller and probably this mechanism will be implemented across ice driver in follow up patchset.

Previously the code was reviewed here [0].

[0] https://lore.kernel.org/netdev/Y3ckRWtAtZU1BdXm@unreal/T/#m3bb8feba0a62f9b4cd54cd94917b7e2143fc2ecd

I did basic tests:
* devlink reinit without a traffic
* devlink reinit when there is a traffic
* devlink reinit when some features are on (like switchdev, VFs etc.) -> reinit is blocked
* check KASAN output while do the tests

v2 --> v3:
* there was another crash, this time in rmmod (apologize for that) -> cleanup remove path
* KASAN found that there was memory leak because calling setting cpu rx map twice, fix it by calling it only in VSI config path

v1 --> v2:
* fix crash caused by merger error with VSI statistic

Jacob Keller (1):
ice: stop hard coding the ICE_VSI_CTRL location

Michal Swiatkowski (9):
ice: move RDMA init to ice_idc.c
ice: alloc id for RDMA using xa_array
ice: cleanup in VSI config/deconfig code
ice: split ice_vsi_setup into smaller functions
ice: split probe into smaller functions
ice: sync netdev filters after clearing VSI
ice: move VSI delete outside deconfig
ice: update VSI instead of init in some case
ice: implement devlink reinit action

 drivers/net/ethernet/intel/ice/ice.h         |    6 +-
 drivers/net/ethernet/intel/ice/ice_common.c  |   11 +-
 drivers/net/ethernet/intel/ice/ice_devlink.c |  103 +-
 drivers/net/ethernet/intel/ice/ice_ethtool.c |    2 +-
 drivers/net/ethernet/intel/ice/ice_fltr.c    |    5 +
 drivers/net/ethernet/intel/ice/ice_idc.c     |   53 +-
 drivers/net/ethernet/intel/ice/ice_lib.c     | 1047 ++++++++---------
 drivers/net/ethernet/intel/ice/ice_lib.h     |    8 +-
 drivers/net/ethernet/intel/ice/ice_main.c    | 1090 ++++++++++--------
 drivers/net/ethernet/intel/ice/ice_vf_lib.c  |    2 +-
 10 files changed, 1253 insertions(+), 1074 deletions(-)
Signature · 6 lines
2.36.1

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan