Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Shared Memory Communications over RDMA (SMC-R) and RoCE
4 *
5 * Definitions for the SMC module (socket related)
6 *
7 * Copyright IBM Corp. 2016
8 *
9 * Author(s): Ursula Braun <ubraun@linux.vnet.ibm.com>
10 */
11#ifndef _SMC_H
12#define _SMC_H
13
14#include <linux/device.h>
15#include <linux/spinlock.h>
16#include <linux/types.h>
17#include <linux/wait.h>
18#include <linux/dibs.h>
19
20struct sock;
21
22#define SMC_MAX_PNETID_LEN 16 /* Max. length of PNET id */
23
24struct smc_hashinfo {
25 rwlock_t lock;
26 struct hlist_head ht;
27};
28
29/* SMCD/ISM device driver interface */
30#define ISM_RESERVED_VLANID 0x1FFF
31
32struct smcd_gid {
33 u64 gid;
34 u64 gid_ext;
35};
36
37struct smcd_dev {
38 struct dibs_dev *dibs;
39 struct list_head list;
40 spinlock_t lock;
41 struct smc_connection **conn;
42 struct list_head vlan;
43 struct workqueue_struct *event_wq;
44 u8 pnetid[SMC_MAX_PNETID_LEN];
45 bool pnetid_by_user;
46 struct list_head lgr_list;
47 spinlock_t lgr_lock;
48 atomic_t lgr_cnt;
49 wait_queue_head_t lgrs_deleted;
50 u8 going_away : 1;
51};
52
53#endif /* _SMC_H */