DABC (Data Acquisition Backbone Core)
2.9.9
plugins
verbs
verbs
ComplQueue.h
Go to the documentation of this file.
1
/************************************************************
2
* The Data Acquisition Backbone Core (DABC) *
3
************************************************************
4
* Copyright (C) 2009 - *
5
* GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
6
* Planckstr. 1, 64291 Darmstadt, Germany *
7
* Contact: http://dabc.gsi.de *
8
************************************************************
9
* This software can be used under the GPL license *
10
* agreements as stated in LICENSE.txt file *
11
* which is part of the distribution. *
12
************************************************************/
13
14
#ifndef VERBS_ComplQueue
15
#define VERBS_ComplQueue
16
17
#ifndef VERBS_Context
18
#include "
verbs/Context.h
"
19
#endif
20
21
namespace
verbs
{
22
25
struct
ComplQueueContext
{
26
int
events_get
;
27
void
*
itself
;
28
struct
ibv_cq*
own_cq
;
29
};
30
31
// __________________________________________________________________
32
35
class
ComplQueue
{
36
protected
:
37
38
ContextRef
fContext
;
39
40
struct
ibv_cq *
f_cq
;
41
struct
ibv_comp_channel *
f_channel
;
42
bool
f_ownchannel
;
43
44
ComplQueueContext
fCQContext
;
45
// FIXME: for a moment put here, later should be removed
46
struct
ibv_wc
f_wc
;
47
48
public
:
49
50
ComplQueue
(
ContextRef
ctx,
int
size,
51
struct
ibv_comp_channel *
channel
,
bool
use_own_channel =
false
);
52
53
virtual
~ComplQueue
();
54
55
struct
ibv_comp_channel *
channel
()
const
{
return
f_channel
; }
56
struct
ibv_cq *
cq
()
const
{
return
f_cq
; }
57
uint64_t
arg
()
const
{
return
f_wc
.wr_id; }
58
59
int
Poll
();
60
int
Wait
(
double
timeout,
double
fasttm = 0.);
61
void
AcknoledgeEvents
();
62
63
static
const
char
*
GetStrError
(
int
err);
64
};
65
}
66
67
#endif
Context.h
verbs::ComplQueue
Wrapper for IB VERBS completion queue
Definition:
ComplQueue.h:35
verbs::ComplQueue::fCQContext
ComplQueueContext fCQContext
Definition:
ComplQueue.h:44
verbs::ComplQueue::f_wc
struct ibv_wc f_wc
Definition:
ComplQueue.h:46
verbs::ComplQueue::f_ownchannel
bool f_ownchannel
Definition:
ComplQueue.h:42
verbs::ComplQueue::f_cq
struct ibv_cq * f_cq
Definition:
ComplQueue.h:40
verbs::ComplQueue::AcknoledgeEvents
void AcknoledgeEvents()
Definition:
ComplQueue.cxx:199
verbs::ComplQueue::ComplQueue
ComplQueue(ContextRef ctx, int size, struct ibv_comp_channel *channel, bool use_own_channel=false)
Definition:
ComplQueue.cxx:23
verbs::ComplQueue::Wait
int Wait(double timeout, double fasttm=0.)
Definition:
ComplQueue.cxx:91
verbs::ComplQueue::cq
struct ibv_cq * cq() const
Definition:
ComplQueue.h:56
verbs::ComplQueue::f_channel
struct ibv_comp_channel * f_channel
Definition:
ComplQueue.h:41
verbs::ComplQueue::GetStrError
static const char * GetStrError(int err)
Definition:
ComplQueue.cxx:207
verbs::ComplQueue::~ComplQueue
virtual ~ComplQueue()
Definition:
ComplQueue.cxx:52
verbs::ComplQueue::fContext
ContextRef fContext
Definition:
ComplQueue.h:38
verbs::ComplQueue::Poll
int Poll()
Definition:
ComplQueue.cxx:66
verbs::ComplQueue::arg
uint64_t arg() const
Definition:
ComplQueue.h:57
verbs::ComplQueue::channel
struct ibv_comp_channel * channel() const
Definition:
ComplQueue.h:55
verbs::ContextRef
Reference to verbs::Context
Definition:
Context.h:74
verbs
Support of InfiniBand verbs.
Definition:
Device.cxx:54
verbs::ComplQueueContext
Context object for completion queue operations.
Definition:
ComplQueue.h:25
verbs::ComplQueueContext::own_cq
struct ibv_cq * own_cq
Definition:
ComplQueue.h:28
verbs::ComplQueueContext::events_get
int events_get
Definition:
ComplQueue.h:26
verbs::ComplQueueContext::itself
void * itself
Definition:
ComplQueue.h:27
Generated by
1.9.1