1e3cf00d0SUpinder Malhi /* 2e3cf00d0SUpinder Malhi * Copyright (c) 2013, Cisco Systems, Inc. All rights reserved. 3e3cf00d0SUpinder Malhi * 43805eadeSJeff Squyres * This software is available to you under a choice of one of two 53805eadeSJeff Squyres * licenses. You may choose to be licensed under the terms of the GNU 63805eadeSJeff Squyres * General Public License (GPL) Version 2, available from the file 73805eadeSJeff Squyres * COPYING in the main directory of this source tree, or the 83805eadeSJeff Squyres * BSD license below: 93805eadeSJeff Squyres * 103805eadeSJeff Squyres * Redistribution and use in source and binary forms, with or 113805eadeSJeff Squyres * without modification, are permitted provided that the following 123805eadeSJeff Squyres * conditions are met: 133805eadeSJeff Squyres * 143805eadeSJeff Squyres * - Redistributions of source code must retain the above 153805eadeSJeff Squyres * copyright notice, this list of conditions and the following 163805eadeSJeff Squyres * disclaimer. 173805eadeSJeff Squyres * 183805eadeSJeff Squyres * - Redistributions in binary form must reproduce the above 193805eadeSJeff Squyres * copyright notice, this list of conditions and the following 203805eadeSJeff Squyres * disclaimer in the documentation and/or other materials 213805eadeSJeff Squyres * provided with the distribution. 22e3cf00d0SUpinder Malhi * 23e3cf00d0SUpinder Malhi * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24e3cf00d0SUpinder Malhi * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25e3cf00d0SUpinder Malhi * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26e3cf00d0SUpinder Malhi * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 27e3cf00d0SUpinder Malhi * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 28e3cf00d0SUpinder Malhi * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 29e3cf00d0SUpinder Malhi * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 30e3cf00d0SUpinder Malhi * SOFTWARE. 31e3cf00d0SUpinder Malhi * 32e3cf00d0SUpinder Malhi */ 33e3cf00d0SUpinder Malhi 34e3cf00d0SUpinder Malhi #ifndef USNIC_IB_VERBS_H_ 35e3cf00d0SUpinder Malhi #define USNIC_IB_VERBS_H_ 36e3cf00d0SUpinder Malhi 37e3cf00d0SUpinder Malhi #include "usnic_ib.h" 38e3cf00d0SUpinder Malhi 39e3cf00d0SUpinder Malhi enum rdma_link_layer usnic_ib_port_link_layer(struct ib_device *device, 401fb7f897SMark Bloch u32 port_num); 41e3cf00d0SUpinder Malhi int usnic_ib_query_device(struct ib_device *ibdev, 422528e33eSMatan Barak struct ib_device_attr *props, 432528e33eSMatan Barak struct ib_udata *uhw); 441fb7f897SMark Bloch int usnic_ib_query_port(struct ib_device *ibdev, u32 port, 45e3cf00d0SUpinder Malhi struct ib_port_attr *props); 46e3cf00d0SUpinder Malhi int usnic_ib_query_qp(struct ib_qp *qp, struct ib_qp_attr *qp_attr, 47e3cf00d0SUpinder Malhi int qp_attr_mask, 48e3cf00d0SUpinder Malhi struct ib_qp_init_attr *qp_init_attr); 491fb7f897SMark Bloch int usnic_ib_query_gid(struct ib_device *ibdev, u32 port, int index, 50e3cf00d0SUpinder Malhi union ib_gid *gid); 51ff23dfa1SShamir Rabinovitch int usnic_ib_alloc_pd(struct ib_pd *ibpd, struct ib_udata *udata); 5291a7c58fSLeon Romanovsky int usnic_ib_dealloc_pd(struct ib_pd *pd, struct ib_udata *udata); 53*514aee66SLeon Romanovsky int usnic_ib_create_qp(struct ib_qp *qp, struct ib_qp_init_attr *init_attr, 54e3cf00d0SUpinder Malhi struct ib_udata *udata); 55c4367a26SShamir Rabinovitch int usnic_ib_destroy_qp(struct ib_qp *qp, struct ib_udata *udata); 56e3cf00d0SUpinder Malhi int usnic_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, 57e3cf00d0SUpinder Malhi int attr_mask, struct ib_udata *udata); 58e39afe3dSLeon Romanovsky int usnic_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr, 59e3cf00d0SUpinder Malhi struct ib_udata *udata); 6043d781b9SLeon Romanovsky int usnic_ib_destroy_cq(struct ib_cq *cq, struct ib_udata *udata); 61e3cf00d0SUpinder Malhi struct ib_mr *usnic_ib_reg_mr(struct ib_pd *pd, u64 start, u64 length, 62e3cf00d0SUpinder Malhi u64 virt_addr, int access_flags, 63e3cf00d0SUpinder Malhi struct ib_udata *udata); 64c4367a26SShamir Rabinovitch int usnic_ib_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata); 65a2a074efSLeon Romanovsky int usnic_ib_alloc_ucontext(struct ib_ucontext *uctx, struct ib_udata *udata); 66a2a074efSLeon Romanovsky void usnic_ib_dealloc_ucontext(struct ib_ucontext *ibcontext); 67e3cf00d0SUpinder Malhi int usnic_ib_mmap(struct ib_ucontext *context, 68e3cf00d0SUpinder Malhi struct vm_area_struct *vma); 69e3cf00d0SUpinder Malhi #endif /* !USNIC_IB_VERBS_H */ 70