[ofw] change layout of ib_send_wr for winof 2.0

Sean Hefty sean.hefty at intel.com
Fri May 23 14:38:14 PDT 2008


Unless we separate the atomic operations into a new named structure, a simple
cast doesn't always work.  So at least any code using atomics would need a
slight modification.  If I change ib_send_wr in my tree to:

typedef struct _ib_send_wr
{
	uint64_t					wr_id;
	struct _ib_send_wr*			p_next;
	ib_local_ds_t*				ds_array;
	uint32_t					num_ds;
	ib_send_opt_t				send_opt;
	ib_wr_type_t				wr_type;
	ib_net32_t					immediate_data;

	union
	{
		union _send_dgrm
		{
			struct _send_ud
			{
				ib_av_handle_t h_av; 
				ib_net32_t		remote_qp;
				ib_net32_t		remote_qkey;
				void*			rsvd;
				uint16_t		pkey_index;

			}	ud;

			struct _send_rd
			{
				ib_net32_t		remote_qp;
				ib_net32_t		remote_qkey;
				ib_net32_t		eecn;

			}	rd;

			struct _send_raw_ether
			{
				ib_net16_t		dest_lid;
				uint8_t			path_bits;
				uint8_t			sl;
				uint8_t			max_static_rate;
				ib_net16_t		ether_type;

			}	raw_ether;

			struct _send_raw_ipv6
			{
				ib_net16_t		dest_lid;
				uint8_t			path_bits;
				uint8_t			sl;
				uint8_t			max_static_rate;

			}	raw_ipv6;

		}	dgrm;

		struct _send_remote_ops
		{
			uint64_t			vaddr;
			net32_t				rkey;

		}	remote_ops;

		struct _send_atomic_ops
		{
			uint64_t			vaddr;
			ib_net64_t			atomic1;
			ib_net64_t			atomic2;
			net32_t				rkey;

		}	atomic_ops;
	};
}	ib_send_wr_t;

Then only a uDAPL header file, plus the HW drivers/libraries need updating.

- Sean




More information about the ofw mailing list