[ofa-general] Re: RFC: SRC API

Roland Dreier rdreier at cisco.com
Fri Aug 3 11:10:18 PDT 2007


 > - manage SRC domains

OK, I guess, but why do we need so many functions to create, share,
get shared, put SRC domains?

How about just two functions:

	struct ibv_src_domain *ibv_open_src_domain(struct ibv_context *context,
						   int fd, int oflag);

where oflag is 0 or some combination of O_CREAT and O_EXCL, and:

	int ibv_close_src_domain(struct ibv_src_domain);


Is there some case where explicitly unsharing an SRC domain is useful
that can't be dealt with just by unlinking whatever file was used to
create it?  Other processes might be left with open file descriptors
pointing to that file, but they could have already gotten the src
domain anyway.

 > - I envision implementing this sharing mechanism in kernel by means
 >   of a per-device tree, with inode as a key and domain object
 >   as a value.

Is the inode or the file descriptor the key?  Earlier you wrote

 > 1:1 association between an SRC domain and a file.

so there's some ambiguity.

Also, what's the lifetime of SRC domains?  Are they implicitly
destroyed when all processes with a reference exit?

 - R.



More information about the general mailing list