staging: most: core: rename struct most_c_aim_obj to pipe
[linux/fpc-iii.git] / net / smc / smc_llc.h
blob51b27ce90dbd25dfbbfb23a57e3253021f971bd9
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Shared Memory Communications over RDMA (SMC-R) and RoCE
5 * Definitions for LLC (link layer control) message handling
7 * Copyright IBM Corp. 2016
9 * Author(s): Klaus Wacker <Klaus.Wacker@de.ibm.com>
10 * Ursula Braun <ubraun@linux.vnet.ibm.com>
13 #ifndef SMC_LLC_H
14 #define SMC_LLC_H
16 #include "smc_wr.h"
18 #define SMC_LLC_FLAG_RESP 0x80
20 #define SMC_LLC_WAIT_FIRST_TIME (5 * HZ)
22 enum smc_llc_reqresp {
23 SMC_LLC_REQ,
24 SMC_LLC_RESP
27 enum smc_llc_msg_type {
28 SMC_LLC_CONFIRM_LINK = 0x01,
31 #define SMC_LLC_DATA_LEN 40
33 struct smc_llc_hdr {
34 struct smc_wr_rx_hdr common;
35 u8 length; /* 44 */
36 u8 reserved;
37 u8 flags;
40 struct smc_llc_msg_confirm_link { /* type 0x01 */
41 struct smc_llc_hdr hd;
42 u8 sender_mac[ETH_ALEN];
43 u8 sender_gid[SMC_GID_SIZE];
44 u8 sender_qp_num[3];
45 u8 link_num;
46 u8 link_uid[SMC_LGR_ID_SIZE];
47 u8 max_links;
48 u8 reserved[9];
51 union smc_llc_msg {
52 struct smc_llc_msg_confirm_link confirm_link;
53 struct {
54 struct smc_llc_hdr hdr;
55 u8 data[SMC_LLC_DATA_LEN];
56 } raw;
59 /* transmit */
60 int smc_llc_send_confirm_link(struct smc_link *lnk, u8 mac[], union ib_gid *gid,
61 enum smc_llc_reqresp reqresp);
62 int smc_llc_init(void) __init;
64 #endif /* SMC_LLC_H */