Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 1 | /******************************************************************* |
| 2 | * This file is part of the Emulex RoCE Device Driver for * |
| 3 | * RoCE (RDMA over Converged Ethernet) adapters. * |
| 4 | * Copyright (C) 2008-2012 Emulex. All rights reserved. * |
| 5 | * EMULEX and SLI are trademarks of Emulex. * |
| 6 | * www.emulex.com * |
| 7 | * * |
| 8 | * This program is free software; you can redistribute it and/or * |
| 9 | * modify it under the terms of version 2 of the GNU General * |
| 10 | * Public License as published by the Free Software Foundation. * |
| 11 | * This program is distributed in the hope that it will be useful. * |
| 12 | * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * |
| 13 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * |
| 14 | * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * |
| 15 | * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * |
| 16 | * TO BE LEGALLY INVALID. See the GNU General Public License for * |
| 17 | * more details, a copy of which can be found in the file COPYING * |
| 18 | * included with this package. * |
| 19 | * |
| 20 | * Contact Information: |
| 21 | * linux-drivers@emulex.com |
| 22 | * |
| 23 | * Emulex |
| 24 | * 3333 Susan Street |
| 25 | * Costa Mesa, CA 92626 |
| 26 | *******************************************************************/ |
| 27 | |
| 28 | #ifndef __OCRDMA_VERBS_H__ |
| 29 | #define __OCRDMA_VERBS_H__ |
| 30 | |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 31 | int ocrdma_post_send(struct ib_qp *, struct ib_send_wr *, |
| 32 | struct ib_send_wr **bad_wr); |
| 33 | int ocrdma_post_recv(struct ib_qp *, struct ib_recv_wr *, |
| 34 | struct ib_recv_wr **bad_wr); |
| 35 | |
| 36 | int ocrdma_poll_cq(struct ib_cq *, int num_entries, struct ib_wc *wc); |
| 37 | int ocrdma_arm_cq(struct ib_cq *, enum ib_cq_notify_flags flags); |
| 38 | |
Matan Barak | 2528e33 | 2015-06-11 16:35:25 +0300 | [diff] [blame] | 39 | int ocrdma_query_device(struct ib_device *, struct ib_device_attr *props, |
| 40 | struct ib_udata *uhw); |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 41 | int ocrdma_query_port(struct ib_device *, u8 port, struct ib_port_attr *props); |
| 42 | int ocrdma_modify_port(struct ib_device *, u8 port, int mask, |
| 43 | struct ib_port_modify *props); |
| 44 | |
Michael Wang | 6b90a6d | 2015-05-05 14:50:18 +0200 | [diff] [blame] | 45 | enum rdma_protocol_type |
| 46 | ocrdma_query_protocol(struct ib_device *device, u8 port_num); |
| 47 | |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 48 | void ocrdma_get_guid(struct ocrdma_dev *, u8 *guid); |
| 49 | int ocrdma_query_gid(struct ib_device *, u8 port, |
| 50 | int index, union ib_gid *gid); |
| 51 | int ocrdma_query_pkey(struct ib_device *, u8 port, u16 index, u16 *pkey); |
| 52 | |
| 53 | struct ib_ucontext *ocrdma_alloc_ucontext(struct ib_device *, |
| 54 | struct ib_udata *); |
| 55 | int ocrdma_dealloc_ucontext(struct ib_ucontext *); |
| 56 | |
| 57 | int ocrdma_mmap(struct ib_ucontext *, struct vm_area_struct *vma); |
| 58 | |
| 59 | struct ib_pd *ocrdma_alloc_pd(struct ib_device *, |
| 60 | struct ib_ucontext *, struct ib_udata *); |
| 61 | int ocrdma_dealloc_pd(struct ib_pd *pd); |
| 62 | |
Matan Barak | bcf4c1e | 2015-06-11 16:35:20 +0300 | [diff] [blame] | 63 | struct ib_cq *ocrdma_create_cq(struct ib_device *ibdev, |
| 64 | const struct ib_cq_init_attr *attr, |
| 65 | struct ib_ucontext *ib_ctx, |
| 66 | struct ib_udata *udata); |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 67 | int ocrdma_resize_cq(struct ib_cq *, int cqe, struct ib_udata *); |
| 68 | int ocrdma_destroy_cq(struct ib_cq *); |
| 69 | |
| 70 | struct ib_qp *ocrdma_create_qp(struct ib_pd *, |
| 71 | struct ib_qp_init_attr *attrs, |
| 72 | struct ib_udata *); |
| 73 | int _ocrdma_modify_qp(struct ib_qp *, struct ib_qp_attr *attr, |
| 74 | int attr_mask); |
| 75 | int ocrdma_modify_qp(struct ib_qp *, struct ib_qp_attr *attr, |
| 76 | int attr_mask, struct ib_udata *udata); |
| 77 | int ocrdma_query_qp(struct ib_qp *, |
| 78 | struct ib_qp_attr *qp_attr, |
| 79 | int qp_attr_mask, struct ib_qp_init_attr *); |
| 80 | int ocrdma_destroy_qp(struct ib_qp *); |
Naresh Gottumukkala | f11220e | 2013-08-26 15:27:42 +0530 | [diff] [blame] | 81 | void ocrdma_del_flush_qp(struct ocrdma_qp *qp); |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 82 | |
| 83 | struct ib_srq *ocrdma_create_srq(struct ib_pd *, struct ib_srq_init_attr *, |
| 84 | struct ib_udata *); |
| 85 | int ocrdma_modify_srq(struct ib_srq *, struct ib_srq_attr *, |
| 86 | enum ib_srq_attr_mask, struct ib_udata *); |
| 87 | int ocrdma_query_srq(struct ib_srq *, struct ib_srq_attr *); |
| 88 | int ocrdma_destroy_srq(struct ib_srq *); |
| 89 | int ocrdma_post_srq_recv(struct ib_srq *, struct ib_recv_wr *, |
| 90 | struct ib_recv_wr **bad_recv_wr); |
| 91 | |
| 92 | int ocrdma_dereg_mr(struct ib_mr *); |
| 93 | struct ib_mr *ocrdma_get_dma_mr(struct ib_pd *, int acc); |
| 94 | struct ib_mr *ocrdma_reg_kernel_mr(struct ib_pd *, |
| 95 | struct ib_phys_buf *buffer_list, |
| 96 | int num_phys_buf, int acc, u64 *iova_start); |
| 97 | struct ib_mr *ocrdma_reg_user_mr(struct ib_pd *, u64 start, u64 length, |
| 98 | u64 virt, int acc, struct ib_udata *); |
Naresh Gottumukkala | 7c33880 | 2013-08-26 15:27:39 +0530 | [diff] [blame] | 99 | struct ib_mr *ocrdma_alloc_frmr(struct ib_pd *pd, int max_page_list_len); |
| 100 | struct ib_fast_reg_page_list *ocrdma_alloc_frmr_page_list(struct ib_device |
| 101 | *ibdev, |
| 102 | int page_list_len); |
| 103 | void ocrdma_free_frmr_page_list(struct ib_fast_reg_page_list *page_list); |
Parav Pandit | fe2caef | 2012-03-21 04:09:06 +0530 | [diff] [blame] | 104 | |
| 105 | #endif /* __OCRDMA_VERBS_H__ */ |