Skip to content

Commit b27696c

Browse files
Wen Gukuba-moo
authored andcommitted
net/smc: change the term virtual ISM to Emulated-ISM
According to latest release of SMCv2.1[1], the term 'virtual ISM' has been changed to 'Emulated-ISM' to avoid the ambiguity of the word 'virtual' in different contexts. So the names or comments in the code need be modified accordingly. [1] https://www.ibm.com/support/pages/node/7112343 Signed-off-by: Wen Gu <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Wenjia Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent fef599f commit b27696c

File tree

6 files changed

+24
-24
lines changed

6 files changed

+24
-24
lines changed

net/smc/af_smc.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ static int smc_find_ism_v2_device_clnt(struct smc_sock *smc,
10451045
int rc = SMC_CLC_DECL_NOSMCDDEV;
10461046
struct smcd_dev *smcd;
10471047
int i = 1, entry = 1;
1048-
bool is_virtual;
1048+
bool is_emulated;
10491049
u16 chid;
10501050

10511051
if (smcd_indicated(ini->smc_type_v1))
@@ -1057,12 +1057,12 @@ static int smc_find_ism_v2_device_clnt(struct smc_sock *smc,
10571057
chid = smc_ism_get_chid(smcd);
10581058
if (!smc_find_ism_v2_is_unique_chid(chid, ini, i))
10591059
continue;
1060-
is_virtual = __smc_ism_is_virtual(chid);
1060+
is_emulated = __smc_ism_is_emulated(chid);
10611061
if (!smc_pnet_is_pnetid_set(smcd->pnetid) ||
10621062
smc_pnet_is_ndev_pnetid(sock_net(&smc->sk), smcd->pnetid)) {
1063-
if (is_virtual && entry == SMCD_CLC_MAX_V2_GID_ENTRIES)
1063+
if (is_emulated && entry == SMCD_CLC_MAX_V2_GID_ENTRIES)
10641064
/* It's the last GID-CHID entry left in CLC
1065-
* Proposal SMC-Dv2 extension, but a virtual
1065+
* Proposal SMC-Dv2 extension, but an Emulated-
10661066
* ISM device will take two entries. So give
10671067
* up it and try the next potential ISM device.
10681068
*/
@@ -1072,7 +1072,7 @@ static int smc_find_ism_v2_device_clnt(struct smc_sock *smc,
10721072
ini->is_smcd = true;
10731073
rc = 0;
10741074
i++;
1075-
entry = is_virtual ? entry + 2 : entry + 1;
1075+
entry = is_emulated ? entry + 2 : entry + 1;
10761076
if (entry > SMCD_CLC_MAX_V2_GID_ENTRIES)
10771077
break;
10781078
}
@@ -1413,10 +1413,10 @@ static int smc_connect_ism(struct smc_sock *smc,
14131413
if (rc)
14141414
return rc;
14151415

1416-
if (__smc_ism_is_virtual(ini->ism_chid[ini->ism_selected]))
1416+
if (__smc_ism_is_emulated(ini->ism_chid[ini->ism_selected]))
14171417
ini->ism_peer_gid[ini->ism_selected].gid_ext =
14181418
ntohll(aclc->d1.gid_ext);
1419-
/* for non-virtual ISM devices, peer gid_ext remains 0. */
1419+
/* for non-Emulated-ISM devices, peer gid_ext remains 0. */
14201420
}
14211421
ini->ism_peer_gid[ini->ism_selected].gid = ntohll(aclc->d0.gid);
14221422

@@ -2117,10 +2117,10 @@ static void smc_check_ism_v2_match(struct smc_init_info *ini,
21172117
if (smc_ism_get_chid(smcd) == proposed_chid &&
21182118
!smc_ism_cantalk(proposed_gid, ISM_RESERVED_VLANID, smcd)) {
21192119
ini->ism_peer_gid[*matches].gid = proposed_gid->gid;
2120-
if (__smc_ism_is_virtual(proposed_chid))
2120+
if (__smc_ism_is_emulated(proposed_chid))
21212121
ini->ism_peer_gid[*matches].gid_ext =
21222122
proposed_gid->gid_ext;
2123-
/* non-virtual ISM's peer gid_ext remains 0. */
2123+
/* non-Emulated-ISM's peer gid_ext remains 0. */
21242124
ini->ism_dev[*matches] = smcd;
21252125
(*matches)++;
21262126
break;
@@ -2170,10 +2170,10 @@ static void smc_find_ism_v2_device_serv(struct smc_sock *new_smc,
21702170
smcd_gid.gid = ntohll(smcd_v2_ext->gidchid[i].gid);
21712171
smcd_gid.gid_ext = 0;
21722172
chid = ntohs(smcd_v2_ext->gidchid[i].chid);
2173-
if (__smc_ism_is_virtual(chid)) {
2173+
if (__smc_ism_is_emulated(chid)) {
21742174
if ((i + 1) == smc_v2_ext->hdr.ism_gid_cnt ||
21752175
chid != ntohs(smcd_v2_ext->gidchid[i + 1].chid))
2176-
/* each virtual ISM device takes two GID-CHID
2176+
/* each Emulated-ISM device takes two GID-CHID
21772177
* entries and CHID of the second entry repeats
21782178
* that of the first entry.
21792179
*

net/smc/smc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ enum smc_state { /* possible states of an SMC socket */
5656
};
5757

5858
enum smc_supplemental_features {
59-
SMC_SPF_VIRT_ISM_DEV = 0,
59+
SMC_SPF_EMULATED_ISM_DEV = 0,
6060
};
6161

6262
#define SMC_FEATURE_MASK \
63-
(BIT(SMC_SPF_VIRT_ISM_DEV))
63+
(BIT(SMC_SPF_EMULATED_ISM_DEV))
6464

6565
struct smc_link_group;
6666

net/smc/smc_clc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -952,8 +952,8 @@ int smc_clc_send_proposal(struct smc_sock *smc, struct smc_init_info *ini)
952952
gidchids[entry].chid =
953953
htons(smc_ism_get_chid(ini->ism_dev[i]));
954954
gidchids[entry].gid = htonll(smcd_gid.gid);
955-
if (smc_ism_is_virtual(smcd)) {
956-
/* a virtual ISM device takes two
955+
if (smc_ism_is_emulated(smcd)) {
956+
/* an Emulated-ISM device takes two
957957
* entries. CHID of the second entry
958958
* repeats that of the first entry.
959959
*/
@@ -1055,7 +1055,7 @@ smcd_clc_prep_confirm_accept(struct smc_connection *conn,
10551055
clc->d1.chid = htons(chid);
10561056
if (eid && eid[0])
10571057
memcpy(clc->d1.eid, eid, SMC_MAX_EID_LEN);
1058-
if (__smc_ism_is_virtual(chid))
1058+
if (__smc_ism_is_emulated(chid))
10591059
clc->d1.gid_ext = htonll(smcd_gid.gid_ext);
10601060
len = SMCD_CLC_ACCEPT_CONFIRM_LEN_V2;
10611061
if (first_contact) {

net/smc/smc_clc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ struct smc_clc_msg_proposal { /* clc proposal message sent by Linux */
175175
#define SMCD_CLC_MAX_V2_GID_ENTRIES 8 /* max # of CHID-GID entries in CLC
176176
* proposal SMC-Dv2 extension.
177177
* each ISM device takes one entry and
178-
* each virtual ISM takes two entries.
178+
* each Emulated-ISM takes two entries
179179
*/
180180

181181
struct smc_clc_msg_proposal_area {

net/smc/smc_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,7 @@ void smc_smcd_terminate(struct smcd_dev *dev, struct smcd_gid *peer_gid,
15351535
list_for_each_entry_safe(lgr, l, &dev->lgr_list, list) {
15361536
if ((!peer_gid->gid ||
15371537
(lgr->peer_gid.gid == peer_gid->gid &&
1538-
!smc_ism_is_virtual(dev) ? 1 :
1538+
!smc_ism_is_emulated(dev) ? 1 :
15391539
lgr->peer_gid.gid_ext == peer_gid->gid_ext)) &&
15401540
(vlan == VLAN_VID_MASK || lgr->vlan_id == vlan)) {
15411541
if (peer_gid->gid) /* peer triggered termination */
@@ -1881,7 +1881,7 @@ static bool smcd_lgr_match(struct smc_link_group *lgr,
18811881
lgr->smcd != smcismdev)
18821882
return false;
18831883

1884-
if (smc_ism_is_virtual(smcismdev) &&
1884+
if (smc_ism_is_emulated(smcismdev) &&
18851885
lgr->peer_gid.gid_ext != peer_gid->gid_ext)
18861886
return false;
18871887

net/smc/smc_ism.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include "smc.h"
1717

18-
#define SMC_VIRTUAL_ISM_CHID_MASK 0xFF00
18+
#define SMC_EMULATED_ISM_CHID_MASK 0xFF00
1919
#define SMC_ISM_IDENT_MASK 0x00FFFF
2020

2121
struct smcd_dev_list { /* List of SMCD devices */
@@ -66,22 +66,22 @@ static inline int smc_ism_write(struct smcd_dev *smcd, u64 dmb_tok,
6666
return rc < 0 ? rc : 0;
6767
}
6868

69-
static inline bool __smc_ism_is_virtual(u16 chid)
69+
static inline bool __smc_ism_is_emulated(u16 chid)
7070
{
7171
/* CHIDs in range of 0xFF00 to 0xFFFF are reserved
72-
* for virtual ISM device.
72+
* for Emulated-ISM device.
7373
*
7474
* loopback-ism: 0xFFFF
7575
* virtio-ism: 0xFF00 ~ 0xFFFE
7676
*/
7777
return ((chid & 0xFF00) == 0xFF00);
7878
}
7979

80-
static inline bool smc_ism_is_virtual(struct smcd_dev *smcd)
80+
static inline bool smc_ism_is_emulated(struct smcd_dev *smcd)
8181
{
8282
u16 chid = smcd->ops->get_chid(smcd);
8383

84-
return __smc_ism_is_virtual(chid);
84+
return __smc_ism_is_emulated(chid);
8585
}
8686

8787
#endif

0 commit comments

Comments
 (0)