From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942999AbcJaNY2 (ORCPT ); Mon, 31 Oct 2016 09:24:28 -0400 Received: from pb-sasl1.pobox.com ([64.147.108.66]:52850 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941170AbcJaNY0 (ORCPT ); Mon, 31 Oct 2016 09:24:26 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=subject:to :references:cc:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sasl; b=rh3eo9 W7kla7kBcY5vUI+pviCzpJ/aKZ/s3laZnsLe7H7FUqkyXBVe2d0RN6nf4yjJx5ht 747cl5gceLbL9OdjmHkoOi0n86hehPvUa6L3UyiiIrG6Kw6H6UqfOBvyc0rEgnFv rXKBazvE1/HPrGq0kbXcez1jnDJZW3R2r7Zig= Subject: Re: [PATCH net] r8152: Fix broken RX checksums. To: Hayes Wang , David Miller References: <9fb6be7b-95f3-6e59-c0f4-1d6c3357416d@pobox.com> <20161030.205755.1198665157526465556.davem@davemloft.net> <1f847ae0-4928-01e7-f1e7-3cbc37529961@pobox.com> <20161030.235342.134481656830778556.davem@davemloft.net> <0835B3720019904CB8F7AA43166CEEB201047353@RTITMBSV03.realtek.com.tw> Cc: nic_swsd , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Mark Lord Message-ID: <5fca7aed-c6d5-85f0-0fad-f8eea384e613@pobox.com> Date: Mon, 31 Oct 2016 09:24:23 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <0835B3720019904CB8F7AA43166CEEB201047353@RTITMBSV03.realtek.com.tw> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: 57466698-9F6D-11E6-9AAF-92296462E9F6-82205200!pb-sasl1.pobox.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16-10-31 04:14 AM, Hayes Wang wrote: > > Our hw engineer says only VER_01 has the issue about rx checksum. > I need more information for checking it. I've been doing driver work for Linux since 1991, and learned long ago not to trust engineering specs 100%. Get yourself a Raspberry Pi v1, set up an NFSROOT root filesystem for it, and boot/run from that using the ethernet dongle to connect. It should segfault like crazy when hardware RX checksums are enabled. Definitely something wrong there, and whatever it is goes away when RX checksums are disabled in the driver. I have two theories as to why this happens: 1) The hardware buffer on the dongle overflows because the slow host CPU does not empty it quickly enough. This results in a bad checksum on the final/truncated packet in the buffer. The chip does not detect this. 2) Perhaps the device driver is looking at the wrong bits. Either way, this results in data corruption and until otherwise fixed, it is safest to just not enable RX checksums. If it happens on a slow embedded CPU, then it can also happen on a heavily loaded Intel/AMD CPU -- just a lot less frequently. Cheers -- Mark Lord Real-Time Remedies Inc. mlord@pobox.com