case 0:
case -EAGAIN:
KFILND_EP_DEBUG(ep,
- "Transaction ID %p: %s tagged send of with tag 0x%x to peer 0x%llx: rc=%d",
+ "TN %p: %s tagged send of with tag 0x%x to peer 0x%llx: rc=%d",
tn, rc ? "Failed to post" : "Posted",
tn->tn_response_mr_key, tn->tn_target_addr, rc);
break;
default:
KFILND_EP_ERROR(ep,
- "Transaction ID %p: Failed to post tagged send with tag 0x%x to peer 0x%llx: rc=%d",
+ "TN %p: Failed to post tagged send with tag 0x%x to peer 0x%llx: rc=%d",
tn, tn->tn_response_mr_key,
tn->tn_target_addr, rc);
}
case 0:
case -EAGAIN:
KFILND_EP_DEBUG(ep,
- "Transaction ID %p: %s tagged recv of %u bytes (%u frags) with tag 0x%llx: rc=%d",
+ "TN %p: %s tagged recv of %u bytes (%u frags) with tag 0x%llx: rc=%d",
tn, rc ? "Failed to post" : "Posted",
tn->tn_nob, tn->tn_num_iovec, msg.tag, rc);
break;
default:
KFILND_EP_ERROR(ep,
- "Transaction ID %p: Failed to post tagged recv of %u bytes (%u frags) with tag 0x%llx: rc=%d",
+ "TN %p: Failed to post tagged recv of %u bytes (%u frags) with tag 0x%llx: rc=%d",
tn, tn->tn_nob, tn->tn_num_iovec, msg.tag, rc);
}
case 0:
case -EAGAIN:
KFILND_EP_DEBUG(ep,
- "Transaction ID %p: %s send of %lu bytes to peer 0x%llx: rc=%d",
+ "TN %p: %s send of %lu bytes to peer 0x%llx: rc=%d",
tn, rc ? "Failed to post" : "Posted",
len, tn->tn_target_addr, rc);
break;
default:
KFILND_EP_ERROR(ep,
- "Transaction ID %p: Failed to post send of %lu bytes to peer 0x%llx: rc=%d",
+ "TN %p: Failed to post send of %lu bytes to peer 0x%llx: rc=%d",
tn, len, tn->tn_target_addr, rc);
}
struct kfilnd_msg *rx_msg, int msg_size)
{
struct kfilnd_transaction *tn;
+ struct kfilnd_ep *ep = bufdesc->immed_end;
bool alloc_msg = true;
int rc;
enum tn_events event = TN_EVENT_RX_HELLO;
+ enum kfilnd_msg_type msg_type;
/* Increment buf ref count for this work */
atomic_inc(&bufdesc->immed_ref);
/* Unpack the message */
- rc = kfilnd_tn_unpack_msg(bufdesc->immed_end, rx_msg, msg_size);
+ rc = kfilnd_tn_unpack_msg(ep, rx_msg, msg_size);
if (rc || CFS_FAIL_CHECK(CFS_KFI_FAIL_MSG_UNPACK)) {
kfilnd_ep_imm_buffer_put(bufdesc);
- KFILND_EP_ERROR(bufdesc->immed_end,
- "Failed to unpack message %d", rc);
+ KFILND_EP_ERROR(ep, "Failed to unpack message %d", rc);
return;
}
- switch ((enum kfilnd_msg_type)rx_msg->type) {
+ msg_type = (enum kfilnd_msg_type)rx_msg->type;
+
+ switch (msg_type) {
case KFILND_MSG_IMMEDIATE:
case KFILND_MSG_BULK_PUT_REQ:
case KFILND_MSG_BULK_GET_REQ:
* Allocate a Tn structure, set its values, then launch the
* receive.
*/
- tn = kfilnd_tn_alloc(bufdesc->immed_end->end_dev,
- bufdesc->immed_end->end_cpt,
+ tn = kfilnd_tn_alloc(ep->end_dev, ep->end_cpt,
rx_msg->srcnid, alloc_msg, false,
false);
if (IS_ERR(tn)) {
kfilnd_ep_imm_buffer_put(bufdesc);
- KFILND_EP_ERROR(bufdesc->immed_end,
- "Failed to allocate transaction struct: rc=%ld",
+ KFILND_EP_ERROR(ep,
+ "Failed to allocate transaction struct: rc=%ld",
PTR_ERR(tn));
return;
}
tn->tn_rx_msg.msg = rx_msg;
tn->tn_rx_msg.length = msg_size;
tn->tn_posted_buf = bufdesc;
+ tn->msg_type = msg_type;
- KFILND_EP_DEBUG(bufdesc->immed_end, "%s transaction ID %u",
- msg_type_to_str((enum kfilnd_msg_type)rx_msg->type),
+ KFILND_EP_DEBUG(ep, "%s TN %p tmk %u",
+ msg_type_to_str(tn->msg_type), tn,
tn->tn_mr_key);
break;
default:
- KFILND_EP_ERROR(bufdesc->immed_end,
- "Unhandled kfilnd message type: %d",
- (enum kfilnd_msg_type)rx_msg->type);
+ KFILND_EP_ERROR(ep, "Unhandled kfilnd message type: %d",
+ msg_type);
LBUG();
};
tn->tn_alloc_ts = tn_alloc_ts;
tn->tn_state_ts = ktime_get();
- KFILND_EP_DEBUG(ep, "Transaction ID %u allocated", tn->tn_mr_key);
+ KFILND_EP_DEBUG(ep, "TN %p allocated with tmk %u", tn, tn->tn_mr_key);
return tn;