[openib-general] help with gen2 cq callback
PAulN
pauln at psc.edu
Fri Jul 22 10:30:26 PDT 2005
Can someone tell me what replaces the "struct ib_cq_entry *" param
of gen1's ib_cq_event_callback_func? It's not obvious to me how to
access the cq entry in the gen2 stack from the callback - gen1
pushes it right up. Is it necessary to poll the cq from the callback
to determine which entries are done?
Thanks,
Paul
//GEN2
typedef void (*ib_comp_handler)(struct ib_cq *cq, void *cq_context);
struct ib_cq {
struct ib_device *device;
struct ib_uobject *uobject;
ib_comp_handler comp_handler;
void (*event_handler)(struct ib_event *, void *);
void * cq_context;
int cqe;
atomic_t usecnt; /* count number of work queues */
};
//GEN1
typedef void (*ib_cq_entry_callback_func)(struct ib_cq *cq,
struct ib_cq_entry *entry,
void *arg);
typedef void (*ib_cq_event_callback_func)(struct ib_cq *cq,
void *arg);
struct ib_cq_entry {
void *device_specific;
u64 work_request_id;
u64 bytes_transferred;
enum ib_completion_status status;
enum ib_completion_op op;
int pkey_index;
u32 immediate_data;
u32 sqpn;
u32 local_eecn;
u32 freed_resource_count;
u16 ethertype;
u16 slid;
u8 sl;
u8 dlid_path_bits;
int grh_present:1;
int immediate_data_valid:1;
};
struct ib_cq;
More information about the general
mailing list