summaryrefslogtreecommitdiffstats
path: root/net/smc/smc_clc.h
diff options
context:
space:
mode:
authorWen Gu <guwen@linux.alibaba.com>2023-12-19 15:26:10 +0100
committerDavid S. Miller <davem@davemloft.net>2023-12-26 21:24:33 +0100
commitece60db3a4ce24a2a913a8960eb6fec561cdbcf6 (patch)
tree2c6c7a4cd009e564cb310d4d8b36f7401f4a8341 /net/smc/smc_clc.h
parentnet/smc: unify the structs of accept or confirm message for v1 and v2 (diff)
downloadlinux-ece60db3a4ce24a2a913a8960eb6fec561cdbcf6.tar.xz
linux-ece60db3a4ce24a2a913a8960eb6fec561cdbcf6.zip
net/smc: support SMCv2.x supplemental features negotiation
This patch adds SMCv2.x supplemental features negotiation. Supported SMCv2.x supplemental features are represented by feature_mask in FCE field. The negotiation process is as follows. Server Client Proposal(features(c-mask bits)) <----------------------------------------- Accept(features(s-mask bits)) -----------------------------------------> Confirm(features(s&c-mask bits)) <----------------------------------------- Signed-off-by: Wen Gu <guwen@linux.alibaba.com> Reviewed-and-tested-by: Wenjia Zhang <wenjia@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_clc.h')
-rw-r--r--net/smc/smc_clc.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/net/smc/smc_clc.h b/net/smc/smc_clc.h
index 03f9ccea8c5e..c187d5f09d02 100644
--- a/net/smc/smc_clc.h
+++ b/net/smc/smc_clc.h
@@ -138,7 +138,8 @@ struct smc_clc_v2_extension {
u8 roce[16]; /* RoCEv2 GID */
u8 max_conns;
u8 max_links;
- u8 reserved[14];
+ __be16 feature_mask;
+ u8 reserved[12];
u8 user_eids[][SMC_MAX_EID_LEN];
};
@@ -240,9 +241,14 @@ struct smc_clc_first_contact_ext {
struct smc_clc_first_contact_ext_v2x {
struct smc_clc_first_contact_ext fce_v2_base;
- u8 max_conns; /* for SMC-R only */
- u8 max_links; /* for SMC-R only */
- u8 reserved3[2];
+ union {
+ struct {
+ u8 max_conns; /* for SMC-R only */
+ u8 max_links; /* for SMC-R only */
+ };
+ u8 reserved3[2]; /* for SMC-D only */
+ };
+ __be16 feature_mask;
__be32 vendor_exp_options;
u8 reserved4[8];
} __packed; /* format defined in