Skip to content

Commit 5321d80

Browse files
authored
Merge pull request #1646 from amzn/cq_doorbell
efa: Extend DV query CQ to return doorbell
2 parents 247966c + 93e224f commit 5321d80

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

providers/efa/efadv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ struct efadv_cq_attr {
127127
uint8_t *buffer;
128128
uint32_t entry_size;
129129
uint32_t num_entries;
130+
uint32_t *doorbell;
130131
};
131132

132133
int efadv_query_cq(struct ibv_cq *ibvcq, struct efadv_cq_attr *attr, uint32_t inlen);

providers/efa/man/efadv_query_cq.3.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ struct efadv_cq_attr {
3333
uint8_t *buffer;
3434
uint32_t entry_size;
3535
uint32_t num_entries;
36+
uint32_t *doorbell;
3637
};
3738
```
3839

@@ -51,6 +52,10 @@ struct efadv_cq_attr {
5152
*num_entries*
5253
: Maximal number of entries in the completion queue.
5354

55+
*doorbell*
56+
: Reverse doorbell used to update the device of polled entries and to
57+
request notifications. NULL when not in use for this Completion Queue.
58+
5459
# RETURN VALUE
5560

5661
**efadv_query_cq()** returns 0 on success, or the value of errno on failure

providers/efa/verbs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,6 +1326,9 @@ int efadv_query_cq(struct ibv_cq *ibvcq, struct efadv_cq_attr *attr, uint32_t in
13261326
attr->entry_size = cq->cqe_size;
13271327
attr->num_entries = ibvcq->cqe;
13281328

1329+
if (vext_field_avail(typeof(*attr), doorbell, inlen))
1330+
attr->doorbell = cq->db;
1331+
13291332
return 0;
13301333
}
13311334

0 commit comments

Comments
 (0)