[openib-general] 3 patches in mst-for-2.6.18

Roland Dreier rdreier at cisco.com
Mon Jul 24 09:45:26 PDT 2006


 > Roland, I have put the following patches in my mst-for-2.6.18 tree:

OK, I have all three.

I updated this:

 >    [PATCH] IB/mad: validate MADs for spec compliance C13-18.1.1

with the following, which uninlines ib_response_mad() for the
following size savings:

   text    data     bss     dec     hex filename
2017675  434628  175844 2628147  281a33 ../vmlinux.orig
2017539  434652  175844 2628035  2819c3 ../vmlinux.noinline

diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 2d4ee3f..1c3cfbb 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -167,6 +167,15 @@ static int is_vendor_method_in_use(
 	return 0;
 }
 
+int ib_response_mad(struct ib_mad *mad)
+{
+	return ((mad->mad_hdr.method & IB_MGMT_METHOD_RESP) ||
+		(mad->mad_hdr.method == IB_MGMT_METHOD_TRAP_REPRESS) ||
+		((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_BM) &&
+		 (mad->mad_hdr.attr_mod & IB_BM_ATTR_MOD_RESP)));
+}
+EXPORT_SYMBOL(ib_response_mad);
+
 /*
  * ib_register_mad_agent - Register to send/receive MADs
  */
diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h
index aebcdaf..585d28e 100644
--- a/include/rdma/ib_mad.h
+++ b/include/rdma/ib_mad.h
@@ -251,13 +251,7 @@ struct ib_mad_send_buf {
  * ib_response_mad - Returns if the specified MAD has been generated in
  *   response to a sent request or trap.
  */
-static inline int ib_response_mad(struct ib_mad *mad)
-{
-	return ((mad->mad_hdr.method & IB_MGMT_METHOD_RESP) ||
-		(mad->mad_hdr.method == IB_MGMT_METHOD_TRAP_REPRESS) ||
-		((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_BM) &&
-		 (mad->mad_hdr.attr_mod & IB_BM_ATTR_MOD_RESP)));
-}
+int ib_response_mad(struct ib_mad *mad);
 
 /**
  * ib_get_rmpp_resptime - Returns the RMPP response time.




More information about the general mailing list