Commit 41afddff authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

net_tap: disable tx and rx debug print by default

parent fab2266f
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#include <netsim.h> #include <netsim.h>
//#define DEBUG_PKTMETA
static struct netsim_interface nsif; static struct netsim_interface nsif;
static int tap_fd; static int tap_fd;
...@@ -62,7 +64,9 @@ static int tap_open(const char *name) ...@@ -62,7 +64,9 @@ static int tap_open(const char *name)
static void d2n_send(volatile struct cosim_eth_proto_d2n_send *s) static void d2n_send(volatile struct cosim_eth_proto_d2n_send *s)
{ {
#ifdef DEBUG_PKTMETA
printf("sent packet: len=%u\n", s->len); printf("sent packet: len=%u\n", s->len);
#endif
if (write(tap_fd, (void *) s->data, s->len) != (ssize_t) s->len) { if (write(tap_fd, (void *) s->data, s->len) != (ssize_t) s->len) {
perror("d2n_send: send failed"); perror("d2n_send: send failed");
...@@ -111,7 +115,9 @@ static void *rx_handler(void *arg) ...@@ -111,7 +115,9 @@ static void *rx_handler(void *arg)
} }
rx->len = len; rx->len = len;
rx->port = 0; rx->port = 0;
#ifdef DEBUG_PKTMETA
printf("received packet: len=%u\n", rx->len); printf("received packet: len=%u\n", rx->len);
#endif
// WMB(); // WMB();
rx->own_type = COSIM_ETH_PROTO_N2D_MSG_RECV | rx->own_type = COSIM_ETH_PROTO_N2D_MSG_RECV |
......
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