[openib-general] [PATCH]remove redundant assignment in ib_post_send_mad()

Hal Rosenstock halr at voltaire.com
Mon Nov 1 15:39:59 PST 2004


On Mon, 2004-11-01 at 18:06, Sean Hefty wrote:
> It raises an issue with the current code, though.  There are checks for
> a valid mad_agent, valid_wr, but not a valid *bad_send_wr.  I'm
> wondering if we should convert these checks to BUG_ON, or add in a check
> for a *bad_send_wr.  

I don't think this is an "or". A check for *bad_send_wr should be added
(which might be changed based on the below question). I will post a
patch for this. IMO these should be BUG_ON but just errors as these are
localized coding errors in some client.

> As a minor optimization, we could make bad_send_wr
> optional for cases where only a single work request is being posted.

If *bad_send_wr is to be validated, the only time when NULL is allowed
is when there is only one send_wr. Wouldn't this nullify any savings
(unless the validation is removed) ?

-- Hal





More information about the general mailing list