net/smc: determine accepted ISM devices
SMCD Version 2 allows to propose up to 8 additional ISM devices offered to the peer as candidates for SMCD communication. This patch covers the server side, i.e. selection of an ISM device matching one of the proposed ISM devices, that will be used for CLC accept Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
此提交包含在:
@@ -260,6 +260,22 @@ smc_get_clc_v2_ext(struct smc_clc_msg_proposal *prop)
|
||||
ntohs(prop_smcd->v2_ext_offset));
|
||||
}
|
||||
|
||||
static inline struct smc_clc_smcd_v2_extension *
|
||||
smc_get_clc_smcd_v2_ext(struct smc_clc_v2_extension *prop_v2ext)
|
||||
{
|
||||
if (!prop_v2ext)
|
||||
return NULL;
|
||||
if (!ntohs(prop_v2ext->hdr.smcd_v2_ext_offset))
|
||||
return NULL;
|
||||
|
||||
return (struct smc_clc_smcd_v2_extension *)
|
||||
((u8 *)prop_v2ext +
|
||||
offsetof(struct smc_clc_v2_extension, hdr) +
|
||||
offsetof(struct smc_clnt_opts_area_hdr, smcd_v2_ext_offset) +
|
||||
sizeof(prop_v2ext->hdr.smcd_v2_ext_offset) +
|
||||
ntohs(prop_v2ext->hdr.smcd_v2_ext_offset));
|
||||
}
|
||||
|
||||
struct smcd_dev;
|
||||
struct smc_init_info;
|
||||
|
||||
|
新增問題並參考
封鎖使用者