[openib-general] OpenSM: search_mgrp_by_mgid questions

Hal Rosenstock halr at voltaire.com
Thu Dec 1 06:52:57 PST 2005


Hi Yael,

osm_sa_path_record.c::__search_mgrp_by_mgid has the following:

  p_recvd_mgid = p_ctxt->p_mgid;
  p_rcv = p_ctxt->p_rcv;

  /* Why not compare the entire MGID ???? */
  /* different scope can sneak in for the same MGID ? */
  /* EZ: I changed it to full compare ! */
  if (cl_memcmp(&p_mgrp->mcmember_rec.mgid,
                p_recvd_mgid,
                sizeof(ib_gid_t)))
    return;

whereas osm_sa_mcmember_record.c::__search_mgrp_by_mgid has the
following:

  p_recvd_mcmember_rec = p_ctxt->p_mcmember_rec;
  p_rcv = p_ctxt->p_rcv;

  /* ignore groups marked for deletion */
  if (p_mgrp->to_be_deleted)
    return;

  /* compare entire MGID so different scope will not sneak in for
     the same MGID */
  if (cl_memcmp(&p_mgrp->mcmember_rec.mgid,
                &p_recvd_mcmember_rec->mgid,
                sizeof(ib_gid_t)))
    return;

Shouldn't the SA PR code also check for "to be deleted" ? It also seems
like the comments on the MGID comparison should also be made the same.

-- Hal





More information about the general mailing list