net/smc: support max links per lgr negotiation in clc handshake
authorGuangguan Wang <guangguan.wang@linux.alibaba.com>
Thu, 17 Aug 2023 13:20:31 +0000 (21:20 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Aug 2023 11:46:53 +0000 (12:46 +0100)
commit69b888e3bb4b186ec597a368bc8348e0e4bc6e65
tree061c699eeeaaaacc9ee06b8311edd61df9e87cc0
parent7f0620b9940b3b4c5d83a815d46b97ac0b88a595
net/smc: support max links per lgr negotiation in clc handshake

Support max links per lgr negotiation in clc handshake for SMCR v2.1,
which is one of smc v2.1 features. Server makes decision for the final
value of max links based on the client preferred max links and
self-preferred max links. Here use the minimum value of the client
preferred max links and server preferred max links.

Client                                       Server
     Proposal(max links(client preferred))
     -------------------------------------->

     Accept(max links(accepted value))
accepted value=min(client preferred, server preferred)
     <-------------------------------------

      Confirm(max links(accepted value))
     ------------------------------------->

Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
Reviewed-by: Tony Lu <tonylu@linux.alibaba.com>
Reviewed-by: Jan Karcher <jaka@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/af_smc.c
net/smc/smc_clc.c
net/smc/smc_clc.h
net/smc/smc_core.c
net/smc/smc_core.h
net/smc/smc_llc.c