@@ -418,24 +418,25 @@ smc_clc_msg_decl_valid(struct smc_clc_msg_decline *dclc)
418
418
return true;
419
419
}
420
420
421
- static int smc_clc_fill_fce (struct smc_clc_first_contact_ext_v2x * fce ,
422
- struct smc_init_info * ini )
421
+ static int smc_clc_fill_fce_v2x (struct smc_clc_first_contact_ext_v2x * fce_v2x ,
422
+ struct smc_init_info * ini )
423
423
{
424
- int ret = sizeof (* fce );
424
+ int ret = sizeof (* fce_v2x );
425
425
426
- memset (fce , 0 , sizeof (* fce ));
427
- fce -> fce_v2_base .os_type = SMC_CLC_OS_LINUX ;
428
- fce -> fce_v2_base .release = ini -> release_nr ;
429
- memcpy (fce -> fce_v2_base .hostname , smc_hostname , sizeof (smc_hostname ));
426
+ memset (fce_v2x , 0 , sizeof (* fce_v2x ));
427
+ fce_v2x -> fce_v2_base .os_type = SMC_CLC_OS_LINUX ;
428
+ fce_v2x -> fce_v2_base .release = ini -> release_nr ;
429
+ memcpy (fce_v2x -> fce_v2_base .hostname ,
430
+ smc_hostname , sizeof (smc_hostname ));
430
431
if (ini -> is_smcd && ini -> release_nr < SMC_RELEASE_1 ) {
431
432
ret = sizeof (struct smc_clc_first_contact_ext );
432
433
goto out ;
433
434
}
434
435
435
436
if (ini -> release_nr >= SMC_RELEASE_1 ) {
436
437
if (!ini -> is_smcd ) {
437
- fce -> max_conns = ini -> max_conns ;
438
- fce -> max_links = ini -> max_links ;
438
+ fce_v2x -> max_conns = ini -> max_conns ;
439
+ fce_v2x -> max_links = ini -> max_links ;
439
440
}
440
441
}
441
442
@@ -1003,8 +1004,8 @@ static int smc_clc_send_confirm_accept(struct smc_sock *smc,
1003
1004
int first_contact , u8 version ,
1004
1005
u8 * eid , struct smc_init_info * ini )
1005
1006
{
1007
+ struct smc_clc_first_contact_ext_v2x fce_v2x ;
1006
1008
struct smc_connection * conn = & smc -> conn ;
1007
- struct smc_clc_first_contact_ext_v2x fce ;
1008
1009
struct smcd_dev * smcd = conn -> lgr -> smcd ;
1009
1010
struct smc_clc_msg_accept_confirm * clc ;
1010
1011
struct smc_clc_fce_gid_ext gle ;
@@ -1036,7 +1037,7 @@ static int smc_clc_send_confirm_accept(struct smc_sock *smc,
1036
1037
memcpy (clc_v2 -> d1 .eid , eid , SMC_MAX_EID_LEN );
1037
1038
len = SMCD_CLC_ACCEPT_CONFIRM_LEN_V2 ;
1038
1039
if (first_contact ) {
1039
- fce_len = smc_clc_fill_fce ( & fce , ini );
1040
+ fce_len = smc_clc_fill_fce_v2x ( & fce_v2x , ini );
1040
1041
len += fce_len ;
1041
1042
}
1042
1043
clc_v2 -> hdr .length = htons (len );
@@ -1082,9 +1083,10 @@ static int smc_clc_send_confirm_accept(struct smc_sock *smc,
1082
1083
memcpy (clc_v2 -> r1 .eid , eid , SMC_MAX_EID_LEN );
1083
1084
len = SMCR_CLC_ACCEPT_CONFIRM_LEN_V2 ;
1084
1085
if (first_contact ) {
1085
- fce_len = smc_clc_fill_fce ( & fce , ini );
1086
+ fce_len = smc_clc_fill_fce_v2x ( & fce_v2x , ini );
1086
1087
len += fce_len ;
1087
- fce .fce_v2_base .v2_direct = !link -> lgr -> uses_gateway ;
1088
+ fce_v2x .fce_v2_base .v2_direct =
1089
+ !link -> lgr -> uses_gateway ;
1088
1090
if (clc -> hdr .type == SMC_CLC_CONFIRM ) {
1089
1091
memset (& gle , 0 , sizeof (gle ));
1090
1092
gle .gid_cnt = ini -> smcrv2 .gidlist .len ;
@@ -1111,7 +1113,7 @@ static int smc_clc_send_confirm_accept(struct smc_sock *smc,
1111
1113
SMCR_CLC_ACCEPT_CONFIRM_LEN ) -
1112
1114
sizeof (trl );
1113
1115
if (version > SMC_V1 && first_contact ) {
1114
- vec [i ].iov_base = & fce ;
1116
+ vec [i ].iov_base = & fce_v2x ;
1115
1117
vec [i ++ ].iov_len = fce_len ;
1116
1118
if (!conn -> lgr -> is_smcd ) {
1117
1119
if (clc -> hdr .type == SMC_CLC_CONFIRM ) {
0 commit comments