diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
| commit | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch) | |
| tree | f5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /include/rdma/ib_verbs.h | |
| parent | ac58c9059da8886b5e8cde012a80266b18ca146e (diff) | |
| parent | 674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff) | |
Merge branch 'linus'
Diffstat (limited to 'include/rdma/ib_verbs.h')
| -rw-r--r-- | include/rdma/ib_verbs.h | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 22fc886b9695..c1ad6273ac6c 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Copyright (c) 2004 Topspin Corporation. All rights reserved. | 5 | * Copyright (c) 2004 Topspin Corporation. All rights reserved. |
| 6 | * Copyright (c) 2004 Voltaire Corporation. All rights reserved. | 6 | * Copyright (c) 2004 Voltaire Corporation. All rights reserved. |
| 7 | * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. | 7 | * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. |
| 8 | * Copyright (c) 2005 Cisco Systems. All rights reserved. | 8 | * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved. |
| 9 | * | 9 | * |
| 10 | * This software is available to you under a choice of one of two | 10 | * This software is available to you under a choice of one of two |
| 11 | * licenses. You may choose to be licensed under the terms of the GNU | 11 | * licenses. You may choose to be licensed under the terms of the GNU |
| @@ -222,11 +222,13 @@ struct ib_port_attr { | |||
| 222 | }; | 222 | }; |
| 223 | 223 | ||
| 224 | enum ib_device_modify_flags { | 224 | enum ib_device_modify_flags { |
| 225 | IB_DEVICE_MODIFY_SYS_IMAGE_GUID = 1 | 225 | IB_DEVICE_MODIFY_SYS_IMAGE_GUID = 1 << 0, |
| 226 | IB_DEVICE_MODIFY_NODE_DESC = 1 << 1 | ||
| 226 | }; | 227 | }; |
| 227 | 228 | ||
| 228 | struct ib_device_modify { | 229 | struct ib_device_modify { |
| 229 | u64 sys_image_guid; | 230 | u64 sys_image_guid; |
| 231 | char node_desc[64]; | ||
| 230 | }; | 232 | }; |
| 231 | 233 | ||
| 232 | enum ib_port_modify_flags { | 234 | enum ib_port_modify_flags { |
| @@ -649,7 +651,7 @@ struct ib_mw_bind { | |||
| 649 | struct ib_fmr_attr { | 651 | struct ib_fmr_attr { |
| 650 | int max_pages; | 652 | int max_pages; |
| 651 | int max_maps; | 653 | int max_maps; |
| 652 | u8 page_size; | 654 | u8 page_shift; |
| 653 | }; | 655 | }; |
| 654 | 656 | ||
| 655 | struct ib_ucontext { | 657 | struct ib_ucontext { |
| @@ -880,7 +882,8 @@ struct ib_device { | |||
| 880 | struct ib_ucontext *context, | 882 | struct ib_ucontext *context, |
| 881 | struct ib_udata *udata); | 883 | struct ib_udata *udata); |
| 882 | int (*destroy_cq)(struct ib_cq *cq); | 884 | int (*destroy_cq)(struct ib_cq *cq); |
| 883 | int (*resize_cq)(struct ib_cq *cq, int cqe); | 885 | int (*resize_cq)(struct ib_cq *cq, int cqe, |
| 886 | struct ib_udata *udata); | ||
| 884 | int (*poll_cq)(struct ib_cq *cq, int num_entries, | 887 | int (*poll_cq)(struct ib_cq *cq, int num_entries, |
| 885 | struct ib_wc *wc); | 888 | struct ib_wc *wc); |
| 886 | int (*peek_cq)(struct ib_cq *cq, int wc_cnt); | 889 | int (*peek_cq)(struct ib_cq *cq, int wc_cnt); |
| @@ -950,6 +953,7 @@ struct ib_device { | |||
| 950 | u64 uverbs_cmd_mask; | 953 | u64 uverbs_cmd_mask; |
| 951 | int uverbs_abi_ver; | 954 | int uverbs_abi_ver; |
| 952 | 955 | ||
| 956 | char node_desc[64]; | ||
| 953 | __be64 node_guid; | 957 | __be64 node_guid; |
| 954 | u8 node_type; | 958 | u8 node_type; |
| 955 | u8 phys_port_cnt; | 959 | u8 phys_port_cnt; |
| @@ -986,6 +990,24 @@ static inline int ib_copy_to_udata(struct ib_udata *udata, void *src, size_t len | |||
| 986 | return copy_to_user(udata->outbuf, src, len) ? -EFAULT : 0; | 990 | return copy_to_user(udata->outbuf, src, len) ? -EFAULT : 0; |
| 987 | } | 991 | } |
| 988 | 992 | ||
| 993 | /** | ||
| 994 | * ib_modify_qp_is_ok - Check that the supplied attribute mask | ||
| 995 | * contains all required attributes and no attributes not allowed for | ||
| 996 | * the given QP state transition. | ||
| 997 | * @cur_state: Current QP state | ||
| 998 | * @next_state: Next QP state | ||
| 999 | * @type: QP type | ||
| 1000 | * @mask: Mask of supplied QP attributes | ||
| 1001 | * | ||
| 1002 | * This function is a helper function that a low-level driver's | ||
| 1003 | * modify_qp method can use to validate the consumer's input. It | ||
| 1004 | * checks that cur_state and next_state are valid QP states, that a | ||
| 1005 | * transition from cur_state to next_state is allowed by the IB spec, | ||
| 1006 | * and that the attribute mask supplied is allowed for the transition. | ||
| 1007 | */ | ||
| 1008 | int ib_modify_qp_is_ok(enum ib_qp_state cur_state, enum ib_qp_state next_state, | ||
| 1009 | enum ib_qp_type type, enum ib_qp_attr_mask mask); | ||
| 1010 | |||
| 989 | int ib_register_event_handler (struct ib_event_handler *event_handler); | 1011 | int ib_register_event_handler (struct ib_event_handler *event_handler); |
| 990 | int ib_unregister_event_handler(struct ib_event_handler *event_handler); | 1012 | int ib_unregister_event_handler(struct ib_event_handler *event_handler); |
| 991 | void ib_dispatch_event(struct ib_event *event); | 1013 | void ib_dispatch_event(struct ib_event *event); |
| @@ -1078,7 +1100,9 @@ int ib_destroy_ah(struct ib_ah *ah); | |||
| 1078 | * ib_create_srq - Creates a SRQ associated with the specified protection | 1100 | * ib_create_srq - Creates a SRQ associated with the specified protection |
| 1079 | * domain. | 1101 | * domain. |
| 1080 | * @pd: The protection domain associated with the SRQ. | 1102 | * @pd: The protection domain associated with the SRQ. |
| 1081 | * @srq_init_attr: A list of initial attributes required to create the SRQ. | 1103 | * @srq_init_attr: A list of initial attributes required to create the |
| 1104 | * SRQ. If SRQ creation succeeds, then the attributes are updated to | ||
| 1105 | * the actual capabilities of the created SRQ. | ||
| 1082 | * | 1106 | * |
| 1083 | * srq_attr->max_wr and srq_attr->max_sge are read the determine the | 1107 | * srq_attr->max_wr and srq_attr->max_sge are read the determine the |
| 1084 | * requested size of the SRQ, and set to the actual values allocated | 1108 | * requested size of the SRQ, and set to the actual values allocated |
| @@ -1137,7 +1161,9 @@ static inline int ib_post_srq_recv(struct ib_srq *srq, | |||
| 1137 | * ib_create_qp - Creates a QP associated with the specified protection | 1161 | * ib_create_qp - Creates a QP associated with the specified protection |
| 1138 | * domain. | 1162 | * domain. |
| 1139 | * @pd: The protection domain associated with the QP. | 1163 | * @pd: The protection domain associated with the QP. |
| 1140 | * @qp_init_attr: A list of initial attributes required to create the QP. | 1164 | * @qp_init_attr: A list of initial attributes required to create the |
| 1165 | * QP. If QP creation succeeds, then the attributes are updated to | ||
| 1166 | * the actual capabilities of the created QP. | ||
| 1141 | */ | 1167 | */ |
| 1142 | struct ib_qp *ib_create_qp(struct ib_pd *pd, | 1168 | struct ib_qp *ib_create_qp(struct ib_pd *pd, |
| 1143 | struct ib_qp_init_attr *qp_init_attr); | 1169 | struct ib_qp_init_attr *qp_init_attr); |
