Skip to content

Commit af22069

Browse files
committed
Drop ethernet FCS entering the packet to the tap device
1 parent 60ac7d8 commit af22069

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tb_svdpi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ static inline int gmii2pipe(unsigned int frame_len)
127127
int i, olen;
128128
char obuf[BUF_MAX_ASCII];
129129

130+
// drop ethernet FCS
131+
frame_len -= 4;
132+
130133
sprintf(obuf, "%02X%02X%02X%02X%02X%02X %02X%02X%02X%02X%02X%02X %02X%02X",
131134
rx_tmp_pkt[0x00], rx_tmp_pkt[0x01], rx_tmp_pkt[0x02], // dst mac address
132135
rx_tmp_pkt[0x03], rx_tmp_pkt[0x04], rx_tmp_pkt[0x05],

0 commit comments

Comments
 (0)