- lnet_hdr_t *hdr = &msg->msg_hdr;
- unsigned int mlength = 0;
- unsigned int offset = 0;
- lnet_process_id_t src = {0};
- lnet_handle_wire_t reply_wmd;
- lnet_libmd_t *md;
- int rc;
-
- src.nid = hdr->src_nid;
- src.pid = hdr->src_pid;
-
- /* Convert get fields to host byte order */
- hdr->msg.get.match_bits = le64_to_cpu(hdr->msg.get.match_bits);
- hdr->msg.get.ptl_index = le32_to_cpu(hdr->msg.get.ptl_index);
- hdr->msg.get.sink_length = le32_to_cpu(hdr->msg.get.sink_length);
- hdr->msg.get.src_offset = le32_to_cpu(hdr->msg.get.src_offset);
-
- LNET_LOCK();
-
- rc = lnet_match_md(hdr->msg.get.ptl_index, LNET_MD_OP_GET, src,
- hdr->msg.get.sink_length, hdr->msg.get.src_offset,
- hdr->msg.get.match_bits, msg,
- &mlength, &offset, &md);
- if (rc == LNET_MATCHMD_DROP) {
- CNETERR("Dropping GET from %s portal %d match "LPU64
- " offset %d length %d\n",
- libcfs_id2str(src),
- hdr->msg.get.ptl_index,
- hdr->msg.get.match_bits,
- hdr->msg.get.src_offset,
- hdr->msg.get.sink_length);
- LNET_UNLOCK();
- return ENOENT; /* +ve: OK but no match */
- }
-
- LASSERT (rc == LNET_MATCHMD_OK);