summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2009-07-10 23:31:40 +0200
committerMichael Brown2009-07-18 00:06:35 +0200
commit773028d34e8b5fd2a707b7bccda144dcedb771e1 (patch)
tree2e211458af3e79855e655b2429df5f2a719b1d27 /src/include
parent[infiniband] Remove the return status code from MAD handlers (diff)
downloadipxe-773028d34e8b5fd2a707b7bccda144dcedb771e1.tar.gz
ipxe-773028d34e8b5fd2a707b7bccda144dcedb771e1.tar.xz
ipxe-773028d34e8b5fd2a707b7bccda144dcedb771e1.zip
[infiniband] Allow MAD handlers to indicate response via return value
Now that MAD handlers no longer return a status code, we can allow them to return a pointer to a MAD structure if and only if they want to send a response. This provides a more natural and flexible approach than using a "response method" field within the handler's descriptor.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/ib_gma.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/include/gpxe/ib_gma.h b/src/include/gpxe/ib_gma.h
index c549dfcb4..1b33514ba 100644
--- a/src/include/gpxe/ib_gma.h
+++ b/src/include/gpxe/ib_gma.h
@@ -26,20 +26,15 @@ struct ib_gma_handler {
uint8_t class_version;
/** Method */
uint8_t method;
- /** Response method, or zero */
- uint8_t resp_method;
/** Attribute (in network byte order) */
uint16_t attr_id;
/** Handle attribute
*
- * @v gma General management agent
- * @v mad MAD
- *
- * The handler should modify the MAD as applicable. If the
- * handler returns with a non-zero value in the MAD's @c
- * method field, it will be sent as a response.
+ * @v gma General management agent
+ * @v mad MAD
+ * @ret response MAD response, or NULL to send no response
*/
- void ( * handle ) ( struct ib_gma *gma, union ib_mad *mad );
+ union ib_mad * ( * handle ) ( struct ib_gma *gma, union ib_mad *mad );
};
/** GMA attribute handlers */