[ofw] changes to ib_wc committed to svn

Sean Hefty sean.hefty at intel.com
Wed Jul 23 13:50:35 PDT 2008


I must have missed seeing the patch to review the following change to ib_wc:

typedef struct _ib_wc
{
	TO_LONG_PTR(struct _ib_wc*, p_next);
	uint64_t				wr_id;
	ib_wc_type_t			wc_type;

	uint32_t				length;
	ib_wc_status_t			status;
-	uint64_t				vendor_specific;
+	struct {
+		uint8_t				vendor_specific;
+		uint8_t				csum_ok;
+		uint16_t			vendor_specific2;
+		uint32_t			vendor_specific3;
+	};


Why was this done?  This splits vendor_specific from a single 64-bit field into
3 non-contiguous fields, and consumes 8 bits for a 1 bit flag.  Why not leave
this as a uint64_t, with a vendor defined flag indicating if the check sum was
valid?  Or just use the ib_recv_opt_t flags that already exist, if this is truly
not a vendor specific value?

This structure is visible to userspace applications, so keeping it free of ipoib
specific information is ideal.

- Sean




More information about the ofw mailing list