Whamcloud - gitweb
LU-10391 lnet: extend prefered nids in struct lnet_peer_ni
[fs/lustre-release.git] / lnet / include / lnet / lib-types.h
index fdf210c..9150b74 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 */
@@ -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 */
 };
 
@@ -251,7 +251,11 @@ struct netstrfns {
        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,
@@ -455,7 +459,7 @@ struct lnet_ni {
        __u32                   *ni_cpts;
 
        /* interface's NID */
-       lnet_nid_t              ni_nid;
+       struct lnet_nid         ni_nid;
 
        /* instance-specific data */
        void                    *ni_data;
@@ -555,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 {
@@ -593,7 +597,7 @@ 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 */
@@ -622,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 */
@@ -656,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;
@@ -879,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 */