#include <lnet/lib-lnet.h>
/* NB: add /proc interfaces in upcoming patches */
-int portal_rotor = LNET_PTL_ROTOR_HASH_RT;
-CFS_MODULE_PARM(portal_rotor, "i", int, 0644,
- "redirect PUTs to different cpu-partitions");
+int portal_rotor = LNET_PTL_ROTOR_HASH_RT;
+module_param(portal_rotor, int, 0644);
+MODULE_PARM_DESC(portal_rotor, "redirect PUTs to different cpu-partitions");
static int
lnet_ptl_match_type(unsigned int index, lnet_process_id_t match_id,
mlength = info->mi_rlength;
} else if ((md->md_options & LNET_MD_TRUNCATE) == 0) {
/* this packet _really_ is too big */
- CERROR("Matching packet from %s, match "LPU64
+ CERROR("Matching packet from %s, match %llu"
" length %d too big: %d left, %d allowed\n",
libcfs_id2str(info->mi_id), info->mi_mbits,
info->mi_rlength, md->md_length - offset, mlength);
/* Commit to this ME/MD */
CDEBUG(D_NET, "Incoming %s index %x from %s of "
- "length %d/%d into md "LPX64" [%d] + %d\n",
+ "length %d/%d into md %#llx [%d] + %d\n",
(info->mi_opc == LNET_MD_OP_PUT) ? "put" : "get",
info->mi_portal, libcfs_id2str(info->mi_id), mlength,
info->mi_rlength, md->md_lh.lh_cookie, md->md_niov, offset);
/* if it's a unique portal, return match-table hashed by NID */
return lnet_ptl_is_unique(ptl) ?
- ptl->ptl_mtables[lnet_cpt_of_nid(id.nid)] : NULL;
+ ptl->ptl_mtables[lnet_cpt_of_nid(id.nid, NULL)] : NULL;
}
struct lnet_match_table *
rotor = ptl->ptl_rotor++; /* get round-robin factor */
if (portal_rotor == LNET_PTL_ROTOR_HASH_RT && routed)
- cpt = lnet_cpt_of_nid(msg->msg_hdr.src_nid);
+ cpt = info->mi_cpt;
else
cpt = rotor % LNET_CPT_NUMBER;
LASSERT(lnet_ptl_is_unique(ptl));
hash = hash_long(hash, LNET_MT_HASH_BITS);
- return &mtable->mt_mhash[hash];
+ return &mtable->mt_mhash[hash & LNET_MT_HASH_MASK];
}
}
int rc;
CDEBUG(D_NET, "Request from %s of length %d into portal %d "
- "MB="LPX64"\n", libcfs_id2str(info->mi_id),
+ "MB=%#llx\n", libcfs_id2str(info->mi_id),
info->mi_rlength, info->mi_portal, info->mi_mbits);
if (info->mi_portal >= the_lnet.ln_nportals) {
lnet_ptl_unlock(ptl);
lnet_res_unlock(mtable->mt_cpt);
rc = LNET_MATCHMD_NONE;
- } else {
+ } else {
lnet_res_unlock(mtable->mt_cpt);
rc = lnet_ptl_match_delay(ptl, info, msg);
}
/* LNET_MATCHMD_NONE means msg was added to the delay queue */
if (rc & LNET_MATCHMD_NONE) {
CDEBUG(D_NET,
- "Delaying %s from %s ptl %d MB "LPX64" off %d len %d\n",
+ "Delaying %s from %s ptl %d MB %#llx off %d len %d\n",
info->mi_opc == LNET_MD_OP_PUT ? "PUT" : "GET",
libcfs_id2str(info->mi_id), info->mi_portal,
info->mi_mbits, info->mi_roffset, info->mi_rlength);
list_add_tail(&msg->msg_list, matches);
CDEBUG(D_NET, "Resuming delayed PUT from %s portal %d "
- "match "LPU64" offset %d length %d.\n",
+ "match %llu offset %d length %d.\n",
libcfs_id2str(info.mi_id),
info.mi_portal, info.mi_mbits,
info.mi_roffset, info.mi_rlength);
*
* \param portal Index of the portal to enable the lazy attribute on.
*
- * \retval 0 On success.
+ * \retval 0 On success.
* \retval -EINVAL If \a portal is not a valid index.
*/
int
/* grab all messages which are on the NI passed in */
list_for_each_entry_safe(msg, tmp, &ptl->ptl_msg_delayed,
msg_list) {
- if (msg->msg_rxpeer->lp_ni == ni)
+ if (msg->msg_txni == ni || msg->msg_rxni == ni)
list_move(&msg->msg_list, &zombies);
}
} else {
*
* \param portal Index of the portal to disable the lazy attribute on.
*
- * \retval 0 On success.
+ * \retval 0 On success.
* \retval -EINVAL If \a portal is not a valid index.
*/
int