---
name: "rpma_conn_cfg_set_srq"
section: "3"
platform: "linux"
package: "librpma-dev"
version: "1.3.0-2+b3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rpma_conn_cfg_set_srq"
---

# rpma\_conn\_cfg\_set\_srq(3)

set a shared RQ object for the connection

## NAME

**rpma\_conn\_cfg\_set\_srq** - set a shared RQ object for the connection

## SYNOPSIS

```
      #include <librpma.h>
      struct rpma_conn_cfg;
      struct rpma_srq;
      int rpma_conn_cfg_set_srq(struct rpma_conn_cfg *cfg, struct rpma_srq *srq);
```

## DESCRIPTION

**rpma\_conn\_cfg\_set\_srq**() sets a shared RQ object for the connection. If this function is not called, the srq has the default value (NULL) set by [**rpma\_conn\_cfg\_new**(3)](/rpma_conn_cfg_new/3.md).

## RETURN VALUE

The **rpma\_conn\_cfg\_set\_srq**() function returns 0 on success or a negative error code on failure.

## ERRORS

**rpma\_conn\_cfg\_set\_srq**() can fail with the following error:

- •

  RPMA\_E\_INVAL - cfg is NULL

## SEE ALSO

[**rpma\_conn\_cfg\_new**(3)](/rpma_conn_cfg_new/3.md), [**rpma\_conn\_cfg\_get\_srq**(3)](/rpma_conn_cfg_get_srq/3.md), [**librpma**(7)](/librpma/7.md) and https://pmem.io/rpma/
