Re: [PATCH RFC rdma-core 1/5] verbs: Introduce thread domain and its related verbs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/14/2017 9:17 PM, Jason Gunthorpe wrote:
On Tue, Nov 14, 2017 at 10:26:16AM +0200, Yishai Hadas wrote:
On 11/13/2017 9:58 PM, Jason Gunthorpe wrote:
On Sun, Nov 12, 2017 at 11:41:39PM +0200, Yishai Hadas wrote:

+struct ibv_td {
+	struct ibv_context     *context;
+};

As much as possible, I would like to see any new objects be 'opaque'
to the application, so this should just be

struct ibv_td;

And ibv_td should be defined in driver.h or something

This avoids leaking internal details and means we don't have to commit
to an ABI for the insides of these structs.


ibv_td should expose in verbs.h the 'context' as the inline function
ibv_alloc_td() needs it to get the verbs_context and call the driver
function if was set.

You mean ibv_dealloc_td, OK..

Related to my other point, ibv_alloc_td should probably accept a
ibv_pd as an argument instead.


Why ibv_alloc_td() should get an ibv_pd ? do you have a typo here ?

The expected API for ibv_alloc_td() as was previously discussed expects to be as follows:

struct ibv_td {
	struct ibv_context     *context;
};

struct ibv_td_init_attr {	
	uint32_t comp_mask;
};

struct ibv_td *ibv_alloc_td(struct ibv_context *context,
                            struct ibv_td_init_attr *attr);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux