ib_cm.h
Go to the documentation of this file.00001 #ifndef _GPXE_IB_CM_H
00002 #define _GPXE_IB_CM_H
00003
00004
00005
00006
00007
00008
00009
00010 FILE_LICENCE ( GPL2_OR_LATER );
00011
00012 #include <gpxe/infiniband.h>
00013 #include <gpxe/retry.h>
00014
00015 struct ib_mad_transaction;
00016 struct ib_connection;
00017
00018
00019 struct ib_connection_operations {
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 void ( * changed ) ( struct ib_device *ibdev, struct ib_queue_pair *qp,
00030 struct ib_connection *conn, int rc,
00031 void *private_data, size_t private_data_len );
00032 };
00033
00034
00035 struct ib_connection {
00036
00037 struct ib_device *ibdev;
00038
00039 struct ib_queue_pair *qp;
00040
00041 uint32_t local_id;
00042
00043 uint32_t remote_id;
00044
00045 struct ib_gid_half service_id;
00046
00047 struct ib_connection_operations *op;
00048
00049
00050 struct list_head list;
00051
00052
00053 struct ib_path *path;
00054
00055 struct ib_mad_transaction *madx;
00056
00057
00058 size_t private_data_len;
00059
00060 uint8_t private_data[0];
00061 };
00062
00063 extern struct ib_connection *
00064 ib_create_conn ( struct ib_device *ibdev, struct ib_queue_pair *qp,
00065 struct ib_gid *dgid, struct ib_gid_half *service_id,
00066 void *req_private_data, size_t req_private_data_len,
00067 struct ib_connection_operations *op );
00068 extern void ib_destroy_conn ( struct ib_device *ibdev,
00069 struct ib_queue_pair *qp,
00070 struct ib_connection *conn );
00071
00072 #endif