c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * CDDL HEADER START
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * The contents of this file are subject to the terms of the
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Common Development and Distribution License (the "License").
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * You may not use this file except in compliance with the License.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * or http://www.opensolaris.org/os/licensing.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * See the License for the specific language governing permissions
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * and limitations under the License.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * When distributing Covered Code, include this CDDL HEADER in each
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * If applicable, add the following below this CDDL HEADER, with the
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * fields enclosed by brackets "[]" replaced with your own identifying
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * information: Portions Copyright [yyyy] [name of copyright owner]
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * CDDL HEADER END
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#ifndef _SYS_IB_CLIENTS_OF_SOL_UVERBS_SOL_UVERBS_H
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define _SYS_IB_CLIENTS_OF_SOL_UVERBS_SOL_UVERBS_H
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#ifdef __cplusplus
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarextern "C" {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#endif
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * NAME: sol_uverbs.h
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * DESC: Solaris OFED User Verbs Kernel Agent header file.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#include <sys/ib/clients/of/ofed_kernel.h>
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#include <sys/ib/clients/of/rdma/ib_user_verbs.h>
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#include <sys/ib/clients/of/sol_uverbs/sol_uverbs_hca.h>
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#include <sys/ib/clients/of/sol_ofs/sol_ofs_common.h>
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#include <sys/ib/clients/of/sol_uverbs/sol_uverbs2ucma.h>
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Definitions
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_DRIVER_MAX_HCA_MINOR (16)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_DRIVER_EVENT_MINOR (17)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_DRIVER_MAX_MINOR (18)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Structures
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Kernel User Verbs Events.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * User verbs kernel events (asynchronous and completion) representation.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * IBT events are mapped back to OFA events.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef struct uverbs_event {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar union {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct ib_uverbs_async_event_desc async;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct ib_uverbs_comp_event_desc comp;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar } ev_desc;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar llist_head_t ev_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar llist_head_t ev_obj_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t *ev_counter;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar} uverbs_event_t;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Module Context.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * There is a single module context which maintains the list
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * of HCA's retrieved from IBT. A user process indicates the
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * target HCA open via the uverbs unique minor device number
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * associated with the HCA.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef struct {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar kmutex_t lock;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar dev_info_t *dip;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar /*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Underlying IBT HCA Info
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ibt_clnt_modinfo_t clnt_modinfo;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ibt_clnt_hdl_t clnt_hdl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t hca_count;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ib_guid_t *hca_guid_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_uverbs_hca_t *hcas;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar /*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Support user asyncrhonous and completion event delivery via
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * user event filesystem.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar dev_t dev;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar} uverbs_module_context_t;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * User Event File.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Used for delivery of asynchronous and synchronous events to the user.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * An asynchronous event file is created during the allocation of
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * a user verbs consumer context, a completion event file is created
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * when the user verbs consumer creates a completion channel.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef struct uverbs_ufile_uobj {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_t uobj;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar kmutex_t lock;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int ref;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar kcondvar_t poll_wait;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct pollhead poll_head;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar struct uverbs_uctxt_uobj *uctxt;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int is_async;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar llist_head_t event_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_uverbs_cq_ctrl_t ufile_notify_enabled;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t ufile_cq_cnt;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar} uverbs_ufile_uobj_t;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Type of user context -
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_UCTXT_VERBS 0x001
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_UCTXT_EVENT 0x100
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_UCTXT_ASYNC 0x101
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_UCTXT_COMPL 0x110
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * User Context.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * A user context is created when a user process opens a specific minor
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * device. The context maintains a list of resources created by this
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * user that allows the resources to be cleaned up on user close.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef struct uverbs_uctxt_uobj {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_t uobj;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar kmutex_t lock;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uverbs_module_context_t *mod_ctxt;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_uverbs_hca_t *hca; /* short cut to specific hca */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar /*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * List of user resource objects created by this context. The
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * objects themselves live in the associated object table, and
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * the code should use the table to access and use resources.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Any objects that remain in these list will be destroyed at
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * user close to free the associated resources.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * The user context "lock" should be held when invoking
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * routines to manipulate the lists.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar genlist_t pd_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar genlist_t mr_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar genlist_t cq_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar genlist_t qp_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar genlist_t srq_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar genlist_t ah_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar /*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Event filesystem interfaces for IB asyncrhonous events
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * and completion events.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uverbs_ufile_uobj_t *comp_evfile;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uverbs_ufile_uobj_t *async_evfile;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar /*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * User context can be created for :
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * 1. All Verbs API
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * 2. For getting a file for async events.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * 3. For getting a file for completion events.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * For (1) - pointers to (2) & (3) will be updated. For (2) and (3)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * pointer to (1) will be maintained.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint16_t uctxt_type;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t uctxt_verbs_id;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t uctxt_async_id;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t uctxt_comp_id;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t uctxt_free_pending;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar} uverbs_uctxt_uobj_t;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * User PD objects created at PD allocation
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef struct uverbs_upd_uobj {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_t uobj;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ibt_pd_hdl_t pd;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar genlist_entry_t *list_entry; /* per user ctx list entry */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t active_qp_cnt;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t free_pending;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar} uverbs_upd_uobj_t;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * User MR objects created at MR registration
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef struct uverbs_umr_uobj {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_t uobj;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ibt_mr_hdl_t mr;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar genlist_entry_t *list_entry; /* per user ctx list entry */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar} uverbs_umr_uobj_t;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * User CQ objects created at CQ allocation
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef struct uverbs_ucq_uobj {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_t uobj;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ibt_cq_hdl_t cq;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar genlist_entry_t *list_entry; /* per user ctx list entry */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uverbs_uctxt_uobj_t *uctxt;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uverbs_ufile_uobj_t *comp_chan;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t comp_events_reported;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t async_events_reported;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar llist_head_t async_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar llist_head_t comp_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t active_qp_cnt;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t free_pending;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar} uverbs_ucq_uobj_t;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * User Shared Receive CQ objects created at SRQ allocation
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef struct uverbs_usrq_uobj {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_t uobj;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ibt_srq_hdl_t srq;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar genlist_entry_t *list_entry; /* per user ctx list entry */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uverbs_uctxt_uobj_t *uctxt;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t async_events_reported;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar llist_head_t async_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t active_qp_cnt;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t free_pending;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar} uverbs_usrq_uobj_t;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * User address handle objects created at AH allocation
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef struct uverbs_uah_uobj {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_t uobj;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ibt_ah_hdl_t ah;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar genlist_entry_t *list_entry; /* per user ctx list entry */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar} uverbs_uah_uobj_t;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * User QP objects created at QP allocation
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_UQP_RCQ_VALID 0x01
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_UQP_SRQ_VALID 0x02
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef struct uverbs_uqp_uobj {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_t uobj;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ibt_qp_hdl_t qp;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar genlist_entry_t *list_entry; /* per uctx list */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t max_inline_data;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uverbs_uctxt_uobj_t *uctxt;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_num; /* 24 bits valid */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t disable_qp_mod;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar enum ib_qp_type ofa_qp_type;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar llist_head_t mcast_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar llist_head_t async_list;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t async_events_reported;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uverbs_ucq_uobj_t *uqp_rcq;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uverbs_ucq_uobj_t *uqp_scq;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t uqp_pd_hdl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t uqp_scq_hdl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t uqp_rcq_hdl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t uqp_srq_hdl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint8_t uqp_rcq_srq_valid;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_uverbs_qp_free_state_t uqp_free_state;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar} uverbs_uqp_uobj_t;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarextern sol_ofs_uobj_table_t uverbs_uctxt_uo_tbl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarextern sol_ofs_uobj_table_t uverbs_upd_uo_tbl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarextern sol_ofs_uobj_table_t uverbs_uah_uo_tbl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarextern sol_ofs_uobj_table_t uverbs_umr_uo_tbl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarextern sol_ofs_uobj_table_t uverbs_ucq_uo_tbl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarextern sol_ofs_uobj_table_t uverbs_usrq_uo_tbl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarextern sol_ofs_uobj_table_t uverbs_uqp_uo_tbl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarextern sol_ofs_uobj_table_t uverbs_ufile_uo_tbl;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * The following structure is used currently to pass data back to
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * libmthca on user allocation context. This should be passed opaquely
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * to maintain a true hal, we'll look for a generic way to get this information
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * and deliver it opaquely post EA-1.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct mthca_alloc_ucontext_resp {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t qp_tab_size;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t uarc_size;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstruct ib_udata {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar void *inbuf;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar void *outbuf;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar size_t inlen;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar size_t outlen;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar};
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint sol_uverbs_dummy_command(uverbs_uctxt_uobj_t *uctxt, char *buf,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int in_len, int out_len);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint sol_uverbs_get_context(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int out_len);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint sol_uverbs_alloc_pd(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int out_len);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint sol_uverbs_dealloc_pd(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int out_len);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint sol_uverbs_create_ah(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int out_len);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint sol_uverbs_destroy_ah(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int out_len);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint sol_uverbs_query_device(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int out_len);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint sol_uverbs_query_port(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int out_len);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint sol_uverbs_query_gid(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int out_len);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint sol_uverbs_query_pkey(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int out_len);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint sol_uverbs_reg_mr(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int out_len);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint sol_uverbs_dereg_mr(uverbs_uctxt_uobj_t *uctxt, char *buf, int in_len,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int out_len);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint sol_uverbs_create_comp_channel(uverbs_uctxt_uobj_t *uctxt, char *buf,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar int in_len, int out_len);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruint32_t
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarsol_uverbs_ibt_to_of_device_cap_flags(ibt_hca_flags_t flags,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar ibt_hca_flags2_t flags2);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruint64_t
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarsol_uverbs_ibt_to_of_page_sz(ibt_page_sizes_t page_szs);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint sol_uverbs_ibt_to_kernel_status(ibt_status_t status);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruint32_t sol_uverbs_qpnum2uqpid(uint32_t qp_num);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint uverbs_upd_free(uverbs_upd_uobj_t *, uverbs_uctxt_uobj_t *);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint uverbs_uqp_free(uverbs_uqp_uobj_t *, uverbs_uctxt_uobj_t *);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint uverbs_usrq_free(uverbs_usrq_uobj_t *, uverbs_uctxt_uobj_t *);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarint uverbs_ucq_free(uverbs_ucq_uobj_t *, uverbs_uctxt_uobj_t *);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * The following helpers simply provide easy access for acquiring and locking
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * User Objects.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstatic inline uverbs_uctxt_uobj_t *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruverbs_uobj_get_uctxt_read(uint32_t id)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar{
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar return (uverbs_uctxt_uobj_t *)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_get_read(&uverbs_uctxt_uo_tbl, id);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstatic inline uverbs_uctxt_uobj_t *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruverbs_uobj_get_uctxt_write(uint32_t id)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar{
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar return (uverbs_uctxt_uobj_t *)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_get_write(&uverbs_uctxt_uo_tbl, id);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstatic inline uverbs_upd_uobj_t *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruverbs_uobj_get_upd_read(uint32_t id)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar{
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar return (uverbs_upd_uobj_t *)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_get_read(&uverbs_upd_uo_tbl, id);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstatic inline uverbs_upd_uobj_t *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruverbs_uobj_get_upd_write(uint32_t id)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar{
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar return (uverbs_upd_uobj_t *)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_get_write(&uverbs_upd_uo_tbl, id);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstatic inline uverbs_umr_uobj_t *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruverbs_uobj_get_umr_read(uint32_t id)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar{
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar return (uverbs_umr_uobj_t *)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_get_read(&uverbs_umr_uo_tbl, id);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstatic inline uverbs_umr_uobj_t *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruverbs_uobj_get_umr_write(uint32_t id)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar{
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar return (uverbs_umr_uobj_t *)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_get_write(&uverbs_umr_uo_tbl, id);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstatic inline uverbs_ucq_uobj_t *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruverbs_uobj_get_ucq_read(uint32_t id)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar{
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar return (uverbs_ucq_uobj_t *)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_get_read(&uverbs_ucq_uo_tbl, id);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstatic inline uverbs_ucq_uobj_t *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruverbs_uobj_get_ucq_write(uint32_t id)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar{
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar return (uverbs_ucq_uobj_t *)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_get_write(&uverbs_ucq_uo_tbl, (int)id);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstatic inline uverbs_usrq_uobj_t *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruverbs_uobj_get_usrq_read(uint32_t id)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar{
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar return (uverbs_usrq_uobj_t *)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_get_read(&uverbs_usrq_uo_tbl, id);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstatic inline uverbs_usrq_uobj_t *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruverbs_uobj_get_usrq_write(uint32_t id)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar{
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar return (uverbs_usrq_uobj_t *)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_get_write(&uverbs_usrq_uo_tbl, id);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstatic inline uverbs_uah_uobj_t *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruverbs_uobj_get_uah_read(uint32_t id)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar{
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar return (uverbs_uah_uobj_t *)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_get_read(&uverbs_uah_uo_tbl, id);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstatic inline uverbs_uah_uobj_t *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruverbs_uobj_get_uah_write(uint32_t id)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar{
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar return (uverbs_uah_uobj_t *)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_get_write(&uverbs_uah_uo_tbl, id);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstatic inline uverbs_uqp_uobj_t *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruverbs_uobj_get_uqp_read(uint32_t id)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar{
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar return (uverbs_uqp_uobj_t *)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_get_read(&uverbs_uqp_uo_tbl, id);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarstatic inline uverbs_uqp_uobj_t *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikaruverbs_uobj_get_uqp_write(uint32_t id)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar{
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar return (uverbs_uqp_uobj_t *)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar sol_ofs_uobj_get_write(&uverbs_uqp_uo_tbl, id);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#ifdef __cplusplus
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#endif
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#endif /* _SYS_IB_CLIENTS_OF_SOL_UVERBS_SOL_UVERBS_H */