Whamcloud - gitweb
LU-9680 net: Netlink improvements
[fs/lustre-release.git] / lnet / include / lnet / lib-types.h
index 6946e90..f4a64af 100644 (file)
@@ -90,7 +90,7 @@ struct lnet_rsp_tracker {
        /* 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 */
@@ -190,7 +190,7 @@ struct lnet_libhandle {
 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;
@@ -236,7 +236,7 @@ struct lnet_libmd {
 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 */
 };
 
@@ -559,7 +559,7 @@ struct lnet_ping_buffer {
 
 struct lnet_nid_list {
        struct list_head nl_list;
-       lnet_nid_t nl_nid;
+       struct lnet_nid nl_nid;
 };
 
 struct lnet_peer_ni {
@@ -626,7 +626,7 @@ struct lnet_peer_ni {
        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 */
@@ -660,12 +660,12 @@ struct lnet_peer {
        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;
@@ -883,7 +883,7 @@ struct lnet_route {
        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 */
@@ -959,7 +959,7 @@ enum lnet_match_flags {
 /* 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;
@@ -1273,7 +1273,13 @@ struct lnet {
        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 },