From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH/libmlx] Set the ibv_wc.opcode even if the wc is an error wc Date: Wed, 9 Mar 2011 00:04:41 -0700 Message-ID: <20110309070441.GA25213@obsidianresearch.com> References: <20110309042613.GA21606@obsidianresearch.com> <4D771E0F.7040402@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4D771E0F.7040402-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Or Gerlitz Cc: Roland Dreier , "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-rdma@vger.kernel.org On Wed, Mar 09, 2011 at 08:28:31AM +0200, Or Gerlitz wrote: > On 3/9/2011 6:26 AM, Jason Gunthorpe wrote: > >Roland: I don't have a PRM to check if this is correct for the chip, but > >it is definately in line with what the IBA expects to happen here. > Hi Jason, I've been taught that by IBTA if the completion isn't > successful then the only valid WC field is the opcode, isn't that > correct? Did you mean wr_id not opcode? I'd say that 11.4.2.1 supports the view that wr_id and status are the only valid fields. However, the whole error handling architecture that the WC's fit into is based around the idea that you can go from an error WC back to the RQ/SQ that caused the error, correct the situation and resume operation. That requires the opcode indicate at least SEND vs RECV, and that qp_num be valid. Frankly, it makes no sense that only wr_id is valid. The wr_id was taken from a RQ/SQ, so qp_num and opcode must be knowable. mlx4 HW can do this right now, it looks to me like QIB does it already, donno about mthca. I'd say even if you have the view that IBTA says it is not portable, having the information come out is still very useful. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html