[infiniband] Remove the return status code from MAD handlers
MAD handlers have to set the status fields within the MAD itself anyway, in order to provide a meaningful response MAD; the additional gPXE return status code is just noise. Note that we probably don't need to ever explicitly set the status to IB_MGMT_STATUS_OK, since it should already have this value from the request. (By not explicitly setting the status in this way, we can safely have ib_sma_set_xxx() call ib_sma_get_xxx() in order to generate the GetResponse MAD without worrying that ib_sma_get_xxx() will clear any error status set by ib_sma_set_xxx().)
This commit is contained in:
@@ -139,10 +139,9 @@ void ib_mcast_leave ( struct ib_device *ibdev, struct ib_queue_pair *qp,
|
||||
*
|
||||
* @v gma General management agent
|
||||
* @v mad MAD
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int ib_handle_mc_member_join ( struct ib_gma *gma,
|
||||
union ib_mad *mad ) {
|
||||
static void ib_handle_mc_member_join ( struct ib_gma *gma,
|
||||
union ib_mad *mad ) {
|
||||
struct ib_device *ibdev = gma->ibdev;
|
||||
struct ib_mc_member_record *mc_member_record =
|
||||
&mad->sa.sa_data.mc_member_record;
|
||||
@@ -155,7 +154,7 @@ static int ib_handle_mc_member_join ( struct ib_gma *gma,
|
||||
if ( mad->hdr.status != htons ( IB_MGMT_STATUS_OK ) ) {
|
||||
DBGC ( gma, "GMA %p join failed with status %04x\n",
|
||||
gma, ntohs ( mad->hdr.status ) );
|
||||
return -EINVAL;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Extract MAD parameters */
|
||||
@@ -170,7 +169,7 @@ static int ib_handle_mc_member_join ( struct ib_gma *gma,
|
||||
ntohl ( gid->u.dwords[1] ),
|
||||
ntohl ( gid->u.dwords[2] ),
|
||||
ntohl ( gid->u.dwords[3] ) );
|
||||
return -ENOENT;
|
||||
return;
|
||||
}
|
||||
DBGC ( gma, "GMA %p QPN %lx joined %08x:%08x:%08x:%08x qkey %lx\n",
|
||||
gma, qp->qpn, ntohl ( gid->u.dwords[0] ),
|
||||
@@ -181,10 +180,8 @@ static int ib_handle_mc_member_join ( struct ib_gma *gma,
|
||||
if ( ( rc = ib_modify_qp ( ibdev, qp, IB_MODIFY_QKEY, qkey ) ) != 0 ) {
|
||||
DBGC ( gma, "GMA %p QPN %lx could not modify qkey: %s\n",
|
||||
gma, qp->qpn, strerror ( rc ) );
|
||||
return rc;
|
||||
return;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -192,10 +189,9 @@ static int ib_handle_mc_member_join ( struct ib_gma *gma,
|
||||
*
|
||||
* @v gma General management agent
|
||||
* @v mad MAD
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int ib_handle_mc_member_leave ( struct ib_gma *gma,
|
||||
union ib_mad *mad ) {
|
||||
static void ib_handle_mc_member_leave ( struct ib_gma *gma,
|
||||
union ib_mad *mad ) {
|
||||
struct ib_mc_member_record *mc_member_record =
|
||||
&mad->sa.sa_data.mc_member_record;
|
||||
struct ib_gid *gid;
|
||||
@@ -204,7 +200,7 @@ static int ib_handle_mc_member_leave ( struct ib_gma *gma,
|
||||
if ( mad->hdr.status != htons ( IB_MGMT_STATUS_OK ) ) {
|
||||
DBGC ( gma, "GMA %p leave failed with status %04x\n",
|
||||
gma, ntohs ( mad->hdr.status ) );
|
||||
return -EINVAL;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Extract MAD parameters */
|
||||
@@ -212,8 +208,6 @@ static int ib_handle_mc_member_leave ( struct ib_gma *gma,
|
||||
DBGC ( gma, "GMA %p left %08x:%08x:%08x:%08x\n", gma,
|
||||
ntohl ( gid->u.dwords[0] ), ntohl ( gid->u.dwords[1] ),
|
||||
ntohl ( gid->u.dwords[2] ), ntohl ( gid->u.dwords[3] ) );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Multicast membership record response handler */
|
||||
|
||||
Reference in New Issue
Block a user