Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
bc7ff5c3
Commit
bc7ff5c3
authored
Apr 21, 2021
by
Jialin Li
Browse files
fix compiler errors/warnings
parent
878a01f9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
lib/simbricks/nicbm/nicbm.cc
lib/simbricks/nicbm/nicbm.cc
+5
-5
sims/nic/corundum_bm/corundum_bm.cc
sims/nic/corundum_bm/corundum_bm.cc
+2
-2
No files found.
lib/simbricks/nicbm/nicbm.cc
View file @
bc7ff5c3
...
@@ -78,13 +78,13 @@ void Runner::IssueDma(DMAOp &op) {
...
@@ -78,13 +78,13 @@ void Runner::IssueDma(DMAOp &op) {
// can directly issue
// can directly issue
#ifdef DEBUG_NICBM
#ifdef DEBUG_NICBM
printf
(
"nicbm: issuing dma op %p addr %lx len %zu pending %zu
\n
"
,
&
op
,
printf
(
"nicbm: issuing dma op %p addr %lx len %zu pending %zu
\n
"
,
&
op
,
op
.
dma_addr
,
op
.
len
,
dma_pending
);
op
.
dma_addr
_
,
op
.
len
_
,
dma_pending
_
);
#endif
#endif
DmaDo
(
op
);
DmaDo
(
op
);
}
else
{
}
else
{
#ifdef DEBUG_NICBM
#ifdef DEBUG_NICBM
printf
(
"nicbm: enqueuing dma op %p addr %lx len %zu pending %zu
\n
"
,
&
op
,
printf
(
"nicbm: enqueuing dma op %p addr %lx len %zu pending %zu
\n
"
,
&
op
,
op
.
dma_addr
,
op
.
len
,
dma_pending
);
op
.
dma_addr
_
,
op
.
len
_
,
dma_pending
_
);
#endif
#endif
dma_queue_
.
push_back
(
&
op
);
dma_queue_
.
push_back
(
&
op
);
}
}
...
@@ -229,8 +229,8 @@ void Runner::H2DReadcomp(volatile struct SimbricksProtoPcieH2DReadcomp *rc) {
...
@@ -229,8 +229,8 @@ void Runner::H2DReadcomp(volatile struct SimbricksProtoPcieH2DReadcomp *rc) {
DMAOp
*
op
=
(
DMAOp
*
)(
uintptr_t
)
rc
->
req_id
;
DMAOp
*
op
=
(
DMAOp
*
)(
uintptr_t
)
rc
->
req_id
;
#ifdef DEBUG_NICBM
#ifdef DEBUG_NICBM
printf
(
"nicbm: completed dma read op %p addr %lx len %zu
\n
"
,
op
,
op
->
dma_addr
,
printf
(
"nicbm: completed dma read op %p addr %lx len %zu
\n
"
,
op
,
op
->
dma_addr
_
,
op
->
len
);
op
->
len
_
);
#endif
#endif
memcpy
(
op
->
data_
,
(
void
*
)
rc
->
data
,
op
->
len_
);
memcpy
(
op
->
data_
,
(
void
*
)
rc
->
data
,
op
->
len_
);
...
@@ -245,7 +245,7 @@ void Runner::H2DWritecomp(volatile struct SimbricksProtoPcieH2DWritecomp *wc) {
...
@@ -245,7 +245,7 @@ void Runner::H2DWritecomp(volatile struct SimbricksProtoPcieH2DWritecomp *wc) {
#ifdef DEBUG_NICBM
#ifdef DEBUG_NICBM
printf
(
"nicbm: completed dma write op %p addr %lx len %zu
\n
"
,
op
,
printf
(
"nicbm: completed dma write op %p addr %lx len %zu
\n
"
,
op
,
op
->
dma_addr
,
op
->
len
);
op
->
dma_addr
_
,
op
->
len
_
);
#endif
#endif
dev_
.
DmaComplete
(
*
op
);
dev_
.
DmaComplete
(
*
op
);
...
...
sims/nic/corundum_bm/corundum_bm.cc
View file @
bc7ff5c3
...
@@ -118,7 +118,7 @@ bool DescRing::empty() {
...
@@ -118,7 +118,7 @@ bool DescRing::empty() {
}
}
bool
DescRing
::
full
()
{
bool
DescRing
::
full
()
{
return
(
this
->
_currHead
-
this
->
_tailPtr
>=
this
->
_size
);
return
(
this
->
_currHead
-
this
->
_tailPtr
>=
(
int
)
this
->
_size
);
}
}
bool
DescRing
::
updatePtr
(
ptr_t
ptr
,
bool
head
)
{
bool
DescRing
::
updatePtr
(
ptr_t
ptr
,
bool
head
)
{
...
@@ -290,7 +290,7 @@ void TxRing::dmaDone(DMAOp *op) {
...
@@ -290,7 +290,7 @@ void TxRing::dmaDone(DMAOp *op) {
delete
op
;
delete
op
;
break
;
break
;
default:
default:
fprintf
(
stderr
,
"Unknown DMA type %
u
\n
"
,
op
->
type
);
fprintf
(
stderr
,
"Unknown DMA type %
d
\n
"
,
op
->
type
);
abort
();
abort
();
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment