[Openib-windows] post_send/post_recv return values
Tzachi Dar
tzachid at mellanox.co.il
Mon Mar 13 12:42:41 PST 2006
> -----Original Message-----
> From: openib-windows-bounces at openib.org
> [mailto:openib-windows-bounces at openib.org] On Behalf Of Fabian Tillier
> Sent: Monday, March 13, 2006 7:43 PM
> To: Yossi Leybovich
> Cc: openib-windows at openib.org; Ami Perlmutter
> Subject: Re: [Openib-windows] post_send/post_recv return values
>
> 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.
>
Please note that checking in the user mode is not enough. Even if we do
perfect work there people can still change our code and attack the
kernel. Therefor, the proxy must be secured in any case.
> - Fab
> _______________________________________________
> openib-windows mailing list
> openib-windows at openib.org
> http://openib.org/mailman/listinfo/openib-windows
>
More information about the ofw
mailing list