mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net/smc: provide fallback reason code
Remember the fallback reason code and the peer diagnosis code for smc sockets, and provide them in smc_diag.c to the netlink interface. And add more detailed reason codes. Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7005ada68d
commit
603cc14984
6 changed files with 61 additions and 29 deletions
|
@ -334,7 +334,11 @@ int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen,
|
|||
goto out;
|
||||
}
|
||||
if (clcm->type == SMC_CLC_DECLINE) {
|
||||
reason_code = SMC_CLC_DECL_REPLY;
|
||||
struct smc_clc_msg_decline *dclc;
|
||||
|
||||
dclc = (struct smc_clc_msg_decline *)clcm;
|
||||
reason_code = SMC_CLC_DECL_PEERDECL;
|
||||
smc->peer_diagnosis = ntohl(dclc->peer_diagnosis);
|
||||
if (((struct smc_clc_msg_decline *)buf)->hdr.flag) {
|
||||
smc->conn.lgr->sync_err = 1;
|
||||
smc_lgr_terminate(smc->conn.lgr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue