Lines Matching defs:context
1396 sol_ibv_query_gid(struct ibv_context *context, uint8_t port_num, int index,
1405 if (!context || !gid || (index < 0) ||
1427 if (ioctl(context->cmd_fd, UVERBS_IOCTL_GET_GIDS, uverbs_gidp) != 0) {
1454 sol_ibv_query_pkey(struct ibv_context *context, uint8_t port_num,
1463 if (!context || !pkey || (index < 0) ||
1467 if (context->cmd_fd < 0)
1488 if (ioctl(context->cmd_fd, UVERBS_IOCTL_GET_PKEYS, uverbs_pkeyp) != 0) {
1518 struct ibv_context context;
1524 context.device = device;
1532 if ((context.cmd_fd = open(uverbs_devpath, O_RDWR)) < 0)
1535 ret = ibv_cmd_query_device(&context, attr, &raw_fw_ver, &cmd,
1548 close(context.cmd_fd);
1553 sol_ibv_query_port(struct ibv_context *context, uint8_t port,
1558 return (ibv_cmd_query_port(context, port, attr, &cmd, sizeof (cmd)));