netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] net/smc: correct the reason code in smc_listen_find_device when fallback
@ 2023-10-17 12:42 Guangguan Wang
  2023-10-17 12:42 ` [PATCH net v2 1/2] net/smc: change function name from smc_find_ism_store_rc to smc_find_device_store_rc Guangguan Wang
  2023-10-17 12:42 ` [PATCH net v2 2/2] net/smc: correct the reason code in smc_listen_find_device when fallback Guangguan Wang
  0 siblings, 2 replies; 11+ messages in thread
From: Guangguan Wang @ 2023-10-17 12:42 UTC (permalink / raw)
  To: kgraul, wenjia, jaka, davem, edumazet, kuba, pabeni
  Cc: tonylu, alibuda, guwen, linux-s390, netdev, linux-kernel

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(-)

-- 
2.24.3 (Apple Git-128)


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

end of thread, other threads:[~2023-10-23 11:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-17 12:42 [PATCH net v2 0/2] net/smc: correct the reason code in smc_listen_find_device when fallback Guangguan Wang
2023-10-17 12:42 ` [PATCH net v2 1/2] net/smc: change function name from smc_find_ism_store_rc to smc_find_device_store_rc Guangguan Wang
2023-10-18  3:18   ` Dust Li
2023-10-18 19:44   ` Wenjia Zhang
2023-10-18 19:47   ` Wenjia Zhang
2023-10-17 12:42 ` [PATCH net v2 2/2] net/smc: correct the reason code in smc_listen_find_device when fallback Guangguan Wang
2023-10-18  7:01   ` Dust Li
2023-10-18  8:35     ` Guangguan Wang
2023-10-18 19:43       ` Wenjia Zhang
2023-10-23 11:09         ` Guangguan Wang
2023-10-18 18:00   ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).