Merge tag 'backlight-next-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee...
[linux-2.6-block.git] / net / smc / smc_llc.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
9bf9abea
UB
2/*
3 * Shared Memory Communications over RDMA (SMC-R) and RoCE
4 *
5 * Definitions for LLC (link layer control) message handling
6 *
7 * Copyright IBM Corp. 2016
8 *
9 * Author(s): Klaus Wacker <Klaus.Wacker@de.ibm.com>
10 * Ursula Braun <ubraun@linux.vnet.ibm.com>
11 */
12
13#ifndef SMC_LLC_H
14#define SMC_LLC_H
15
16#include "smc_wr.h"
17
18#define SMC_LLC_FLAG_RESP 0x80
19
20#define SMC_LLC_WAIT_FIRST_TIME (5 * HZ)
52bedf37 21#define SMC_LLC_WAIT_TIME (2 * HZ)
9bf9abea
UB
22
23enum smc_llc_reqresp {
24 SMC_LLC_REQ,
25 SMC_LLC_RESP
26};
27
28enum smc_llc_msg_type {
29 SMC_LLC_CONFIRM_LINK = 0x01,
52bedf37
KG
30 SMC_LLC_ADD_LINK = 0x02,
31 SMC_LLC_DELETE_LINK = 0x04,
4ed75de5 32 SMC_LLC_CONFIRM_RKEY = 0x06,
313164da 33 SMC_LLC_TEST_LINK = 0x07,
4ed75de5
KG
34 SMC_LLC_CONFIRM_RKEY_CONT = 0x08,
35 SMC_LLC_DELETE_RKEY = 0x09,
9bf9abea
UB
36};
37
9bf9abea 38/* transmit */
947541f3 39int smc_llc_send_confirm_link(struct smc_link *lnk,
9bf9abea 40 enum smc_llc_reqresp reqresp);
7005ada6 41int smc_llc_send_add_link(struct smc_link *link, u8 mac[], u8 gid[],
52bedf37
KG
42 enum smc_llc_reqresp reqresp);
43int smc_llc_send_delete_link(struct smc_link *link,
0d18a0cb 44 enum smc_llc_reqresp reqresp, bool orderly);
2a4c57a9 45int smc_llc_link_init(struct smc_link *link);
877ae5be 46void smc_llc_link_active(struct smc_link *link, int testlink_time);
0d18a0cb 47void smc_llc_link_deleting(struct smc_link *link);
877ae5be 48void smc_llc_link_inactive(struct smc_link *link);
2a4c57a9 49void smc_llc_link_clear(struct smc_link *link);
44aa81ce
KG
50int smc_llc_do_confirm_rkey(struct smc_link *link,
51 struct smc_buf_desc *rmb_desc);
60e03c62
KG
52int smc_llc_do_delete_rkey(struct smc_link *link,
53 struct smc_buf_desc *rmb_desc);
9bf9abea
UB
54int smc_llc_init(void) __init;
55
56#endif /* SMC_LLC_H */