[openib-general] [PATCH] separates QP0/1 interactions
halr at voltaire.com
Fri Sep 24 08:21:13 PDT 2004
On Thu, 2004-09-23 at 22:59, Sean Hefty wrote:
> >@@ -205,11 +203,12 @@
> > memset(mad_agent_priv, 0, sizeof *mad_agent_priv);
> > mad_agent_priv->reg_req = reg_req;
> > mad_agent_priv->rmpp_version = rmpp_version;
> >+ mad_agent_priv->qp_info = &port_priv->qp_info[qp_type];
> > mad_agent_priv->agent.device = device;
> > mad_agent_priv->agent.recv_handler = recv_handler;
> > mad_agent_priv->agent.send_handler = send_handler;
> > mad_agent_priv->agent.context = context;
> >- mad_agent_priv->agent.qp = port_priv->qp[qp_type];
> >+ mad_agent_priv->agent.qp = port_priv->qp_info[qp_type].qp;
> The use of qp_type as an index is incorrect. Maybe we should change
> ib_verbs.h to set IB_QPT_SMI to 0 and IB_QPT_GSI to 1, so that their types
> match their QP numbers.
Correct. This stems from when those QP types were in a separate special
QP types enum and they were correct then :-( I missed this when special
QP API was eliminated and this was combined with the normal ones.
I'm all for changing these as proposed. It saves a minor amount of code
here. I don't think it matters to mthca.
I will respond to the rest of the comments in a series of responses over
the next few days.
More information about the general