[openib-general] [PATCH] ib_mad: Include port number in mad_agent
Hal Rosenstock
Tue Oct 5 12:11:53 PDT 2004
Include port_number in mad_agent
This is to make it easy for the SMI client which needs to know the port
number for received packets (which are associated with MAD agents)
Index: access/ib_mad.c
===================================================================
--- access/ib_mad.c (revision 925)
+++ access/ib_mad.c (working copy)
@@ -214,6 +214,7 @@
mad_agent_priv->agent.context = context;
mad_agent_priv->agent.qp = port_priv->qp[qp_type];
mad_agent_priv->agent.hi_tid = ++ib_mad_client_id;
+ mad_agent_priv->agent.port_num = port_num;
ret2 = add_mad_reg_req(mad_reg_req, mad_agent_priv);
if (ret2) {
Index: include/ib_mad.h
===================================================================
--- include/ib_mad.h (revision 924)
+++ include/ib_mad.h (working copy)
@@ -144,6 +144,7 @@
* - Access layer assigned transaction ID for this client.
* Unsolicited MADs sent by this client will have the upper 32-bits
* of their TID set to this value.
+ * - Port number on which QP is registered
*/
struct ib_mad_agent {
struct ib_device *device;
@@ -152,6 +153,7 @@
ib_mad_send_handler send_handler;
void *context;
u32 hi_tid;
+ u8 port_num;
};
/**
More information about the openib-general mailing list