1
2
3
4
5
6
7
8
9#ifndef SMCD_ISM_H
10#define SMCD_ISM_H
11
12#include <linux/uio.h>
13
14#include "smc.h"
15
16struct smcd_dev_list {
17 struct list_head list;
18 spinlock_t lock;
19};
20
21extern struct smcd_dev_list smcd_dev_list;
22
23struct smc_ism_vlanid {
24 struct list_head list;
25 unsigned short vlanid;
26 refcount_t refcnt;
27};
28
29struct smc_ism_position {
30 u64 token;
31 u32 offset;
32 u8 index;
33 u8 signal;
34};
35
36struct smcd_dev;
37
38int smc_ism_cantalk(u64 peer_gid, unsigned short vlan_id, struct smcd_dev *dev);
39void smc_ism_set_conn(struct smc_connection *conn);
40void smc_ism_unset_conn(struct smc_connection *conn);
41int smc_ism_get_vlan(struct smcd_dev *dev, unsigned short vlan_id);
42int smc_ism_put_vlan(struct smcd_dev *dev, unsigned short vlan_id);
43int smc_ism_register_dmb(struct smc_link_group *lgr, int buf_size,
44 struct smc_buf_desc *dmb_desc);
45int smc_ism_unregister_dmb(struct smcd_dev *dev, struct smc_buf_desc *dmb_desc);
46int smc_ism_write(struct smcd_dev *dev, const struct smc_ism_position *pos,
47 void *data, size_t len);
48int smc_ism_signal_shutdown(struct smc_link_group *lgr);
49#endif
50