diff options
author | Karsten Graul <kgraul@linux.ibm.com> | 2020-05-04 15:18:47 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-04 20:54:39 +0300 |
commit | 45fa8da0bf5cb447fcf835d184e2d3b745376e69 (patch) | |
tree | 830260f960f618058d5681c179a007d17fa2922e /net/smc/smc_core.h | |
parent | a52bcc919b14c9d78f03b2b4ff604e5ca69c7e6d (diff) | |
download | linux-45fa8da0bf5cb447fcf835d184e2d3b745376e69.tar.xz |
net/smc: create improved SMC-R link_uid
The link_uid of an SMC-R link is exchanged between SMC peers and its
value can be used for debugging purposes. Create a unique link_uid
during link initialization and use it in communication with SMC-R peers.
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Reviewed-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_core.h')
-rw-r--r-- | net/smc/smc_core.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/smc/smc_core.h b/net/smc/smc_core.h index 32bc45af9a1a..e2ace20db7fd 100644 --- a/net/smc/smc_core.h +++ b/net/smc/smc_core.h @@ -70,6 +70,8 @@ struct smc_rdma_wr { /* work requests per message struct ib_rdma_wr wr_tx_rdma[SMC_MAX_RDMA_WRITES]; }; +#define SMC_LGR_ID_SIZE 4 + struct smc_link { struct smc_ib_device *smcibdev; /* ib-device */ u8 ibport; /* port - values 1 | 2 */ @@ -116,6 +118,7 @@ struct smc_link { u8 peer_mac[ETH_ALEN]; /* = gid[8:10||13:15] */ u8 peer_gid[SMC_GID_SIZE]; /* gid of peer*/ u8 link_id; /* unique # within link group */ + u8 link_uid[SMC_LGR_ID_SIZE]; /* unique lnk id */ u8 link_idx; /* index in lgr link array */ u8 link_is_asym; /* is link asymmetric? */ struct smc_link_group *lgr; /* parent link group */ @@ -178,7 +181,6 @@ struct smc_rtoken { /* address/key of remote RMB */ u32 rkey; }; -#define SMC_LGR_ID_SIZE 4 #define SMC_BUF_MIN_SIZE 16384 /* minimum size of an RMB */ #define SMC_RMBE_SIZES 16 /* number of distinct RMBE sizes */ /* theoretically, the RFC states that largest size would be 512K, |