@@ -418,24 +418,25 @@ smc_clc_msg_decl_valid(struct smc_clc_msg_decline *dclc)
418418 return true;
419419}
420420
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 )
423423{
424- int ret = sizeof (* fce );
424+ int ret = sizeof (* fce_v2x );
425425
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 ));
430431 if (ini -> is_smcd && ini -> release_nr < SMC_RELEASE_1 ) {
431432 ret = sizeof (struct smc_clc_first_contact_ext );
432433 goto out ;
433434 }
434435
435436 if (ini -> release_nr >= SMC_RELEASE_1 ) {
436437 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 ;
439440 }
440441 }
441442
@@ -1003,8 +1004,8 @@ static int smc_clc_send_confirm_accept(struct smc_sock *smc,
10031004 int first_contact , u8 version ,
10041005 u8 * eid , struct smc_init_info * ini )
10051006{
1007+ struct smc_clc_first_contact_ext_v2x fce_v2x ;
10061008 struct smc_connection * conn = & smc -> conn ;
1007- struct smc_clc_first_contact_ext_v2x fce ;
10081009 struct smcd_dev * smcd = conn -> lgr -> smcd ;
10091010 struct smc_clc_msg_accept_confirm * clc ;
10101011 struct smc_clc_fce_gid_ext gle ;
@@ -1036,7 +1037,7 @@ static int smc_clc_send_confirm_accept(struct smc_sock *smc,
10361037 memcpy (clc_v2 -> d1 .eid , eid , SMC_MAX_EID_LEN );
10371038 len = SMCD_CLC_ACCEPT_CONFIRM_LEN_V2 ;
10381039 if (first_contact ) {
1039- fce_len = smc_clc_fill_fce ( & fce , ini );
1040+ fce_len = smc_clc_fill_fce_v2x ( & fce_v2x , ini );
10401041 len += fce_len ;
10411042 }
10421043 clc_v2 -> hdr .length = htons (len );
@@ -1082,9 +1083,10 @@ static int smc_clc_send_confirm_accept(struct smc_sock *smc,
10821083 memcpy (clc_v2 -> r1 .eid , eid , SMC_MAX_EID_LEN );
10831084 len = SMCR_CLC_ACCEPT_CONFIRM_LEN_V2 ;
10841085 if (first_contact ) {
1085- fce_len = smc_clc_fill_fce ( & fce , ini );
1086+ fce_len = smc_clc_fill_fce_v2x ( & fce_v2x , ini );
10861087 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 ;
10881090 if (clc -> hdr .type == SMC_CLC_CONFIRM ) {
10891091 memset (& gle , 0 , sizeof (gle ));
10901092 gle .gid_cnt = ini -> smcrv2 .gidlist .len ;
@@ -1111,7 +1113,7 @@ static int smc_clc_send_confirm_accept(struct smc_sock *smc,
11111113 SMCR_CLC_ACCEPT_CONFIRM_LEN ) -
11121114 sizeof (trl );
11131115 if (version > SMC_V1 && first_contact ) {
1114- vec [i ].iov_base = & fce ;
1116+ vec [i ].iov_base = & fce_v2x ;
11151117 vec [i ++ ].iov_len = fce_len ;
11161118 if (!conn -> lgr -> is_smcd ) {
11171119 if (clc -> hdr .type == SMC_CLC_CONFIRM ) {
0 commit comments