smc_clc.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Shared Memory Communications over RDMA (SMC-R) and RoCE
  4. *
  5. * CLC (connection layer control) handshake over initial TCP socket to
  6. * prepare for RDMA traffic
  7. *
  8. * Copyright IBM Corp. 2016
  9. *
  10. * Author(s): Ursula Braun <ubraun@linux.vnet.ibm.com>
  11. */
  12. #ifndef _SMC_CLC_H
  13. #define _SMC_CLC_H
  14. #include <rdma/ib_verbs.h>
  15. #include <linux/smc.h>
  16. #include "smc.h"
  17. #include "smc_netlink.h"
  18. #define SMC_CLC_PROPOSAL 0x01
  19. #define SMC_CLC_ACCEPT 0x02
  20. #define SMC_CLC_CONFIRM 0x03
  21. #define SMC_CLC_DECLINE 0x04
  22. #define SMC_TYPE_R 0 /* SMC-R only */
  23. #define SMC_TYPE_D 1 /* SMC-D only */
  24. #define SMC_TYPE_N 2 /* neither SMC-R nor SMC-D */
  25. #define SMC_TYPE_B 3 /* SMC-R and SMC-D */
  26. #define CLC_WAIT_TIME (6 * HZ) /* max. wait time on clcsock */
  27. #define CLC_WAIT_TIME_SHORT HZ /* short wait time on clcsock */
  28. #define SMC_CLC_DECL_MEM 0x01010000 /* insufficient memory resources */
  29. #define SMC_CLC_DECL_TIMEOUT_CL 0x02010000 /* timeout w4 QP confirm link */
  30. #define SMC_CLC_DECL_TIMEOUT_AL 0x02020000 /* timeout w4 QP add link */
  31. #define SMC_CLC_DECL_CNFERR 0x03000000 /* configuration error */
  32. #define SMC_CLC_DECL_PEERNOSMC 0x03010000 /* peer did not indicate SMC */
  33. #define SMC_CLC_DECL_IPSEC 0x03020000 /* IPsec usage */
  34. #define SMC_CLC_DECL_NOSMCDEV 0x03030000 /* no SMC device found (R or D) */
  35. #define SMC_CLC_DECL_NOSMCDDEV 0x03030001 /* no SMC-D device found */
  36. #define SMC_CLC_DECL_NOSMCRDEV 0x03030002 /* no SMC-R device found */
  37. #define SMC_CLC_DECL_NOISM2SUPP 0x03030003 /* hardware has no ISMv2 support */
  38. #define SMC_CLC_DECL_NOV2EXT 0x03030004 /* peer sent no clc v2 extension */
  39. #define SMC_CLC_DECL_NOV2DEXT 0x03030005 /* peer sent no clc SMC-Dv2 ext. */
  40. #define SMC_CLC_DECL_NOSEID 0x03030006 /* peer sent no SEID */
  41. #define SMC_CLC_DECL_NOSMCD2DEV 0x03030007 /* no SMC-Dv2 device found */
  42. #define SMC_CLC_DECL_NOUEID 0x03030008 /* peer sent no UEID */
  43. #define SMC_CLC_DECL_RELEASEERR 0x03030009 /* release version negotiate failed */
  44. #define SMC_CLC_DECL_MAXCONNERR 0x0303000a /* max connections negotiate failed */
  45. #define SMC_CLC_DECL_MAXLINKERR 0x0303000b /* max links negotiate failed */
  46. #define SMC_CLC_DECL_MODEUNSUPP 0x03040000 /* smc modes do not match (R or D)*/
  47. #define SMC_CLC_DECL_RMBE_EC 0x03050000 /* peer has eyecatcher in RMBE */
  48. #define SMC_CLC_DECL_OPTUNSUPP 0x03060000 /* fastopen sockopt not supported */
  49. #define SMC_CLC_DECL_DIFFPREFIX 0x03070000 /* IP prefix / subnet mismatch */
  50. #define SMC_CLC_DECL_GETVLANERR 0x03080000 /* err to get vlan id of ip device*/
  51. #define SMC_CLC_DECL_ISMVLANERR 0x03090000 /* err to reg vlan id on ism dev */
  52. #define SMC_CLC_DECL_NOACTLINK 0x030a0000 /* no active smc-r link in lgr */
  53. #define SMC_CLC_DECL_NOSRVLINK 0x030b0000 /* SMC-R link from srv not found */
  54. #define SMC_CLC_DECL_VERSMISMAT 0x030c0000 /* SMC version mismatch */
  55. #define SMC_CLC_DECL_MAX_DMB 0x030d0000 /* SMC-D DMB limit exceeded */
  56. #define SMC_CLC_DECL_NOROUTE 0x030e0000 /* SMC-Rv2 conn. no route to peer */
  57. #define SMC_CLC_DECL_NOINDIRECT 0x030f0000 /* SMC-Rv2 conn. indirect mismatch*/
  58. #define SMC_CLC_DECL_SYNCERR 0x04000000 /* synchronization error */
  59. #define SMC_CLC_DECL_PEERDECL 0x05000000 /* peer declined during handshake */
  60. #define SMC_CLC_DECL_INTERR 0x09990000 /* internal error */
  61. #define SMC_CLC_DECL_ERR_RTOK 0x09990001 /* rtoken handling failed */
  62. #define SMC_CLC_DECL_ERR_RDYLNK 0x09990002 /* ib ready link failed */
  63. #define SMC_CLC_DECL_ERR_REGBUF 0x09990003 /* reg rdma bufs failed */
  64. #define SMC_FIRST_CONTACT_MASK 0b10 /* first contact bit within typev2 */
  65. struct smc_clc_msg_hdr { /* header1 of clc messages */
  66. u8 eyecatcher[4]; /* eye catcher */
  67. u8 type; /* proposal / accept / confirm / decline */
  68. __be16 length;
  69. #if defined(__BIG_ENDIAN_BITFIELD)
  70. u8 version : 4,
  71. typev2 : 2,
  72. typev1 : 2;
  73. #elif defined(__LITTLE_ENDIAN_BITFIELD)
  74. u8 typev1 : 2,
  75. typev2 : 2,
  76. version : 4;
  77. #endif
  78. } __packed; /* format defined in RFC7609 */
  79. struct smc_clc_msg_trail { /* trailer of clc messages */
  80. u8 eyecatcher[4];
  81. };
  82. struct smc_clc_msg_local { /* header2 of clc messages */
  83. u8 id_for_peer[SMC_SYSTEMID_LEN]; /* unique system id */
  84. u8 gid[16]; /* gid of ib_device port */
  85. u8 mac[6]; /* mac of ib_device port */
  86. };
  87. /* Struct would be 4 byte aligned, but it is used in an array that is sent
  88. * to peers and must conform to RFC7609, hence we need to use packed here.
  89. */
  90. struct smc_clc_ipv6_prefix {
  91. struct in6_addr prefix;
  92. u8 prefix_len;
  93. } __packed; /* format defined in RFC7609 */
  94. #if defined(__BIG_ENDIAN_BITFIELD)
  95. struct smc_clc_v2_flag {
  96. u8 release : 4,
  97. rsvd : 3,
  98. seid : 1;
  99. };
  100. #elif defined(__LITTLE_ENDIAN_BITFIELD)
  101. struct smc_clc_v2_flag {
  102. u8 seid : 1,
  103. rsvd : 3,
  104. release : 4;
  105. };
  106. #endif
  107. struct smc_clnt_opts_area_hdr {
  108. u8 eid_cnt; /* number of user defined EIDs */
  109. u8 ism_gid_cnt; /* number of ISMv2 GIDs */
  110. u8 reserved1;
  111. struct smc_clc_v2_flag flag;
  112. u8 reserved2[2];
  113. __be16 smcd_v2_ext_offset; /* SMC-Dv2 Extension Offset */
  114. };
  115. struct smc_clc_smcd_gid_chid {
  116. __be64 gid; /* ISM GID */
  117. __be16 chid; /* ISMv2 CHID */
  118. } __packed; /* format defined in
  119. * IBM Shared Memory Communications Version 2
  120. * (https://www.ibm.com/support/pages/node/6326337)
  121. */
  122. struct smc_clc_v2_extension {
  123. /* New members must be added within the struct_group() macro below. */
  124. struct_group_tagged(smc_clc_v2_extension_fixed, fixed,
  125. struct smc_clnt_opts_area_hdr hdr;
  126. u8 roce[16]; /* RoCEv2 GID */
  127. u8 max_conns;
  128. u8 max_links;
  129. __be16 feature_mask;
  130. u8 reserved[12];
  131. );
  132. u8 user_eids[][SMC_MAX_EID_LEN];
  133. };
  134. static_assert(offsetof(struct smc_clc_v2_extension, user_eids) == sizeof(struct smc_clc_v2_extension_fixed),
  135. "struct member likely outside of struct_group_tagged()");
  136. struct smc_clc_msg_proposal_prefix { /* prefix part of clc proposal message*/
  137. __be32 outgoing_subnet; /* subnet mask */
  138. u8 prefix_len; /* number of significant bits in mask */
  139. u8 reserved[2];
  140. u8 ipv6_prefixes_cnt; /* number of IPv6 prefixes in prefix array */
  141. } __aligned(4);
  142. struct smc_clc_msg_smcd { /* SMC-D GID information */
  143. struct smc_clc_smcd_gid_chid ism; /* ISM native GID+CHID of requestor */
  144. __be16 v2_ext_offset; /* SMC Version 2 Extension Offset */
  145. u8 vendor_oui[3]; /* vendor organizationally unique identifier */
  146. u8 vendor_exp_options[5];
  147. u8 reserved[20];
  148. };
  149. struct smc_clc_smcd_v2_extension {
  150. /* New members must be added within the struct_group() macro below. */
  151. struct_group_tagged(smc_clc_smcd_v2_extension_fixed, fixed,
  152. u8 system_eid[SMC_MAX_EID_LEN];
  153. u8 reserved[16];
  154. );
  155. struct smc_clc_smcd_gid_chid gidchid[];
  156. };
  157. static_assert(offsetof(struct smc_clc_smcd_v2_extension, gidchid) == sizeof(struct smc_clc_smcd_v2_extension_fixed),
  158. "struct member likely outside of struct_group_tagged()");
  159. struct smc_clc_msg_proposal { /* clc proposal message sent by Linux */
  160. struct smc_clc_msg_hdr hdr;
  161. struct smc_clc_msg_local lcl;
  162. __be16 iparea_offset; /* offset to IP address information area */
  163. } __aligned(4);
  164. #define SMC_CLC_MAX_V6_PREFIX 8
  165. #define SMC_CLC_MAX_UEID 8
  166. #define SMCD_CLC_MAX_V2_GID_ENTRIES 8 /* max # of CHID-GID entries in CLC
  167. * proposal SMC-Dv2 extension.
  168. * each ISM device takes one entry and
  169. * each Emulated-ISM takes two entries
  170. */
  171. struct smc_clc_msg_proposal_area {
  172. struct smc_clc_msg_proposal pclc_base;
  173. struct smc_clc_msg_smcd pclc_smcd;
  174. struct smc_clc_msg_proposal_prefix pclc_prfx;
  175. struct smc_clc_ipv6_prefix pclc_prfx_ipv6[SMC_CLC_MAX_V6_PREFIX];
  176. struct smc_clc_v2_extension_fixed pclc_v2_ext;
  177. u8 user_eids[SMC_CLC_MAX_UEID][SMC_MAX_EID_LEN];
  178. struct smc_clc_smcd_v2_extension_fixed pclc_smcd_v2_ext;
  179. struct smc_clc_smcd_gid_chid
  180. pclc_gidchids[SMCD_CLC_MAX_V2_GID_ENTRIES];
  181. struct smc_clc_msg_trail pclc_trl;
  182. };
  183. struct smcr_clc_msg_accept_confirm { /* SMCR accept/confirm */
  184. struct smc_clc_msg_local lcl;
  185. u8 qpn[3]; /* QP number */
  186. __be32 rmb_rkey; /* RMB rkey */
  187. u8 rmbe_idx; /* Index of RMBE in RMB */
  188. __be32 rmbe_alert_token; /* unique connection id */
  189. #if defined(__BIG_ENDIAN_BITFIELD)
  190. u8 rmbe_size : 4, /* buf size (compressed) */
  191. qp_mtu : 4; /* QP mtu */
  192. #elif defined(__LITTLE_ENDIAN_BITFIELD)
  193. u8 qp_mtu : 4,
  194. rmbe_size : 4;
  195. #endif
  196. u8 reserved;
  197. __be64 rmb_dma_addr; /* RMB virtual address */
  198. u8 reserved2;
  199. u8 psn[3]; /* packet sequence number */
  200. } __packed;
  201. struct smcd_clc_msg_accept_confirm_common { /* SMCD accept/confirm */
  202. __be64 gid; /* Sender GID */
  203. __be64 token; /* DMB token */
  204. u8 dmbe_idx; /* DMBE index */
  205. #if defined(__BIG_ENDIAN_BITFIELD)
  206. u8 dmbe_size : 4, /* buf size (compressed) */
  207. reserved3 : 4;
  208. #elif defined(__LITTLE_ENDIAN_BITFIELD)
  209. u8 reserved3 : 4,
  210. dmbe_size : 4;
  211. #endif
  212. u16 reserved4;
  213. __be32 linkid; /* Link identifier */
  214. } __packed;
  215. #define SMC_CLC_OS_ZOS 1
  216. #define SMC_CLC_OS_LINUX 2
  217. #define SMC_CLC_OS_AIX 3
  218. struct smc_clc_first_contact_ext {
  219. #if defined(__BIG_ENDIAN_BITFIELD)
  220. u8 v2_direct : 1,
  221. reserved : 7;
  222. u8 os_type : 4,
  223. release : 4;
  224. #elif defined(__LITTLE_ENDIAN_BITFIELD)
  225. u8 reserved : 7,
  226. v2_direct : 1;
  227. u8 release : 4,
  228. os_type : 4;
  229. #endif
  230. u8 reserved2[2];
  231. u8 hostname[SMC_MAX_HOSTNAME_LEN];
  232. };
  233. struct smc_clc_first_contact_ext_v2x {
  234. struct smc_clc_first_contact_ext fce_v2_base;
  235. union {
  236. struct {
  237. u8 max_conns; /* for SMC-R only */
  238. u8 max_links; /* for SMC-R only */
  239. };
  240. u8 reserved3[2]; /* for SMC-D only */
  241. };
  242. __be16 feature_mask;
  243. __be32 vendor_exp_options;
  244. u8 reserved4[8];
  245. } __packed; /* format defined in
  246. * IBM Shared Memory Communications Version 2 (Third Edition)
  247. * (https://www.ibm.com/support/pages/node/7009315)
  248. */
  249. struct smc_clc_fce_gid_ext {
  250. u8 gid_cnt;
  251. u8 reserved2[3];
  252. u8 gid[][SMC_GID_SIZE];
  253. };
  254. struct smc_clc_msg_accept_confirm { /* clc accept / confirm message */
  255. struct smc_clc_msg_hdr hdr;
  256. union {
  257. struct { /* SMC-R */
  258. struct smcr_clc_msg_accept_confirm r0;
  259. struct { /* v2 only */
  260. u8 eid[SMC_MAX_EID_LEN];
  261. u8 reserved6[8];
  262. } __packed r1;
  263. };
  264. struct { /* SMC-D */
  265. struct smcd_clc_msg_accept_confirm_common d0;
  266. struct { /* v2 only, but 12 bytes reserved in v1 */
  267. __be16 chid;
  268. u8 eid[SMC_MAX_EID_LEN];
  269. __be64 gid_ext;
  270. } __packed d1;
  271. };
  272. };
  273. };
  274. struct smc_clc_msg_decline { /* clc decline message */
  275. struct smc_clc_msg_hdr hdr;
  276. u8 id_for_peer[SMC_SYSTEMID_LEN]; /* sender peer_id */
  277. __be32 peer_diagnosis; /* diagnosis information */
  278. #if defined(__BIG_ENDIAN_BITFIELD)
  279. u8 os_type : 4,
  280. reserved : 4;
  281. #elif defined(__LITTLE_ENDIAN_BITFIELD)
  282. u8 reserved : 4,
  283. os_type : 4;
  284. #endif
  285. u8 reserved2[3];
  286. struct smc_clc_msg_trail trl; /* eye catcher "SMCD" or "SMCR" EBCDIC */
  287. } __aligned(4);
  288. #define SMC_DECL_DIAG_COUNT_V2 4 /* no. of additional peer diagnosis codes */
  289. struct smc_clc_msg_decline_v2 { /* clc decline message */
  290. struct smc_clc_msg_hdr hdr;
  291. u8 id_for_peer[SMC_SYSTEMID_LEN]; /* sender peer_id */
  292. __be32 peer_diagnosis; /* diagnosis information */
  293. #if defined(__BIG_ENDIAN_BITFIELD)
  294. u8 os_type : 4,
  295. reserved : 4;
  296. #elif defined(__LITTLE_ENDIAN_BITFIELD)
  297. u8 reserved : 4,
  298. os_type : 4;
  299. #endif
  300. u8 reserved2[3];
  301. __be32 peer_diagnosis_v2[SMC_DECL_DIAG_COUNT_V2];
  302. struct smc_clc_msg_trail trl; /* eye catcher "SMCD" or "SMCR" EBCDIC */
  303. } __aligned(4);
  304. /* determine start of the prefix area within the proposal message */
  305. static inline struct smc_clc_msg_proposal_prefix *
  306. smc_clc_proposal_get_prefix(struct smc_clc_msg_proposal *pclc)
  307. {
  308. u16 offset = ntohs(pclc->iparea_offset);
  309. if (offset > sizeof(struct smc_clc_msg_smcd))
  310. return NULL;
  311. return (struct smc_clc_msg_proposal_prefix *)
  312. ((u8 *)pclc + sizeof(*pclc) + offset);
  313. }
  314. static inline bool smcr_indicated(int smc_type)
  315. {
  316. return smc_type == SMC_TYPE_R || smc_type == SMC_TYPE_B;
  317. }
  318. static inline bool smcd_indicated(int smc_type)
  319. {
  320. return smc_type == SMC_TYPE_D || smc_type == SMC_TYPE_B;
  321. }
  322. static inline u8 smc_indicated_type(int is_smcd, int is_smcr)
  323. {
  324. if (is_smcd && is_smcr)
  325. return SMC_TYPE_B;
  326. if (is_smcd)
  327. return SMC_TYPE_D;
  328. if (is_smcr)
  329. return SMC_TYPE_R;
  330. return SMC_TYPE_N;
  331. }
  332. /* get SMC-D info from proposal message */
  333. static inline struct smc_clc_msg_smcd *
  334. smc_get_clc_msg_smcd(struct smc_clc_msg_proposal *prop)
  335. {
  336. if (smcd_indicated(prop->hdr.typev1) &&
  337. ntohs(prop->iparea_offset) != sizeof(struct smc_clc_msg_smcd))
  338. return NULL;
  339. return (struct smc_clc_msg_smcd *)(prop + 1);
  340. }
  341. static inline struct smc_clc_v2_extension *
  342. smc_get_clc_v2_ext(struct smc_clc_msg_proposal *prop)
  343. {
  344. struct smc_clc_msg_smcd *prop_smcd = smc_get_clc_msg_smcd(prop);
  345. u16 max_offset;
  346. max_offset = offsetof(struct smc_clc_msg_proposal_area, pclc_v2_ext) -
  347. offsetof(struct smc_clc_msg_proposal_area, pclc_smcd) -
  348. offsetofend(struct smc_clc_msg_smcd, v2_ext_offset);
  349. if (!prop_smcd || !ntohs(prop_smcd->v2_ext_offset) ||
  350. ntohs(prop_smcd->v2_ext_offset) > max_offset)
  351. return NULL;
  352. return (struct smc_clc_v2_extension *)
  353. ((u8 *)prop_smcd +
  354. offsetof(struct smc_clc_msg_smcd, v2_ext_offset) +
  355. sizeof(prop_smcd->v2_ext_offset) +
  356. ntohs(prop_smcd->v2_ext_offset));
  357. }
  358. static inline struct smc_clc_smcd_v2_extension *
  359. smc_get_clc_smcd_v2_ext(struct smc_clc_v2_extension *prop_v2ext)
  360. {
  361. u16 max_offset = offsetof(struct smc_clc_msg_proposal_area, pclc_smcd_v2_ext) -
  362. offsetof(struct smc_clc_msg_proposal_area, pclc_v2_ext) -
  363. offsetof(struct smc_clc_v2_extension, hdr) -
  364. offsetofend(struct smc_clnt_opts_area_hdr, smcd_v2_ext_offset);
  365. if (!prop_v2ext)
  366. return NULL;
  367. if (!ntohs(prop_v2ext->hdr.smcd_v2_ext_offset) ||
  368. ntohs(prop_v2ext->hdr.smcd_v2_ext_offset) > max_offset)
  369. return NULL;
  370. return (struct smc_clc_smcd_v2_extension *)
  371. ((u8 *)prop_v2ext +
  372. offsetof(struct smc_clc_v2_extension, hdr) +
  373. offsetof(struct smc_clnt_opts_area_hdr, smcd_v2_ext_offset) +
  374. sizeof(prop_v2ext->hdr.smcd_v2_ext_offset) +
  375. ntohs(prop_v2ext->hdr.smcd_v2_ext_offset));
  376. }
  377. static inline struct smc_clc_first_contact_ext *
  378. smc_get_clc_first_contact_ext(struct smc_clc_msg_accept_confirm *clc,
  379. bool is_smcd)
  380. {
  381. int clc_v2_len;
  382. if (clc->hdr.version == SMC_V1 ||
  383. !(clc->hdr.typev2 & SMC_FIRST_CONTACT_MASK))
  384. return NULL;
  385. if (is_smcd)
  386. clc_v2_len =
  387. offsetofend(struct smc_clc_msg_accept_confirm, d1);
  388. else
  389. clc_v2_len =
  390. offsetofend(struct smc_clc_msg_accept_confirm, r1);
  391. return (struct smc_clc_first_contact_ext *)(((u8 *)clc) + clc_v2_len);
  392. }
  393. struct smcd_dev;
  394. struct smc_init_info;
  395. int smc_clc_prfx_match(struct socket *clcsock,
  396. struct smc_clc_msg_proposal_prefix *prop);
  397. int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen,
  398. u8 expected_type, unsigned long timeout);
  399. int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info, u8 version);
  400. int smc_clc_send_proposal(struct smc_sock *smc, struct smc_init_info *ini);
  401. int smc_clc_send_confirm(struct smc_sock *smc, bool clnt_first_contact,
  402. u8 version, u8 *eid, struct smc_init_info *ini);
  403. int smc_clc_send_accept(struct smc_sock *smc, bool srv_first_contact,
  404. u8 version, u8 *negotiated_eid, struct smc_init_info *ini);
  405. int smc_clc_srv_v2x_features_validate(struct smc_sock *smc,
  406. struct smc_clc_msg_proposal *pclc,
  407. struct smc_init_info *ini);
  408. int smc_clc_clnt_v2x_features_validate(struct smc_clc_first_contact_ext *fce,
  409. struct smc_init_info *ini);
  410. int smc_clc_v2x_features_confirm_check(struct smc_clc_msg_accept_confirm *cclc,
  411. struct smc_init_info *ini);
  412. void smc_clc_init(void) __init;
  413. void smc_clc_exit(void);
  414. void smc_clc_get_hostname(u8 **host);
  415. bool smc_clc_match_eid(u8 *negotiated_eid,
  416. struct smc_clc_v2_extension *smc_v2_ext,
  417. u8 *peer_eid, u8 *local_eid);
  418. int smc_clc_ueid_count(void);
  419. int smc_nl_dump_ueid(struct sk_buff *skb, struct netlink_callback *cb);
  420. int smc_nl_add_ueid(struct sk_buff *skb, struct genl_info *info);
  421. int smc_nl_remove_ueid(struct sk_buff *skb, struct genl_info *info);
  422. int smc_nl_flush_ueid(struct sk_buff *skb, struct genl_info *info);
  423. int smc_nl_dump_seid(struct sk_buff *skb, struct netlink_callback *cb);
  424. int smc_nl_enable_seid(struct sk_buff *skb, struct genl_info *info);
  425. int smc_nl_disable_seid(struct sk_buff *skb, struct genl_info *info);
  426. #endif