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
3c836b4d
Commit
3c836b4d
authored
Oct 06, 2022
by
Hejing Li
Browse files
remove some debug prints
parent
d5b0e45b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
11 deletions
+8
-11
sims/mem/memnic/memnic.cc
sims/mem/memnic/memnic.cc
+3
-6
sims/mem/netmem/netmem.cc
sims/mem/netmem/netmem.cc
+4
-4
sims/net/mem_switch/mem_switch.cc
sims/net/mem_switch/mem_switch.cc
+1
-1
No files found.
sims/mem/memnic/memnic.cc
View file @
3c836b4d
...
@@ -50,7 +50,7 @@ extern "C" {
...
@@ -50,7 +50,7 @@ extern "C" {
#include <simbricks/mem/memop.h>
#include <simbricks/mem/memop.h>
};
};
#define MEMNIC_DEBUG 1
//
#define MEMNIC_DEBUG 1
static
int
exiting
=
0
;
static
int
exiting
=
0
;
static
uint64_t
cur_ts
=
0
;
static
uint64_t
cur_ts
=
0
;
...
@@ -327,12 +327,12 @@ void PollH2M(struct SimbricksMemIf *memif, SimbricksNetIf *netif, uint64_t cur_t
...
@@ -327,12 +327,12 @@ void PollH2M(struct SimbricksMemIf *memif, SimbricksNetIf *netif, uint64_t cur_t
switch
(
type
)
{
switch
(
type
)
{
case
SIMBRICKS_PROTO_MEM_H2M_MSG_READ
:
case
SIMBRICKS_PROTO_MEM_H2M_MSG_READ
:
printf
(
"received read request
\n
"
);
//
printf("received read request\n");
ForwardToETH
(
netif
,
msg
,
type
);
ForwardToETH
(
netif
,
msg
,
type
);
break
;
break
;
case
SIMBRICKS_PROTO_MEM_H2M_MSG_WRITE
:
case
SIMBRICKS_PROTO_MEM_H2M_MSG_WRITE
:
printf
(
"received write request
\n
"
);
//
printf("received write request\n");
ForwardToETH
(
netif
,
msg
,
type
);
ForwardToETH
(
netif
,
msg
,
type
);
break
;
break
;
case
SIMBRICKS_PROTO_MSG_TYPE_SYNC
:
case
SIMBRICKS_PROTO_MSG_TYPE_SYNC
:
...
@@ -364,9 +364,6 @@ int main(int argc, char *argv[]) {
...
@@ -364,9 +364,6 @@ int main(int argc, char *argv[]) {
SimbricksMemIfDefaultParams
(
&
memParams
);
SimbricksMemIfDefaultParams
(
&
memParams
);
SimbricksNetIfDefaultParams
(
&
netParams
);
SimbricksNetIfDefaultParams
(
&
netParams
);
printf
(
"sizeof(struct SimbricksProtoMemH2MWrite): %lu
\n
"
,
sizeof
(
struct
SimbricksProtoMemH2MWrite
));
if
(
argc
<
4
||
argc
>
10
)
{
if
(
argc
<
4
||
argc
>
10
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
...
...
sims/mem/netmem/netmem.cc
View file @
3c836b4d
...
@@ -47,7 +47,7 @@ extern "C" {
...
@@ -47,7 +47,7 @@ extern "C" {
#include <simbricks/mem/memop.h>
#include <simbricks/mem/memop.h>
};
};
#define NETMEM_DEBUG 1
//
#define NETMEM_DEBUG 1
static
int
exiting
=
0
,
sync_mem
=
1
;
static
int
exiting
=
0
,
sync_mem
=
1
;
static
uint64_t
cur_ts
=
0
;
static
uint64_t
cur_ts
=
0
;
...
@@ -131,7 +131,7 @@ int HandleRequest (SimbricksNetIf *netif, volatile struct SimbricksProtoNetMsgPa
...
@@ -131,7 +131,7 @@ int HandleRequest (SimbricksNetIf *netif, volatile struct SimbricksProtoNetMsgPa
switch
(
type
)
{
switch
(
type
)
{
case
SIMBRICKS_PROTO_MEM_H2M_MSG_READ
:
case
SIMBRICKS_PROTO_MEM_H2M_MSG_READ
:
printf
(
"received read request
\n
"
);
//
printf("received read request\n");
// send read complete message
// send read complete message
to_memop
->
OpType
=
SIMBRICKS_PROTO_MEM_M2H_MSG_READCOMP
;
to_memop
->
OpType
=
SIMBRICKS_PROTO_MEM_M2H_MSG_READCOMP
;
...
@@ -140,7 +140,7 @@ int HandleRequest (SimbricksNetIf *netif, volatile struct SimbricksProtoNetMsgPa
...
@@ -140,7 +140,7 @@ int HandleRequest (SimbricksNetIf *netif, volatile struct SimbricksProtoNetMsgPa
packet_to
->
len
+=
memop
->
len
;
packet_to
->
len
+=
memop
->
len
;
break
;
break
;
case
SIMBRICKS_PROTO_MEM_H2M_MSG_WRITE
:
case
SIMBRICKS_PROTO_MEM_H2M_MSG_WRITE
:
printf
(
"received write request
\n
"
);
//
printf("received write request\n");
// write the data in local memory
// write the data in local memory
memcpy
(
&
mem_array
[
memop
->
addr
],
data
,
memop
->
len
);
memcpy
(
&
mem_array
[
memop
->
addr
],
data
,
memop
->
len
);
...
@@ -180,7 +180,7 @@ void PollN2M(struct SimbricksNetIf *netif, uint64_t cur_ts) {
...
@@ -180,7 +180,7 @@ void PollN2M(struct SimbricksNetIf *netif, uint64_t cur_ts) {
type
=
SimbricksNetIfInType
(
netif
,
msg
);
type
=
SimbricksNetIfInType
(
netif
,
msg
);
switch
(
type
)
{
switch
(
type
)
{
case
SIMBRICKS_PROTO_NET_MSG_PACKET
:
case
SIMBRICKS_PROTO_NET_MSG_PACKET
:
printf
(
"received network packet
\n
"
);
//
printf("received network packet\n");
if
(
!
HandleRequest
(
netif
,
packet
)){
if
(
!
HandleRequest
(
netif
,
packet
)){
return
;
return
;
}
}
...
...
sims/net/mem_switch/mem_switch.cc
View file @
3c836b4d
...
@@ -45,7 +45,7 @@ extern "C" {
...
@@ -45,7 +45,7 @@ extern "C" {
#include <simbricks/mem/memop.h>
#include <simbricks/mem/memop.h>
};
};
#define NETSWITCH_DEBUG
//
#define NETSWITCH_DEBUG
#define NETSWITCH_STAT
#define NETSWITCH_STAT
struct
SimbricksBaseIfParams
netParams
;
struct
SimbricksBaseIfParams
netParams
;
...
...
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