Skip to contentSkip to conversation

Questions about rtl8139 receive mode and debugging

Qemu-devel Jiang Wang 2 participants 3 messages May 11, 2009 – May 13, 2009

lore
Share & tools
lore

Jiang Wang

author
#0 lore raw

Hi:

I am using rtl8139 nic emulation on x86 linux (CentOS 5.3). QEMU is 0.10.2 I want to set the NIC to receive the packet even if the check sum is wrong. Is this function implemented? I searched in hw/rtl8139.c
and find a definition of " AcceptErr = 0x20,". But it is not used
anywhere.

So I guess it may not be implemented yet. Then I try to debug this NIC and understand its internals. But I cannot find the "printf" output even if I put "#define DEBUG_RTL8139 1" in the source file and recompiled the qemu. I noticed that in this post:
http://lists.gnu.org/archive/html/qemu-devel/2006-04/msg00517.html , the printf seems to be able to output the message to the QEMU monitor. But why I cannot see the printf? Is there any other settings? Thanks.

Regards,

Jiang

#1 lore raw
Quoted 7 lines · Jiang Wang

Hi:

I am using rtl8139 nic emulation on x86 linux (CentOS 5.3). QEMU is 0.10.2  I want to set the NIC to receive the packet even if the check sum is wrong. Is this function implemented? I searched in hw/rtl8139.c and find a definition of "    AcceptErr = 0x20,". But it is not used anywhere.

This mode is not implemented. Since the code overrides checksum value for each received packet you cannot really provide it with checksum error. Look for RTL8139_CALCULATE_RXCRC in code.

Signature · 2 lines
Kind regards,
Igor V. Kovalenko
author
#2 lore raw

I see. I think I will just comment out "#define RTL8139_CALCULATE_RXCRC 1" and then use promiscuous mode. Then I should get all the packet including the error ones. Right? Thanks.

Regards,

Jiang

Quoted 17 lines · Igor Kovalenko
Quoted 7 lines · Jiang Wang

Hi:

I am using rtl8139 nic emulation on x86 linux (CentOS 5.3). QEMU is 0.10.2  I want to set the NIC to receive the packet even if the check sum is wrong. Is this function implemented? I searched in hw/rtl8139.c and find a definition of "    AcceptErr = 0x20,". But it is not used anywhere.

This mode is not implemented. Since the code overrides checksum value for each received packet you cannot really provide it with checksum error. Look for RTL8139_CALCULATE_RXCRC in code.

--
Kind regards,
Igor V. Kovalenko