Add a msg_type field to the lnet_event structure. This makes
it possible for an event handler to tell whether LNET_EVENT_SEND
corresponds to a GET or a PUT message.
Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: If9ecc42c26eb078c19697f399a17f80b2e225639
Reviewed-on: https://review.whamcloud.com/25785
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
*/
__u64 hdr_data;
/**
+ * The message type, to ensure a handler for LNET_EVENT_SEND can
+ * distinguish between LNET_MSG_GET and LNET_MSG_PUT.
+ */
+ __u32 msg_type;
+ /**
* Indicates the completion status of the operation. It's 0 for
* successful operations, otherwise it's an error code.
*/
LASSERT(!msg->msg_routing);
ev->type = ev_type;
+ ev->msg_type = msg->msg_type;
if (ev_type == LNET_EVENT_SEND) {
/* event for active message */
ev->source.nid = LNET_NID_ANY;
ev->source.pid = the_lnet.ln_pid;
ev->sender = LNET_NID_ANY;
-
} else {
/* event for passive message */
ev->target.pid = hdr->dest_pid;