I remembered someone else suggested to use: struct ibv_context { struct ibv_device *device; struct ibv_context_ops ops; int cmd_fd; int async_fd; int num_comp_vectors; pthread_mutex_t mutex; void *abi_compat; struct ibv_context_extra_ops extra_ops; };
Here we don't use pointer for extra_ops, and any future changes are added into 'extra_ops', So why not this way ? Thanks. --CQ > -----Original Message----- > From: Jack Morgenstein [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 16, 2007 11:01 AM > To: [EMAIL PROTECTED] > Cc: Tang, Changqing; Roland Dreier; > ewg@lists.openfabrics.org; [EMAIL PROTECTED] > Subject: Re: [ofa-general] OFED 1.3 Beta release is available > > On Wednesday 05 December 2007 17:45, Tang, Changqing wrote: > > > I think the only alternative we have to preserve backwards > > > compatibility is to leave struct ibv_context_ops alone and change > > > the structure to: > > > > > > struct ibv_context { > > > struct ibv_device *device; > > > struct ibv_context_ops ops; > > > int cmd_fd; > > > int async_fd; > > > int num_comp_vectors; > > > pthread_mutex_t mutex; > > > void *abi_compat; > > > struct ibv_xrc_op *xrc_ops; > > > }; > > > > > > with xrc_ops added at the end. It's my fault for not > making the ops > > > member a pointer I guess. > > > > > > Tziporet/Jack/whoever -- please fix up the libibverbs you > ship for > > > OFED 1.3 to resolve this. > > > > > > We can clean this up for libibverbs 1.2 when the ABI can change, > > > if/when we have something worth breaking the ABI for. > > > > We need to have all userspace libraries set their private > context object to 0 at allocation time (the private context > object includes the ibv_context structure, which must now be > NULL-ed out). > > The other userspace driver libraries (e.g., libmthca) do not > zero-out their internal userspace context structures (e.g., > mthca_context) which include the ibv_context structure as the > first element. > Up to now, we depended on the ibv_context assign to set > unavailable verb implementations to NULL. > (and every userspace driver assigned the ops structure, with > unimplemented operations set to NULL by the compiler). > This is no longer true. > > Thus, anyone installing OFED will have a compatible set of > userspace drivers for XRC applications (drivers which do not > implement XRC will return errors for XRC-verbs). > > Applications which were compiled with previous libraries will > still work (since they do not use XRC). > > - Jack > _______________________________________________ ewg mailing list ewg@lists.openfabrics.org http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg