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
41afddff
Commit
41afddff
authored
Jun 14, 2020
by
Antoine Kaufmann
Browse files
net_tap: disable tx and rx debug print by default
parent
fab2266f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
net_tap/net_tap.c
net_tap/net_tap.c
+6
-0
No files found.
net_tap/net_tap.c
View file @
41afddff
...
...
@@ -34,6 +34,8 @@
#include <netsim.h>
//#define DEBUG_PKTMETA
static
struct
netsim_interface
nsif
;
static
int
tap_fd
;
...
...
@@ -62,7 +64,9 @@ static int tap_open(const char *name)
static
void
d2n_send
(
volatile
struct
cosim_eth_proto_d2n_send
*
s
)
{
#ifdef DEBUG_PKTMETA
printf
(
"sent packet: len=%u
\n
"
,
s
->
len
);
#endif
if
(
write
(
tap_fd
,
(
void
*
)
s
->
data
,
s
->
len
)
!=
(
ssize_t
)
s
->
len
)
{
perror
(
"d2n_send: send failed"
);
...
...
@@ -111,7 +115,9 @@ static void *rx_handler(void *arg)
}
rx
->
len
=
len
;
rx
->
port
=
0
;
#ifdef DEBUG_PKTMETA
printf
(
"received packet: len=%u
\n
"
,
rx
->
len
);
#endif
// WMB();
rx
->
own_type
=
COSIM_ETH_PROTO_N2D_MSG_RECV
|
...
...
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