/* cpt to lock */
int rspt_cpt;
/* nid of next hop */
- lnet_nid_t rspt_next_hop_nid;
+ struct lnet_nid rspt_next_hop_nid;
/* deadline of the REPLY/ACK */
ktime_t rspt_deadline;
/* parent MD */
struct lnet_me {
struct list_head me_list;
int me_cpt;
- struct lnet_process_id me_match_id;
+ struct lnet_processid me_match_id;
unsigned int me_portal;
unsigned int me_pos; /* hash offset in mt_hash */
__u64 me_match_bits;
struct lnet_test_peer {
/* info about peers we are trying to fail */
struct list_head tp_list; /* ln_test_peers */
- lnet_nid_t tp_nid; /* matching nid */
+ struct lnet_nid tp_nid; /* matching nid */
unsigned int tp_threshold; /* # failures to simulate */
};
char *nf_name;
char *nf_modname;
void (*nf_addr2str)(u32 addr, char *str, size_t size);
+ void (*nf_addr2str_size)(const __be32 *addr, size_t asize,
+ char *str, size_t size);
int (*nf_str2addr)(const char *str, int nob, u32 *addr);
+ int (*nf_str2addr_size)(const char *str, int nob,
+ __be32 *addr, size_t *asize);
int (*nf_parse_addrlist)(char *str, int len,
struct list_head *list);
int (*nf_print_addrlist)(char *buffer, int count,
/* accept a new connection */
int (*lnd_accept)(struct lnet_ni *ni, struct socket *sock);
+
+ /* get dma_dev priority */
+ unsigned int (*lnd_get_dev_prio)(struct lnet_ni *ni,
+ unsigned int dev_idx);
};
struct lnet_tx_queue {
__u32 *ni_cpts;
/* interface's NID */
- lnet_nid_t ni_nid;
+ struct lnet_nid ni_nid;
/* instance-specific data */
void *ni_data;
struct lnet_nid_list {
struct list_head nl_list;
- lnet_nid_t nl_nid;
+ struct lnet_nid nl_nid;
};
struct lnet_peer_ni {
/* network peer is on */
struct lnet_net *lpni_net;
/* peer's NID */
- lnet_nid_t lpni_nid;
+ struct lnet_nid lpni_nid;
/* # refs */
struct kref lpni_kref;
/* health value for the peer */
time64_t lpni_last_alive;
/* preferred local nids: if only one, use lpni_pref.nid */
union lpni_pref {
- lnet_nid_t nid;
+ struct lnet_nid nid;
struct list_head nids;
} lpni_pref;
/* list of router nids preferred for this peer NI */
struct list_head lp_rtr_list;
/* primary NID of the peer */
- lnet_nid_t lp_primary_nid;
+ struct lnet_nid lp_primary_nid;
/* source NID to use during discovery */
- lnet_nid_t lp_disc_src_nid;
+ struct lnet_nid lp_disc_src_nid;
/* destination NID to use during discovery */
- lnet_nid_t lp_disc_dst_nid;
+ struct lnet_nid lp_disc_dst_nid;
/* net to perform discovery on */
__u32 lp_disc_net_id;
#define LNET_PEER_MARK_DELETION BIT(18)
/* lnet_peer_del()/lnet_peer_del_locked() has been called on the peer */
#define LNET_PEER_MARK_DELETED BIT(19)
+/* lock primary NID to what's requested by ULP */
+#define LNET_PEER_LOCK_PRIMARY BIT(20)
+/* this is for informational purposes only. It is set if a peer gets
+ * configured from Lustre with a primary NID which belongs to another peer
+ * which is also configured by Lustre as the primary NID.
+ */
+#define LNET_PEER_BAD_CONFIG BIT(21)
struct lnet_peer_net {
/* chain on lp_peer_nets */
struct list_head lr_list; /* chain on net */
struct list_head lr_gwlist; /* chain on gateway */
struct lnet_peer *lr_gateway; /* router node */
- lnet_nid_t lr_nid; /* NID used to add route */
+ struct lnet_nid lr_nid; /* NID used to add route */
__u32 lr_net; /* remote network number */
__u32 lr_lnet; /* local network number */
int lr_seq; /* sequence for round-robin */
/* parameter for matching operations (GET, PUT) */
struct lnet_match_info {
__u64 mi_mbits;
- struct lnet_process_id mi_id;
+ struct lnet_processid mi_id;
unsigned int mi_cpt;
unsigned int mi_opc;
unsigned int mi_portal;
struct list_head ln_udsp_list;
};
-static const struct nla_policy scalar_attr_policy[LN_SCALAR_CNT + 1] = {
+struct genl_filter_list {
+ struct list_head lp_list;
+ void *lp_cursor;
+ bool lp_first;
+};
+
+static const struct nla_policy scalar_attr_policy[LN_SCALAR_MAX + 1] = {
[LN_SCALAR_ATTR_LIST] = { .type = NLA_NESTED },
[LN_SCALAR_ATTR_LIST_SIZE] = { .type = NLA_U16 },
[LN_SCALAR_ATTR_INDEX] = { .type = NLA_U16 },