From d7e8111826c3ff1ae320aa2ac5802736c37f0abb Mon Sep 17 00:00:00 2001 From: James Simmons Date: Sun, 1 Jan 2017 11:12:59 -0500 Subject: [PATCH] LU-6142 lnet: change wire protocol typedefs to proper structure The upstream kernel requires proper structures so convert all the LNet wire protocols typedefs in the LNet core. Test-Parameters: trivial Change-Id: I0287e0d16a1faa7407dc63f9cd607b94ff49d980 Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/24566 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Doug Oucharek Reviewed-by: Olaf Weber Reviewed-by: Andreas Dilger Reviewed-by: Dmitry Eremin --- contrib/scripts/checkpatch.pl | 9 +++++++ lnet/include/lnet/lib-lnet.h | 6 ++--- lnet/include/lnet/lib-types.h | 14 +++++------ lnet/include/lnet/types.h | 48 ++++++++++++++++++------------------- lnet/lnet/api-ni.c | 56 +++++++++++++++++++++---------------------- lnet/lnet/lib-move.c | 2 +- lnet/lnet/lib-msg.c | 2 +- lnet/lnet/router.c | 10 ++++---- lnet/selftest/conrpc.c | 10 ++++---- lnet/selftest/framework.c | 8 +++---- lnet/selftest/selftest.h | 2 +- lnet/utils/wirecheck.c | 8 +++---- 12 files changed, 92 insertions(+), 83 deletions(-) diff --git a/contrib/scripts/checkpatch.pl b/contrib/scripts/checkpatch.pl index d4250e9..4a67b9f 100755 --- a/contrib/scripts/checkpatch.pl +++ b/contrib/scripts/checkpatch.pl @@ -459,6 +459,15 @@ my %dep_functions = ( 'cfs_hash_lookup_intent_t', 'enum cfs_hash_lookup_intent', 'cfs_hash_cond_arg_t', 'struct cfs_hash_cond_arg', + 'lnet_ni_status_t', 'struct lnet_ni_status', + 'lnet_ping_info_t', 'struct lnet_ping_info', + 'lnet_process_id_packed_t', 'struct lnet_process_id_packed', + 'lnet_handle_wire_t', 'struct lnet_handle_wire', + 'lnet_hdr_t', 'struct lnet_hdr', + 'lnet_magicversion_t', 'struct lnet_magicversion', + 'lnet_acceptor_connreq_t', 'struct lnet_acceptor_connreq', + 'lnet_counters_t', 'struct lnet_counters', + 'ldlm_appetite_t', 'enum ldlm_appetite', 'ldlm_cancel_flags_t', 'enum ldlm_cancel_flags', 'ldlm_error_t', 'enum ldlm_error', diff --git a/lnet/include/lnet/lib-lnet.h b/lnet/include/lnet/lib-lnet.h index 63b4e54..3b29582 100644 --- a/lnet/include/lnet/lib-lnet.h +++ b/lnet/include/lnet/lib-lnet.h @@ -81,7 +81,7 @@ static inline int lnet_is_route_alive(lnet_route_t *route) return route->lr_downis == 0; } -static inline int lnet_is_wire_handle_none (lnet_handle_wire_t *wh) +static inline int lnet_is_wire_handle_none(struct lnet_handle_wire *wh) { return (wh->wh_interface_cookie == LNET_WIRE_HANDLE_COOKIE_NONE && wh->wh_object_cookie == LNET_WIRE_HANDLE_COOKIE_NONE); @@ -356,7 +356,7 @@ lnet_handle2md(lnet_handle_md_t *handle) } static inline lnet_libmd_t * -lnet_wire_handle2md(lnet_handle_wire_t *wh) +lnet_wire_handle2md(struct lnet_handle_wire *wh) { /* ALWAYS called with resource lock held */ lnet_libhandle_t *lh; @@ -759,7 +759,7 @@ int lnet_peer_buffer_credits(lnet_ni_t *ni); int lnet_router_checker_start(void); void lnet_router_checker_stop(void); void lnet_router_ni_update_locked(lnet_peer_t *gw, __u32 net); -void lnet_swap_pinginfo(lnet_ping_info_t *info); +void lnet_swap_pinginfo(struct lnet_ping_info *info); int lnet_parse_ip2nets(char **networksp, char *ip2nets); int lnet_parse_routes(char *route_str, int *im_a_router); diff --git a/lnet/include/lnet/lib-types.h b/lnet/include/lnet/lib-types.h index 3ff7b33..fca5ace 100644 --- a/lnet/include/lnet/lib-types.h +++ b/lnet/include/lnet/lib-types.h @@ -250,7 +250,7 @@ typedef struct lnet_lnd int (*lnd_accept)(struct lnet_ni *ni, struct socket *sock); } lnd_t; -typedef struct { +typedef struct lnet_ni_status { lnet_nid_t ns_nid; __u32 ns_status; __u32 ns_unused; @@ -282,7 +282,7 @@ typedef struct lnet_ni { struct lnet_tx_queue **ni_tx_queues; /* percpt TX queues */ int **ni_refs; /* percpt reference count */ time64_t ni_last_alive; /* when I was last alive */ - lnet_ni_status_t *ni_status; /* my health status */ + struct lnet_ni_status *ni_status; /* my health status */ /* per NI LND tunables */ struct lnet_ioctl_config_lnd_tunables *ni_lnd_tunables; /* equivalent interfaces to use */ @@ -302,23 +302,23 @@ typedef struct lnet_ni { #define LNET_PING_FEAT_MASK (LNET_PING_FEAT_BASE | \ LNET_PING_FEAT_NI_STATUS) -typedef struct { +typedef struct lnet_ping_info { __u32 pi_magic; __u32 pi_features; lnet_pid_t pi_pid; __u32 pi_nnis; - lnet_ni_status_t pi_ni[0]; + struct lnet_ni_status pi_ni[0]; } WIRE_ATTR lnet_ping_info_t; /* router checker data, per router */ #define LNET_MAX_RTR_NIS 16 -#define LNET_PINGINFO_SIZE offsetof(lnet_ping_info_t, pi_ni[LNET_MAX_RTR_NIS]) +#define LNET_PINGINFO_SIZE offsetof(struct lnet_ping_info, pi_ni[LNET_MAX_RTR_NIS]) typedef struct { /* chain on the_lnet.ln_zombie_rcd or ln_deathrow_rcd */ struct list_head rcd_list; lnet_handle_md_t rcd_mdh; /* ping buffer MD */ struct lnet_peer *rcd_gateway; /* reference to gateway */ - lnet_ping_info_t *rcd_pinginfo; /* ping buffer */ + struct lnet_ping_info *rcd_pinginfo; /* ping buffer */ } lnet_rc_data_t; typedef struct lnet_peer { @@ -618,7 +618,7 @@ typedef struct lnet_handle_md_t ln_ping_target_md; lnet_handle_eq_t ln_ping_target_eq; - lnet_ping_info_t *ln_ping_info; + struct lnet_ping_info *ln_ping_info; /* router checker startup/shutdown state */ int ln_rc_state; diff --git a/lnet/include/lnet/types.h b/lnet/include/lnet/types.h index bbd7252..372bb6a 100644 --- a/lnet/include/lnet/types.h +++ b/lnet/include/lnet/types.h @@ -111,7 +111,7 @@ static inline __u32 LNET_MKNET(__u32 type, __u32 num) #define WIRE_ATTR __attribute__((packed)) /* Packed version of lnet_process_id_t to transfer via network */ -typedef struct { +typedef struct lnet_process_id_packed { lnet_nid_t nid; lnet_pid_t pid; /* node id / process id */ } WIRE_ATTR lnet_process_id_packed_t; @@ -120,7 +120,7 @@ typedef struct { * one epoch (i.e. new cookie when the interface restarts or the node * reboots). The object cookie only matches one object on that interface * during that object's lifetime (i.e. no cookie re-use). */ -typedef struct { +typedef struct lnet_handle_wire { __u64 wh_interface_cookie; __u64 wh_object_cookie; } WIRE_ATTR lnet_handle_wire_t; @@ -137,38 +137,38 @@ typedef enum { * byte boundary in the message header. Note that all types used in these * wire structs MUST be fixed size and the smaller types are placed at the * end. */ -typedef struct lnet_ack { - lnet_handle_wire_t dst_wmd; +struct lnet_ack { + struct lnet_handle_wire dst_wmd; __u64 match_bits; __u32 mlength; -} WIRE_ATTR lnet_ack_t; +} WIRE_ATTR; -typedef struct lnet_put { - lnet_handle_wire_t ack_wmd; +struct lnet_put { + struct lnet_handle_wire ack_wmd; __u64 match_bits; __u64 hdr_data; __u32 ptl_index; __u32 offset; -} WIRE_ATTR lnet_put_t; +} WIRE_ATTR; -typedef struct lnet_get { - lnet_handle_wire_t return_wmd; +struct lnet_get { + struct lnet_handle_wire return_wmd; __u64 match_bits; __u32 ptl_index; __u32 src_offset; __u32 sink_length; -} WIRE_ATTR lnet_get_t; +} WIRE_ATTR; -typedef struct lnet_reply { - lnet_handle_wire_t dst_wmd; -} WIRE_ATTR lnet_reply_t; +struct lnet_reply { + struct lnet_handle_wire dst_wmd; +} WIRE_ATTR; -typedef struct lnet_hello { +struct lnet_hello { __u64 incarnation; __u32 type; -} WIRE_ATTR lnet_hello_t; +} WIRE_ATTR; -typedef struct { +typedef struct lnet_hdr { lnet_nid_t dest_nid; lnet_nid_t src_nid; lnet_pid_t dest_pid; @@ -177,11 +177,11 @@ typedef struct { __u32 payload_length; /* payload data to follow */ /*<------__u64 aligned------->*/ union { - lnet_ack_t ack; - lnet_put_t put; - lnet_get_t get; - lnet_reply_t reply; - lnet_hello_t hello; + struct lnet_ack ack; + struct lnet_put put; + struct lnet_get get; + struct lnet_reply reply; + struct lnet_hello hello; } msg; } WIRE_ATTR lnet_hdr_t; @@ -194,7 +194,7 @@ typedef struct { * exchange HELLO messages when a connection is first established. Individual * LNDs can put whatever else they fancy in lnet_hdr_t::msg. */ -typedef struct { +typedef struct lnet_magicversion { __u32 magic; /* LNET_PROTO_TCP_MAGIC */ __u16 version_major; /* increment on incompatible change */ __u16 version_minor; /* increment on compatible change */ @@ -216,7 +216,7 @@ typedef struct { #define LNET_PROTO_TCP_VERSION_MINOR 0 /* Acceptor connection request */ -typedef struct { +typedef struct lnet_acceptor_connreq { __u32 acr_magic; /* PTL_ACCEPTOR_PROTO_MAGIC */ __u32 acr_version; /* protocol version */ __u64 acr_nid; /* target NID */ diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index e0c478b..a8eed05 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -231,12 +231,12 @@ static void lnet_assert_wire_constants(void) CLASSERT(LNET_MSG_REPLY == 3); CLASSERT(LNET_MSG_HELLO == 4); - /* Checks for struct ptl_handle_wire_t */ - CLASSERT((int)sizeof(lnet_handle_wire_t) == 16); - CLASSERT((int)offsetof(lnet_handle_wire_t, wh_interface_cookie) == 0); - CLASSERT((int)sizeof(((lnet_handle_wire_t *)0)->wh_interface_cookie) == 8); - CLASSERT((int)offsetof(lnet_handle_wire_t, wh_object_cookie) == 8); - CLASSERT((int)sizeof(((lnet_handle_wire_t *)0)->wh_object_cookie) == 8); + /* Checks for struct lnet_handle_wire */ + CLASSERT((int)sizeof(struct lnet_handle_wire) == 16); + CLASSERT((int)offsetof(struct lnet_handle_wire, wh_interface_cookie) == 0); + CLASSERT((int)sizeof(((struct lnet_handle_wire *)0)->wh_interface_cookie) == 8); + CLASSERT((int)offsetof(struct lnet_handle_wire, wh_object_cookie) == 8); + CLASSERT((int)sizeof(((struct lnet_handle_wire *)0)->wh_object_cookie) == 8); /* Checks for struct lnet_magicversion_t */ CLASSERT((int)sizeof(lnet_magicversion_t) == 8); @@ -878,13 +878,13 @@ lnet_count_acceptor_nis (void) return count; } -static lnet_ping_info_t * +static struct lnet_ping_info * lnet_ping_info_create(int num_ni) { - lnet_ping_info_t *ping_info; + struct lnet_ping_info *ping_info; unsigned int infosz; - infosz = offsetof(lnet_ping_info_t, pi_ni[num_ni]); + infosz = offsetof(struct lnet_ping_info, pi_ni[num_ni]); LIBCFS_ALLOC(ping_info, infosz); if (ping_info == NULL) { CERROR("Can't allocate ping info[%d]\n", num_ni); @@ -916,10 +916,10 @@ lnet_get_ni_count(void) } static inline void -lnet_ping_info_free(lnet_ping_info_t *pinfo) +lnet_ping_info_free(struct lnet_ping_info *pinfo) { LIBCFS_FREE(pinfo, - offsetof(lnet_ping_info_t, + offsetof(struct lnet_ping_info, pi_ni[pinfo->pi_nnis])); } @@ -945,14 +945,14 @@ lnet_ping_info_destroy(void) static void lnet_ping_event_handler(lnet_event_t *event) { - lnet_ping_info_t *pinfo = event->md.user_ptr; + struct lnet_ping_info *pinfo = event->md.user_ptr; if (event->unlinked) pinfo->pi_features = LNET_PING_FEAT_INVAL; } static int -lnet_ping_info_setup(lnet_ping_info_t **ppinfo, lnet_handle_md_t *md_handle, +lnet_ping_info_setup(struct lnet_ping_info **ppinfo, lnet_handle_md_t *md_handle, int ni_count, bool set_eq) { lnet_handle_me_t me_handle; @@ -986,7 +986,7 @@ lnet_ping_info_setup(lnet_ping_info_t **ppinfo, lnet_handle_md_t *md_handle, /* initialize md content */ md.start = *ppinfo; - md.length = offsetof(lnet_ping_info_t, + md.length = offsetof(struct lnet_ping_info, pi_ni[(*ppinfo)->pi_nnis]); md.threshold = LNET_MD_THRESH_INF; md.max_size = 0; @@ -1017,7 +1017,7 @@ failed_0: } static void -lnet_ping_md_unlink(lnet_ping_info_t *pinfo, lnet_handle_md_t *md_handle) +lnet_ping_md_unlink(struct lnet_ping_info *pinfo, lnet_handle_md_t *md_handle) { sigset_t blocked = cfs_block_allsigs(); @@ -1035,11 +1035,11 @@ lnet_ping_md_unlink(lnet_ping_info_t *pinfo, lnet_handle_md_t *md_handle) } static void -lnet_ping_info_install_locked(lnet_ping_info_t *ping_info) +lnet_ping_info_install_locked(struct lnet_ping_info *ping_info) { int i; lnet_ni_t *ni; - lnet_ni_status_t *ns; + struct lnet_ni_status *ns; i = 0; list_for_each_entry(ni, &the_lnet.ln_nis, ni_list) { @@ -1060,9 +1060,9 @@ lnet_ping_info_install_locked(lnet_ping_info_t *ping_info) } static void -lnet_ping_target_update(lnet_ping_info_t *pinfo, lnet_handle_md_t md_handle) +lnet_ping_target_update(struct lnet_ping_info *pinfo, lnet_handle_md_t md_handle) { - lnet_ping_info_t *old_pinfo = NULL; + struct lnet_ping_info *old_pinfo = NULL; lnet_handle_md_t old_md; /* switch the NIs to point to the new ping info created */ @@ -1549,7 +1549,7 @@ LNetNIInit(lnet_pid_t requested_pid) int im_a_router = 0; int rc; int ni_count; - lnet_ping_info_t *pinfo; + struct lnet_ping_info *pinfo; lnet_handle_md_t md_handle; struct list_head net_head; @@ -1813,7 +1813,7 @@ int lnet_dyn_add_ni(lnet_pid_t requested_pid, struct lnet_ioctl_config_data *conf) { char *nets = conf->cfg_config_u.cfg_net.net_intf; - lnet_ping_info_t *pinfo; + struct lnet_ping_info *pinfo; lnet_handle_md_t md_handle; struct lnet_ni *ni; struct list_head net_head; @@ -1891,7 +1891,7 @@ int lnet_dyn_del_ni(__u32 net) { lnet_ni_t *ni; - lnet_ping_info_t *pinfo; + struct lnet_ping_info *pinfo; lnet_handle_md_t md_handle; int rc; @@ -2213,7 +2213,7 @@ lnet_ping(lnet_process_id_t id, int timeout_ms, lnet_process_id_t __user *ids, int replied = 0; const int a_long_time = 60000; /* mS */ int infosz; - lnet_ping_info_t *info; + struct lnet_ping_info *info; lnet_process_id_t tmpid; int i; int nob; @@ -2221,7 +2221,7 @@ lnet_ping(lnet_process_id_t id, int timeout_ms, lnet_process_id_t __user *ids, int rc2; sigset_t blocked; - infosz = offsetof(lnet_ping_info_t, pi_ni[n_ids]); + infosz = offsetof(struct lnet_ping_info, pi_ni[n_ids]); if (n_ids <= 0 || id.nid == LNET_NID_ANY || @@ -2349,18 +2349,18 @@ lnet_ping(lnet_process_id_t id, int timeout_ms, lnet_process_id_t __user *ids, goto out_1; } - if (nob < offsetof(lnet_ping_info_t, pi_ni[0])) { + if (nob < offsetof(struct lnet_ping_info, pi_ni[0])) { CERROR("%s: Short reply %d(%d min)\n", libcfs_id2str(id), - nob, (int)offsetof(lnet_ping_info_t, pi_ni[0])); + nob, (int)offsetof(struct lnet_ping_info, pi_ni[0])); goto out_1; } if (info->pi_nnis < n_ids) n_ids = info->pi_nnis; - if (nob < offsetof(lnet_ping_info_t, pi_ni[n_ids])) { + if (nob < offsetof(struct lnet_ping_info, pi_ni[n_ids])) { CERROR("%s: Short reply %d(%d expected)\n", libcfs_id2str(id), - nob, (int)offsetof(lnet_ping_info_t, pi_ni[n_ids])); + nob, (int)offsetof(struct lnet_ping_info, pi_ni[n_ids])); goto out_1; } diff --git a/lnet/lnet/lib-move.c b/lnet/lnet/lib-move.c index 5a749b6..d93d061 100644 --- a/lnet/lnet/lib-move.c +++ b/lnet/lnet/lib-move.c @@ -1495,7 +1495,7 @@ lnet_parse_get(lnet_ni_t *ni, lnet_msg_t *msg, int rdma_get) { struct lnet_match_info info; lnet_hdr_t *hdr = &msg->msg_hdr; - lnet_handle_wire_t reply_wmd; + struct lnet_handle_wire reply_wmd; int rc; /* Convert get fields to host byte order */ diff --git a/lnet/lnet/lib-msg.c b/lnet/lnet/lib-msg.c index 70f2a5e..cb3a7cd 100644 --- a/lnet/lnet/lib-msg.c +++ b/lnet/lnet/lib-msg.c @@ -357,7 +357,7 @@ lnet_msg_detach_md(lnet_msg_t *msg, int status) static int lnet_complete_msg_locked(lnet_msg_t *msg, int cpt) { - lnet_handle_wire_t ack_wmd; + struct lnet_handle_wire ack_wmd; int rc; int status = msg->msg_ev.status; diff --git a/lnet/lnet/router.c b/lnet/lnet/router.c index f8a0788..1f31194 100644 --- a/lnet/lnet/router.c +++ b/lnet/lnet/router.c @@ -626,10 +626,10 @@ lnet_get_route(int idx, __u32 *net, __u32 *hops, } void -lnet_swap_pinginfo(lnet_ping_info_t *info) +lnet_swap_pinginfo(struct lnet_ping_info *info) { int i; - lnet_ni_status_t *stat; + struct lnet_ni_status *stat; __swab32s(&info->pi_magic); __swab32s(&info->pi_features); @@ -650,7 +650,7 @@ lnet_swap_pinginfo(lnet_ping_info_t *info) static void lnet_parse_rc_info(lnet_rc_data_t *rcd) { - lnet_ping_info_t *info = rcd->rcd_pinginfo; + struct lnet_ping_info *info = rcd->rcd_pinginfo; struct lnet_peer *gw = rcd->rcd_gateway; lnet_route_t *rte; @@ -689,7 +689,7 @@ lnet_parse_rc_info(lnet_rc_data_t *rcd) } for (i = 0; i < info->pi_nnis && i < LNET_MAX_RTR_NIS; i++) { - lnet_ni_status_t *stat = &info->pi_ni[i]; + struct lnet_ni_status *stat = &info->pi_ni[i]; lnet_nid_t nid = stat->ns_nid; if (nid == LNET_NID_ANY) { @@ -899,7 +899,7 @@ static lnet_rc_data_t * lnet_create_rc_data_locked(lnet_peer_t *gateway) { lnet_rc_data_t *rcd = NULL; - lnet_ping_info_t *pi; + struct lnet_ping_info *pi; int rc; int i; diff --git a/lnet/selftest/conrpc.c b/lnet/selftest/conrpc.c index 014fe58..1d09d40 100644 --- a/lnet/selftest/conrpc.c +++ b/lnet/selftest/conrpc.c @@ -699,17 +699,17 @@ lstcon_statrpc_prep(lstcon_node_t *nd, unsigned feats, lstcon_rpc_t **crpc) return 0; } -static lnet_process_id_packed_t * +static struct lnet_process_id_packed * lstcon_next_id(int idx, int nkiov, lnet_kiov_t *kiov) { - lnet_process_id_packed_t *pid; + struct lnet_process_id_packed *pid; int i; i = idx / SFW_ID_PER_PAGE; LASSERT (i < nkiov); - pid = (lnet_process_id_packed_t *)page_address(kiov[i].kiov_page); + pid = (struct lnet_process_id_packed *)page_address(kiov[i].kiov_page); return &pid[idx % SFW_ID_PER_PAGE]; } @@ -718,7 +718,7 @@ static int lstcon_dstnodes_prep(lstcon_group_t *grp, int idx, int dist, int span, int nkiov, lnet_kiov_t *kiov) { - lnet_process_id_packed_t *pid; + struct lnet_process_id_packed *pid; lstcon_ndlink_t *ndl; lstcon_node_t *nd; int start; @@ -823,7 +823,7 @@ lstcon_testrpc_prep(lstcon_node_t *nd, int transop, unsigned feats, npg = sfw_id_pages(test->tes_span); nob = (feats & LST_FEAT_BULK_LEN) == 0 ? npg * PAGE_SIZE : - sizeof(lnet_process_id_packed_t) * test->tes_span; + sizeof(struct lnet_process_id_packed) * test->tes_span; } rc = lstcon_rpc_prep(nd, SRPC_SERVICE_TEST, feats, npg, nob, crpc); diff --git a/lnet/selftest/framework.c b/lnet/selftest/framework.c index e5e302a..ae43d09 100644 --- a/lnet/selftest/framework.c +++ b/lnet/selftest/framework.c @@ -788,14 +788,14 @@ sfw_add_test_instance (sfw_batch_t *tsb, srpc_server_rpc_t *rpc) LASSERT (bk != NULL); LASSERT (bk->bk_niov * SFW_ID_PER_PAGE >= (unsigned int)ndest); LASSERT((unsigned int)bk->bk_len >= - sizeof(lnet_process_id_packed_t) * ndest); + sizeof(struct lnet_process_id_packed) * ndest); sfw_unpack_addtest_req(msg); memcpy(&tsi->tsi_u, &req->tsr_u, sizeof(tsi->tsi_u)); for (i = 0; i < ndest; i++) { - lnet_process_id_packed_t *dests; - lnet_process_id_packed_t id; + struct lnet_process_id_packed *dests; + struct lnet_process_id_packed id; int j; dests = page_address(bk->bk_iovs[i / SFW_ID_PER_PAGE].kiov_page); @@ -1179,7 +1179,7 @@ sfw_add_test (srpc_server_rpc_t *rpc) len = npg * PAGE_SIZE; } else { - len = sizeof(lnet_process_id_packed_t) * + len = sizeof(struct lnet_process_id_packed) * request->tsr_ndest; } diff --git a/lnet/selftest/selftest.h b/lnet/selftest/selftest.h index 6017704..970f130 100644 --- a/lnet/selftest/selftest.h +++ b/lnet/selftest/selftest.h @@ -387,7 +387,7 @@ typedef struct sfw_test_instance { /* XXX: trailing (PAGE_SIZE % sizeof(lnet_process_id_t)) bytes at * the end of pages are not used */ #define SFW_MAX_CONCUR LST_MAX_CONCUR -#define SFW_ID_PER_PAGE (PAGE_SIZE / sizeof(lnet_process_id_packed_t)) +#define SFW_ID_PER_PAGE (PAGE_SIZE / sizeof(struct lnet_process_id_packed)) #define SFW_MAX_NDESTS (LNET_MAX_IOV * SFW_ID_PER_PAGE) #define sfw_id_pages(n) (((n) + SFW_ID_PER_PAGE - 1) / SFW_ID_PER_PAGE) diff --git a/lnet/utils/wirecheck.c b/lnet/utils/wirecheck.c index 427f140..2d5d1b2 100644 --- a/lnet/utils/wirecheck.c +++ b/lnet/utils/wirecheck.c @@ -93,11 +93,11 @@ do { \ } while (0) void -check_lnet_handle_wire (void) +check_lnet_handle_wire(void) { - CHECK_STRUCT (lnet_handle_wire_t); - CHECK_MEMBER (lnet_handle_wire_t, wh_interface_cookie); - CHECK_MEMBER (lnet_handle_wire_t, wh_object_cookie); + CHECK_STRUCT(struct lnet_handle_wire); + CHECK_MEMBER(struct lnet_handle_wire, wh_interface_cookie); + CHECK_MEMBER(struct lnet_handle_wire, wh_object_cookie); } void -- 1.8.3.1