From owner-freebsd-net@FreeBSD.ORG Fri May 9 01:47:34 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0288D33E for ; Fri, 9 May 2014 01:47:34 +0000 (UTC) Received: from mail-pd0-x236.google.com (mail-pd0-x236.google.com [IPv6:2607:f8b0:400e:c02::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C9D79E58 for ; Fri, 9 May 2014 01:47:33 +0000 (UTC) Received: by mail-pd0-f182.google.com with SMTP id v10so2988944pde.41 for ; Thu, 08 May 2014 18:47:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=gad3YIsDp/K8B+emcLv7DxV7YaNK5o/yv2GrRtwTO9M=; b=JF8gj2NOJdpxgQH4I5ayJ6dcsjnuNVQQ8Jf6ngt/xOX3FKDZUauxgWHrWjFTGT/eZp qeII0n6YVoLFmhZm7fjY6IBnQrxvCJ9J4swS/+sbjE9w8xTEiklaz/dUGDW1RN1qig/u FU2te3yMCC3/r8CqxT+mBrUvxbtX8DrVxrQLVWyK+RLb6NLVVcC3rjY1qdJN07OM+XGW KxcQU3iV2IVCPAAp1IBY5rkbzF/UqNlj5zNqqp2Smxk6aHQ/cGMvZYxN7VopBH3eR8m1 s18rYH/yClDOIW9fnSKnGVJ9Njepfqmv8ylOwy2QjnUV/epEZ1bl3kSkFP4T7pkyrKYJ oY3w== X-Received: by 10.66.66.202 with SMTP id h10mr14408644pat.70.1399600053371; Thu, 08 May 2014 18:47:33 -0700 (PDT) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPSA id nx12sm686009pab.6.2014.05.08.18.47.30 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 08 May 2014 18:47:32 -0700 (PDT) X-Google-Original-From: "Yonghyeon PYUN" Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Fri, 09 May 2014 10:47:33 +0900 From: Yonghyeon PYUN Date: Fri, 9 May 2014 10:47:33 +0900 To: Michael Tuexen Subject: Re: TX Checksum offloading issue with re interfaces Message-ID: <20140509014733.GB3014@michelle.cdnetworks.com> Reply-To: pyunyh@gmail.com References: <95E18108-E6DD-49EA-90B3-A9F9E5F93D20@lurchi.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <95E18108-E6DD-49EA-90B3-A9F9E5F93D20@lurchi.franken.de> User-Agent: Mutt/1.4.2.3i Cc: FreeBSD Net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 01:47:34 -0000 On Thu, May 08, 2014 at 08:50:48PM +0200, Michael Tuexen wrote: > Dear all, > > while testing checksum offloading of UDP packets over IP with IP options, I figured > out that my card > > dev.re.1.%desc: RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet > dev.re.1.%driver: re > dev.re.1.%location: slot=0 function=0 handle=\_SB_.PCI0.PE1F.LAN2 > dev.re.1.%pnpinfo: vendor=0x10ec device=0x8168 subvendor=0x1734 subdevice=0x1159 class=0x020000 > dev.re.1.%parent: pci13 > dev.re.1.stats: -1 > dev.re.1.int_rx_mod: 65 > > computes the UDP checksum, but stores it in the packet at the place, where it would be, > if there are no IP options. So it corrupts the options in the packet... > > I looked at sys/dev/re/if_re.c, but couldn't figure out how to fix it. Any idea? > re(4) has a very long history on its broken TX checksum offloading. So re(4) has many workarounds for known issues on several variants. re(4) controllers support TX IPv4/TCP/UDP checksum offloading. For 8168C/8168CP, TX IPv4 checksum offloading was disabled due to generation of corrupted frames. Could you show me the dmesg output(only re(4)/rgephy(4))? The vendor uses the same PCI id for its RTL8168/8111 family chips so dmesg output is necessary to know exact controller revision.