Commit 4d237d63 authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman

staging: lustre: lnet: change lnet_event_kind_t to proper enum

Change lnet_event_kind_t from typedef to proper enum.
Signed-off-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/20831Reviewed-by: default avatarOlaf Weber <olaf@sgi.com>
Reviewed-by: default avatarDoug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9abb7422
...@@ -147,7 +147,7 @@ int LNetMDUnlink(struct lnet_handle_md md_in); ...@@ -147,7 +147,7 @@ int LNetMDUnlink(struct lnet_handle_md md_in);
* event that is deposited into the EQ. * event that is deposited into the EQ.
* *
* In addition to the lnet_handle_eq, the LNet API defines two types * In addition to the lnet_handle_eq, the LNet API defines two types
* associated with events: The ::lnet_event_kind_t defines the kinds of events * associated with events: The ::lnet_event_kind defines the kinds of events
* that can be stored in an EQ. The lnet_event defines a structure that * that can be stored in an EQ. The lnet_event defines a structure that
* holds the information about with an event. * holds the information about with an event.
* *
......
...@@ -486,7 +486,7 @@ void lnet_msg_attach_md(struct lnet_msg *msg, struct lnet_libmd *md, ...@@ -486,7 +486,7 @@ void lnet_msg_attach_md(struct lnet_msg *msg, struct lnet_libmd *md,
unsigned int offset, unsigned int mlen); unsigned int offset, unsigned int mlen);
void lnet_msg_detach_md(struct lnet_msg *msg, int status); void lnet_msg_detach_md(struct lnet_msg *msg, int status);
void lnet_build_unlink_event(struct lnet_libmd *md, struct lnet_event *ev); void lnet_build_unlink_event(struct lnet_libmd *md, struct lnet_event *ev);
void lnet_build_msg_event(struct lnet_msg *msg, lnet_event_kind_t ev_type); void lnet_build_msg_event(struct lnet_msg *msg, enum lnet_event_kind ev_type);
void lnet_msg_commit(struct lnet_msg *msg, int cpt); void lnet_msg_commit(struct lnet_msg *msg, int cpt);
void lnet_msg_decommit(struct lnet_msg *msg, int cpt, int status); void lnet_msg_decommit(struct lnet_msg *msg, int cpt, int status);
......
...@@ -523,7 +523,7 @@ typedef struct bio_vec lnet_kiov_t; ...@@ -523,7 +523,7 @@ typedef struct bio_vec lnet_kiov_t;
/** /**
* Six types of events can be logged in an event queue. * Six types of events can be logged in an event queue.
*/ */
typedef enum { enum lnet_event_kind {
/** An incoming GET operation has completed on the MD. */ /** An incoming GET operation has completed on the MD. */
LNET_EVENT_GET = 1, LNET_EVENT_GET = 1,
/** /**
...@@ -559,7 +559,7 @@ typedef enum { ...@@ -559,7 +559,7 @@ typedef enum {
* \see LNetMDUnlink * \see LNetMDUnlink
*/ */
LNET_EVENT_UNLINK, LNET_EVENT_UNLINK,
} lnet_event_kind_t; };
#define LNET_SEQ_BASETYPE long #define LNET_SEQ_BASETYPE long
typedef unsigned LNET_SEQ_BASETYPE lnet_seq_t; typedef unsigned LNET_SEQ_BASETYPE lnet_seq_t;
...@@ -580,7 +580,7 @@ struct lnet_event { ...@@ -580,7 +580,7 @@ struct lnet_event {
*/ */
lnet_nid_t sender; lnet_nid_t sender;
/** Indicates the type of the event. */ /** Indicates the type of the event. */
lnet_event_kind_t type; enum lnet_event_kind type;
/** The portal table index specified in the request */ /** The portal table index specified in the request */
unsigned int pt_index; unsigned int pt_index;
/** A copy of the match bits specified in the request. */ /** A copy of the match bits specified in the request. */
......
...@@ -1987,7 +1987,7 @@ lnet_recv_delayed_msg_list(struct list_head *head) ...@@ -1987,7 +1987,7 @@ lnet_recv_delayed_msg_list(struct list_head *head)
* \retval -ENOMEM Memory allocation failure. * \retval -ENOMEM Memory allocation failure.
* \retval -ENOENT Invalid MD object. * \retval -ENOENT Invalid MD object.
* *
* \see lnet_event::hdr_data and lnet_event_kind_t. * \see lnet_event::hdr_data and lnet_event_kind.
*/ */
int int
LNetPut(lnet_nid_t self, struct lnet_handle_md mdh, lnet_ack_req_t ack, LNetPut(lnet_nid_t self, struct lnet_handle_md mdh, lnet_ack_req_t ack,
......
...@@ -54,7 +54,7 @@ lnet_build_unlink_event(struct lnet_libmd *md, struct lnet_event *ev) ...@@ -54,7 +54,7 @@ lnet_build_unlink_event(struct lnet_libmd *md, struct lnet_event *ev)
* Don't need any lock, must be called after lnet_commit_md * Don't need any lock, must be called after lnet_commit_md
*/ */
void void
lnet_build_msg_event(struct lnet_msg *msg, lnet_event_kind_t ev_type) lnet_build_msg_event(struct lnet_msg *msg, enum lnet_event_kind ev_type)
{ {
struct lnet_hdr *hdr = &msg->msg_hdr; struct lnet_hdr *hdr = &msg->msg_hdr;
struct lnet_event *ev = &msg->msg_ev; struct lnet_event *ev = &msg->msg_ev;
......
...@@ -144,7 +144,7 @@ enum srpc_event_type { ...@@ -144,7 +144,7 @@ enum srpc_event_type {
/* RPC event */ /* RPC event */
struct srpc_event { struct srpc_event {
enum srpc_event_type ev_type; /* what's up */ enum srpc_event_type ev_type; /* what's up */
lnet_event_kind_t ev_lnet; /* LNet event type */ enum lnet_event_kind ev_lnet; /* LNet event type */
int ev_fired; /* LNet event fired? */ int ev_fired; /* LNet event fired? */
int ev_status; /* LNet event status */ int ev_status; /* LNet event status */
void *ev_data; /* owning server/client RPC */ void *ev_data; /* owning server/client RPC */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment