[ofa-general] [PATCHv4 RFC] Scalable Reliable Connection: API and documentation

Jack Morgenstein jackm at dev.mellanox.co.il
Sat Sep 8 23:29:20 PDT 2007


On Thursday 09 August 2007 10:24, Michael S. Tsirkin wrote:
> +/**
> + * ibv_open_src_domain - open an SRC domain
> + * Returns a reference to an SRC domain.
> + *
> + * @context: Device context
> + * @fd: descriptor for inode associated with the domain
> + *     If fd == -1, no inode is associated with the domain; in this case,
> + *     the only legal value for oflag is O_CREAT
> + *
> + * @oflag: oflag values are constructed by OR-ing flags from the following list
> + *
> + * O_CREAT
> + *     If a domain belonging to device named by context is already associated
> + *     with the inode, this flag has no effect, except as noted under O_EXCL
> + *     below. Otherwise, a new SRC domain is created and is associated with
> + *     inode specified by fd.
> + * 
> + * O_EXCL
> + *     If O_EXCL and O_CREAT are set, open will fail if a domain associated with
> + *     the inode exists. The check for the existence of the domain and creation
> + *     of the domain if it does not exist is atomic with respect to other
> + *     processes executing open with fd naming the same inode.
> + */
> +struct ibv_src_domain *ibv_open_src_domain(struct ibv_context *context,
> +                                          int fd, int oflag);
> 
Michael,

Why do we need the EXCL bit?  If an app wishes to open exclusive, it can just
set fd = -1, and the domain obtained is limited to that process.

Is there some other intent for opening exclusive besides restricting the
obtained domain to a single process?

If we get rid of the EXCL flag, then we can eliminate the oflag parameter.

- Jack
 

 



More information about the general mailing list