Skip to content

net/smc: correct the reason code in smc_listen_find_device when fallback

Guangguan Wang linux-s390 lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 8 repliesIn review
  2. v11 patch 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net/smc: change function name from smc_find_ism_store_rc to smc_find_device_store_rcnet/smc/af_smc.c+8 -83 replies
2/2net/smc: correct the reason code in smc_listen_find_device when fallbacknet/smc/af_smc.c+3 -95 replies

Reviews trailers per patch

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

PatchDust LiWenjia Zhang
1/2R-b R-b
2/2

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

Read the v2 thread

Cover letter [PATCH net v2 0/2] net/smc: correct the reason code in smc_listen_find_device when fallback

The function smc_find_ism_store_rc is not only used for ism, so it is reasonable to change the function name to smc_find_device_store_rc.

The ini->rc is used to store the last error happened when finding usable ism or rdma device in smc_listen_find_device, and is set by calling smc_ find_device_store_rc. Once the ini->rc is assigned to an none-zero value, the value can not be overwritten anymore. So the ini-rc should be set to the error reason only when an error actually occurs.

When finding ISM/RDMA devices, device not found is not a real error, as not all machine have ISM/RDMA devices. Failures after device found, when initializing device or when initializing connection, is real errors, and should be store in ini->rc.

SMC_CLC_DECL_DIFFPREFIX also is not a real error, as for SMC-RV2, it is not require same prefix.

Guangguan Wang (2):
net/smc: change function name from smc_find_ism_store_rc to
smc_find_device_store_rc
net/smc: correct the reason code in smc_listen_find_device when
fallback

 net/smc/af_smc.c | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)
Signature · 1 line
2.24.3 (Apple Git-128)