net/smc: support max connections per lgr negotiation
authorGuangguan Wang <guangguan.wang@linux.alibaba.com>
Thu, 17 Aug 2023 13:20:30 +0000 (21:20 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Aug 2023 11:46:52 +0000 (12:46 +0100)
commit7f0620b9940b3b4c5d83a815d46b97ac0b88a595
treeb70e4d4425270bbeff30169717cfc966e3828adf
parent6ac1e6563f5915cd38b6bc6a8b26964b2252f751
net/smc: support max connections per lgr negotiation

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

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

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

     Confirm(max conns(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