Subject: [ofa-general] Re: [PATCH 11/14 v2] nes: OpenFabrics kernel verbs

From: Roland Dreier <[email-masked]>
Date: Wed, 31 Oct 2007 13:56:04 -0700

> +/**
 > + * nes_post_send
 > + */
 > +static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr,
 > +		struct ib_send_wr **bad_wr)

 > ...

 > +			switch (ib_wr->opcode) {

 > ...

 > +					if (ib_wr->num_sge > nesdev->nesadapter->max_sge) {
 > +						err = -EINVAL;
 > +						break;
 > +					}

 > ...

 > +				default:
 > +					/* error */
 > +					err = -EINVAL;
 > +					break;

looks like if you detect an error while posting a work request, you
break out of the switch statement but just continue through the while
loop going through the list of work reuqests.  Which doesn't seem like
it will work very well.