[ewg] Re: [PATCH 11/14 v2] nes: OpenFabrics kernel verbs

Roland Dreier rdreier at cisco.com
Wed Oct 31 13:56:04 PDT 2007


 > +/**
 > + * 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.



More information about the ewg mailing list