Contribute
Register

New Realtek Driver Development

Status
Not open for further replies.
Attention SandyBridge users... New Lnx2Mac RTL81xx available

Hello VM,

no, a driver can't block scripts as it doesn't inspect the packet content but if communication with machines in the intranet is ok although you are having trouble with internet traffic you should search /var/log/system.log for kernel messages and check your router. The driver doesn't support jumbo frames and probably will never do because the RTL8111 ins't able to calculate checksums for outgoing packets larger than 1518 Bytes. On the receiver side anything that doesn't fit into a single buffer (currently 2000 bytes) is considered as broken and will be discarded. There will also be debug messages "Ethernet [RealtekRTL8111]: Fragmented packet." in /var/log/system.log.

In case there are fragmented packets and you can't reconfigure your router try to increase "kRxBufferPktSize" in the source and see if it helps.

Good luck!

Mieze

I have only this error: localhost kernel[0]: Ethernet [RealtekRTL8111]: replaceOrCopyPacket() failed.

I'll recompile with increased buffer size and let you know.


Best regards
VM
 
Attention SandyBridge users... New Lnx2Mac RTL81xx available

This message is harmless and nothing to worry about because it only states that a memory allocation error occurred.

What about the router? By the way, do you have any other network interfaces (WLAN etc.) in your machine?

Mieze

Router is a Netgear CG3101D from my cable provider and it has maximum MTU of 1500. All intranet is running through a cisco switch.
So 2000 should be enough for buffer size. I don't have any other network interfaces installed.

Best regards,
VM
 
Attention SandyBridge users... New Lnx2Mac RTL81xx available

Have you checked the interface statistics with netstat or in Network Utility? Another thing is the network configuration: is IPv4 and IPv6 configuration correct? what does ifconfig -a show?

Mieze

Compiled with 4000 size and no change.
ifconfig:
Code:
ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	options=3<RXCSUM,TXCSUM>
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
	inet 127.0.0.1 netmask 0xff000000 
	inet6 ::1 prefixlen 128 
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=6b<RXCSUM,TXCSUM,VLAN_HWTAGGING,TSO4,TSO6>
	ether 8c:89:a5:de:13:3c 
	inet6 fe80::8e89:a5ff:fede:133c%en0 prefixlen 64 scopeid 0x4 
	inet 192.168.0.17 netmask 0xffffff00 broadcast 192.168.0.255
	media: autoselect (1000baseT <full-duplex>)
	status: active

netstat report after one try of icloud.com:
Code:
tcp:
	6366 packets sent
		861 data packets (427541 bytes)
		48 data packets (2423 bytes) retransmitted
		0 resends initiated by MTU discovery
		4528 ack-only packets (0 delayed)
		0 URG only packets
		0 window probe packets
		339 window update packets
		590 control packets
		0 data packets sent after flow control
	6187 packets received
		1093 acks (for 427154 bytes)
		163 duplicate acks
		0 acks for unsent data
		5264 packets (6616637 bytes) received in-sequence
		24 completely duplicate packets (3550 bytes)
		0 old duplicate packets
		0 packets with some dup. data (0 bytes duped)
		42 out-of-order packets (46060 bytes)
		0 packets (0 bytes) of data after window
		0 window probes
		1 window update packet
		12 packets received after close
		0 bad resets
		0 discarded for bad checksums
		0 discarded for bad header offset fields
		0 discarded because packet too short
	335 connection requests
	0 connection accepts
	0 bad connection attempts
	0 listen queue overflows
	283 connections established (including accepts)
	180 connections closed (including 42 drops)
		0 connections updated cached RTT on close
		0 connections updated cached RTT variance on close
		0 connections updated cached ssthresh on close
	5 embryonic connections dropped
	1082 segments updated rtt (of 1204 attempts)
	1211 retransmit timeouts
		40 connections dropped by rexmit timeout
		0 connections dropped after retransmitting FIN
	0 persist timeouts
		0 connections dropped by persist timeout
	5 keepalive timeouts
		0 keepalive probes sent
		5 connections dropped by keepalive
	0 correct ACK header predictions
	4784 correct data packet header predictions
	5 SACK recovery episodes
	2 segment rexmits in SACK recovery episodes
	534 byte rexmits in SACK recovery episodes
	38 SACK options (SACK blocks) received
	23 SACK options (SACK blocks) sent
	0 SACK scoreboard overflow
udp:
	753 datagrams received
	0 with incomplete header
	0 with bad data length field
	0 with bad checksum
	9 dropped due to no socket
	0 broadcast/multicast datagrams dropped due to no socket
	0 dropped due to full socket buffers
	0 not for hashed pcb
	744 delivered
	439 datagrams output
ip:
	7369 total packets received
	458 bad header checksums
	0 with size smaller than minimum
	0 with data size < data length
	0 with ip length > max ip packet size
	0 with header length < data size
	0 with data length < header length
	0 with bad options
	0 with incorrect version number
	0 fragments received
	0 fragments dropped (dup or out of space)
	0 fragments dropped after timeout
	0 packets reassembled ok
	6885 packets for this host
	12 packets for unknown/unsupported protocol
	0 packets forwarded (0 packets fast forwarded)
	0 packets not forwardable
	14 packets received for unknown multicast group
	0 redirects sent
	6861 packets sent from this host
	0 packets sent with fabricated ip header
	0 output packets dropped due to no bufs, etc.
	0 output packets discarded due to no route
	0 output datagrams fragmented
	0 fragments created
	0 datagrams that can't be fragmented
	0 tunneling packets that can't find gif
	0 datagrams with bad address in header
	0 packets dropped due to no bufs for control data
icmp:
	9 calls to icmp_error
	0 errors not generated 'cuz old message was icmp
	Output histogram:
		destination unreachable: 9
	0 messages with bad code fields
	0 messages < minimum length
	0 bad checksums
	0 messages with bad length
	0 multicast echo requests ignored
	0 multicast timestamp requests ignored
	Input histogram:
		destination unreachable: 8
	0 message responses generated
	ICMP address mask responses are disabled
igmp:
	4 messages received
	0 messages received with too few bytes
	0 messages received with wrong TTL
	0 messages received with bad checksum
	2 V1/V2 membership queries received
	2 V3 membership queries received
	0 membership queries received with invalid field(s)
	4 general queries received
	0 group queries received
	0 group-source queries received
	0 group-source queries dropped
	0 membership reports received
	0 membership reports received with invalid field(s)
	0 membership reports received for groups to which we belong
	0 V3 reports received without Router Alert
	4 membership reports sent
ipsec:
	0 inbound packets processed successfully
	0 inbound packets violated process security policy
	0 inbound packets with no SA available
	0 invalid inbound packets
	0 inbound packets failed due to insufficient memory
	0 inbound packets failed getting SPI
	0 inbound packets failed on AH replay check
	0 inbound packets failed on ESP replay check
	0 inbound packets considered authentic
	0 inbound packets failed on authentication
	0 outbound packets processed successfully
	0 outbound packets violated process security policy
	0 outbound packets with no SA available
	0 invalid outbound packets
	0 outbound packets failed due to insufficient memory
	0 outbound packets with no route
ip6:
	55 total packets received
	0 with size smaller than minimum
	0 with data size < data length
	0 with bad options
	0 with incorrect version number
	0 fragments received
	0 fragments dropped (dup or out of space)
	0 fragments dropped after timeout
	0 fragments that exceeded limit
	0 packets reassembled ok
	55 packets for this host
	0 packets forwarded
	0 packets not forwardable
	0 redirects sent
	64 packets sent from this host
	0 packets sent with fabricated ip header
	0 output packets dropped due to no bufs, etc.
	0 output packets discarded due to no route
	0 output datagrams fragmented
	0 fragments created
	0 datagrams that can't be fragmented
	0 packets that violated scope rules
	0 multicast packets which we don't join
	Input histogram:
		UDP: 55
	Mbuf statistics:
		0 one mbuf
		two or more mbuf:
			lo0= 55
		0 one ext mbuf
		0 two or more ext mbuf
	0 packets whose headers are not continuous
	0 tunneling packets that can't find gif
	0 packets discarded due to too may headers
	0 failures of source address selection
	0 forward cache hit
	0 forward cache miss
	0 packets dropped due to no bufs for control data
icmp6:
	0 calls to icmp_error
	0 errors not generated because old message was icmp error or so
	0 errors not generated because rate limitation
	Output histogram:
		router solicitation: 3
		neighbor solicitation: 1
		neighbor advertisement: 1
		MLDv2 listener report: 4
	0 messages with bad code fields
	0 messages < minimum length
	0 bad checksums
	0 messages with bad length
	Histogram of error messages to be generated:
		0 no route
		0 administratively prohibited
		0 beyond scope
		0 address unreachable
		0 port unreachable
		0 packet too big
		0 time exceed transit
		0 time exceed reassembly
		0 erroneous header field
		0 unrecognized next header
		0 unrecognized option
		0 redirect
		0 unknown
	0 message responses generated
	0 messages with too many ND options
	0 messages with bad ND options
	0 bad neighbor solicitation messages
	0 bad neighbor advertisement messages
	0 bad router solicitation messages
	0 bad router advertisement messages
	0 bad redirect messages
	0 path MTU changes
ipsec6:
	0 inbound packets processed successfully
	0 inbound packets violated process security policy
	0 inbound packets with no SA available
	0 invalid inbound packets
	0 inbound packets failed due to insufficient memory
	0 inbound packets failed getting SPI
	0 inbound packets failed on AH replay check
	0 inbound packets failed on ESP replay check
	0 inbound packets considered authentic
	0 inbound packets failed on authentication
	0 outbound packets processed successfully
	0 outbound packets violated process security policy
	0 outbound packets with no SA available
	0 invalid outbound packets
	0 outbound packets failed due to insufficient memory
	0 outbound packets with no route
rip6:
	0 messages received
	0 checksum calcurations on inbound
	0 messages with bad checksum
	0 messages dropped due to no socket
	0 multicast messages dropped due to no socket
	0 messages dropped due to full socket buffers
	0 delivered
	0 datagrams output
pfkey:
	0 requests sent to userland
	0 bytes sent to userland
	0 messages with invalid length field
	0 messages with invalid version field
	0 messages with invalid message type field
	0 messages too short
	0 messages with memory allocation failure
	0 messages with duplicate extension
	0 messages with invalid extension type
	0 messages with invalid sa type
	0 messages with invalid address extension
	0 requests sent from userland
	0 bytes sent from userland
	0 messages toward single socket
	0 messages toward all sockets
	0 messages toward registered sockets
	0 messages with memory allocation failure

No errors in syslog.

Best regards,
VM
 
Attention SandyBridge users... New Lnx2Mac RTL81xx available

Looks like you are receiving a lot of bad packets from your router. Please compare

ip:
7369 total packets received
458 bad header checksums

with the values from my machine:

ip:
826304 total packets received
0 bad header checksums

This is a significant number of bad ip headers. The question is now: why does this seem to happen only with the router as intranet connections are working fine?

Mieze

I made some tests with WireShark. All the bad headers are with checksum 0x0000. It seems that IP checksum offload settings are to blame here. And it's intranet too.

Header checksum: 0x0000 [incorrect, should be 0x2107 (may be caused by "IP checksum offload"?)]
Header checksum: 0x0000 [incorrect, should be 0xe415 (may be caused by "IP checksum offload"?)]

My chipset 0x8168E-VL is CFG_METHOD_16 and it doesn't have the checksum offload settings set. I saw that you commented out the dev->features variable. Did you replace it with something else?


Best regards,
VM
 
Attention SandyBridge users... New Lnx2Mac RTL81xx available

Hi Vitualm,

Have you upgraded to the latest Chimera? The issues you have may not be network related.

Give it a try.

Hope it helps.

hpsn
 
Attention SandyBridge users... New Lnx2Mac RTL81xx available

Hi,

I sort it out finally. The chipset reports that can do offload checksum but for some reasons it can't (bad chip revision, etc). My mobo is MSI Z77MA-G45. I search the web and found many people complaining about this (linux, windows drivers). So I did what they did, disable the offload checksum:

sudo sysctl -w net.link.ether.inet.apple_hwcksum_tx=0
sudo sysctl -w net.link.ether.inet.apple_hwcksum_rx=0

In my case setting only rx to 0 helped.

Credit:
http://zaphodb.tumblr.com/post/13972418146/osx-lion-disable-hardware-checksum-offloading-at

I also encounter an wake problem. But that was before checksum disable, maybe it's related.

Many thanks to Mieze for patience and to others for suggestions.

Edit:
Found how to make it permanent:
1. sudo nano /etc/sysctl.conf
2. put this line net.link.ether.inet.apple_hwcksum_rx=0
3. reboot

Best regards,
VM
 
Status
Not open for further replies.
Back
Top