Skip to content

ibv_destroy_comp_channel()

Contents

5.00 avg. rating (97% score) - 1 vote
int ibv_destroy_comp_channel(struct ibv_comp_channel *channel);

Description

ibv_destroy_comp_channel() destroys a Completion event channel.

The destruction of a Completion event channel will fail if any CQ is still associated with it.

Parameters

Name Direction Description
channel in Completion event channel that was returned from ibv_create_comp_channel()

Return Values

Value Description
0 On success
errno On failure
EBUSY CQs are still associated with this Completion event channel

Examples

Create a Completion event channel and destroy it:

struct ibv_comp_channel *event_channel;
 
event_channel = ibv_create_comp_channel(context);
if (!event_channel) {
	fprintf(stderr, "Error, ibv_create_comp_channel() failed\n");
	return -1;
}
 
if (ibv_destroy_comp_channel(event_channel)) {
	fprintf(stderr, "Error, ibv_destroy_comp_channel() failed\n");
	return -1;
}

FAQs

ibv_destroy_comp_channel() failed, what will happen to the CQs which are associated with it?

Nothing at all. You can continue working with them without any side-effect.

ibv_destroy_comp_channel() failed, can I know which CQs are associated with it and caused this failure?

No, currently the RDMA stack doesn’t have this capability.

Share Our Posts

Share this post through social bookmarks.

  • Delicious
  • Digg
  • Newsvine
  • RSS
  • StumbleUpon
  • Technorati

Comments

Tell us what do you think.

  1. Bernard says: May 12, 2014

    Hi

    Does calling this function remove the need to call close() on the corresponding file descriptor ?

    I'm asking this as I need to know if I should manually de-register the corresponding file descriptor from an epoll instance I previously registered this to.

    thx

    Bernard

    • Dotan Barak says: May 13, 2014

      Hi.

      I didn't work with epoll(), so I can't answer on this
      (you are welcome to share a code which uses epoll, so I'll add it to the post).

      But anyway, since ibv_create_comp_channel() opened the file descriptor of the Completion Event channel,
      ibv_destroy_comp_channel() will close it.

      Thanks
      Dotan

Add a Comment

This comment will be moderated; answer may be provided within 14 days.

Time limit is exhausted. Please reload CAPTCHA.