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#include <linux/types.h>
14#include <linux/mutex.h>
15
16#include "smc.h"
17
18struct smcd_dev_list {
19 struct list_head list;
20 struct mutex mutex;
21};
22
23extern struct smcd_dev_list smcd_dev_list;
24
25struct smc_ism_vlanid {
26 struct list_head list;
27 unsigned short vlanid;
28 refcount_t refcnt;
29};
30
31struct smc_ism_position {
32 u64 token;
33 u32 offset;
34 u8 index;
35 u8 signal;
36};
37
38struct smcd_dev;
39
40int smc_ism_cantalk(u64 peer_gid, unsigned short vlan_id, struct smcd_dev *dev);
41void smc_ism_set_conn(struct smc_connection *conn);
42void smc_ism_unset_conn(struct smc_connection *conn);
43int smc_ism_get_vlan(struct smcd_dev *dev, unsigned short vlan_id);
44int smc_ism_put_vlan(struct smcd_dev *dev, unsigned short vlan_id);
45int smc_ism_register_dmb(struct smc_link_group *lgr, int buf_size,
46 struct smc_buf_desc *dmb_desc);
47int smc_ism_unregister_dmb(struct smcd_dev *dev, struct smc_buf_desc *dmb_desc);
48int smc_ism_write(struct smcd_dev *dev, const struct smc_ism_position *pos,
49 void *data, size_t len);
50int smc_ism_signal_shutdown(struct smc_link_group *lgr);
51void smc_ism_get_system_eid(struct smcd_dev *dev, u8 **eid);
52u16 smc_ism_get_chid(struct smcd_dev *dev);
53bool smc_ism_is_v2_capable(void);
54void smc_ism_init(void);
55int smcd_nl_get_device(struct sk_buff *skb, struct netlink_callback *cb);
56#endif
57