File: efadv_create_cq.3.md

package info (click to toggle)
rdma-core 56.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 17,196 kB
  • sloc: ansic: 171,361; python: 13,724; sh: 2,774; perl: 1,465; makefile: 73
file content (91 lines) | stat: -rw-r--r-- 2,109 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
layout: page
title: EFADV_CREATE_CQ
section: 3
tagline: Verbs
date: 2021-01-04
header: "EFA Direct Verbs Manual"
footer: efa
---

# NAME

efadv_create_cq - Create EFA specific Completion Queue (CQ)

# SYNOPSIS

```c
#include <infiniband/efadv.h>

struct ibv_cq_ex *efadv_create_cq(struct ibv_context *context,
				  struct ibv_cq_init_attr_ex *attr_ex,
				  struct efadv_cq_init_attr *efa_attr,
				  uint32_t inlen);

static inline int efadv_wc_read_sgid(struct efadv_cq *efadv_cq,
				     union ibv_gid *sgid);
```

# DESCRIPTION

**efadv_create_cq()** creates a Completion Queue (CQ) with specific driver
properties.

The argument attr_ex is an ibv_cq_init_attr_ex struct,
as defined in <infiniband/verbs.h>.

The EFADV work completions APIs (efadv_wc_\*) is an extension for IBV work
completions API (ibv_wc_\*) with efa specific features for polling fields in
the completion. This may be used together with or without ibv_wc_* calls.

Use efadv_cq_from_ibv_cq_ex() to get the efadv_cq for accessing the work
completion interface.

Compatibility is handled using the comp_mask and inlen fields.

```c
struct efadv_cq_init_attr {
	uint64_t comp_mask;
	uint64_t wc_flags;
};
```

*inlen*
:	In: Size of struct efadv_cq_init_attr.

*comp_mask*
:	Compatibility mask.

*wc_flags*
:       A bitwise OR of the various values described below.

	EFADV_WC_EX_WITH_SGID:
		if source AH is unknown, require sgid in WC.

	EFADV_WC_EX_WITH_IS_UNSOLICITED:
		request for an option to check whether a receive WC is unsolicited.


# Completion iterator functions

*efadv_wc_read_sgid*
:	Get the source GID field from the current completion.
	If the AH is known, a negative error value is returned.

*efadv_wc_is_unsolicited*
:	Check whether it's an unsolicited receive completion that has no matching work request.
	This function is available if the CQ was created with EFADV_WC_EX_WITH_IS_UNSOLICITED.


# RETURN VALUE

efadv_create_cq() returns a pointer to the created extended CQ, or NULL if the
request fails.

# SEE ALSO

**efadv**(7), **ibv_create_cq_ex**(3)

# AUTHORS

Daniel Kranzdorf <dkkranzd@amazon.com>