Commit 3c836b4d authored by Hejing Li's avatar Hejing Li
Browse files

remove some debug prints

parent d5b0e45b
...@@ -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,
......
...@@ -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;
} }
......
...@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment