[Openib-windows] post_send/post_recv return values

Fabian Tillier ftillier at silverstorm.com
Mon Mar 13 09:43:14 PST 2006


On 3/13/06, Yossi Leybovich <sleybo at mellanox.co.il> wrote:
> Fab
>
> posting WR with more SGE then the QP capability require the following
> error code in post_send
>    IB_INVALID_MAX_SGE
>
> but in post_recv there is no such return value .
> If we check for the max sge and return such error it should exist in the
> recv flow as well.
> Is this a typo ?

Looking at the exising code, it looks correct, albeit inconsistent. 
In the send path, the code uses the internal error code
HH_E2BIG_SG_NUM, and then translates that to IB_INVALID_MAX_SGE.  In
the receive path, it uses the internal error code HH_EINVAL_SG_NUM.

In either case, the correct IB_INVALID_MAX_SGE return code should be returned.

Am I missing something?

> Actually I prefer to remove all the over head of the error reporting and
> just return invalid param for both (including SGE, WR list length error
> and WR type error )
> what do you think ?

Are you still going to perform the checks?  If so, returning different
error codes should add no overhead at all.  If you want to eliminate
the checks that is another thing.

If we transition some of these to assertions, we need to make sure to
have runtime checks in the proxy or we'll have a security
vulnerability.

- Fab



More information about the ofw mailing list