From owner-freebsd-net@FreeBSD.ORG Fri Dec 31 00:57:14 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BB17106566C for ; Fri, 31 Dec 2010 00:57:14 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id DD9C18FC13 for ; Fri, 31 Dec 2010 00:57:13 +0000 (UTC) Received: by pzk32 with SMTP id 32so2748350pzk.13 for ; Thu, 30 Dec 2010 16:57:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=CTVYR8Wcn3iVHg2ZKLUEPeenErU11y//U3RVtQw9FjQ=; b=G9N0PaKAVmOEuOVJEiAkg/BvpDr0+aQwV2VeHKq5JU23lTTqtUrDllHCaxKLH2zIgc uqOFfxEK790WVh+9Az6U+QJsP6TDxFWvS7HXt7j9ZQUNVZSEYP1Sa/X7PdNgmKWr/xgB IRPi0HwUY+2UNXOdzfowqSj+LFaSE5+tFytl0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=MVWHDBiknmJK4u+dSgHJlJjFa4DSt01hy6D6AtX4TSmLAwpmU7xMGKrnreHHRIfcJ1 iXZ4qU4EyK8qukxEtkPFL9DX/NafOhGtgMdS9n391S5Doi6sloX9zKG/L+2mEE1c+viY fj/HHprD1cnREbVpGzF+YIBdLCki1WpaDMbp0= Received: by 10.142.165.18 with SMTP id n18mr13725707wfe.175.1293757033419; Thu, 30 Dec 2010 16:57:13 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id e14sm23246048wfg.20.2010.12.30.16.57.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 30 Dec 2010 16:57:11 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Thu, 30 Dec 2010 16:56:28 -0800 From: Pyun YongHyeon Date: Thu, 30 Dec 2010 16:56:28 -0800 To: "Sreekanth M." Message-ID: <20101231005628.GH16411@michelle.cdnetworks.com> References: <9F4F5E1D3FF7D94388F341BE8819BA3D9B553B@orion8.netlogicmicro.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline In-Reply-To: <9F4F5E1D3FF7D94388F341BE8819BA3D9B553B@orion8.netlogicmicro.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org Subject: Re: msk driver rxcsum issue X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2010 00:57:14 -0000 --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Dec 29, 2010 at 12:35:51AM -0800, Sreekanth M. wrote: > Hi, > > > > I am Sreekanth from Netlogic microsystems. > > > > I am having an issue with msk driver. > > It is related to rxcsum. > > In freebsd 9, rxcsum is enabled in default for the device I am using on > XLS MIPS board. > > >From hardware id it is known that chip id is: CHIP_ID_YUKON_EC. > > > > Though I am able to ping to this port, ssh (TCP) is not working. > > > > If I disable the rxcsum through the command > > "Ifconfig msk0 -rxcsum" > > It works. i.e ssh command works fine. > > Would you try attached patch and let me know how it goes on MIPS? --NzB8fVQJ5HfG6fxh Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="msk.csum.diff" Index: sys/dev/msk/if_msk.c =================================================================== --- sys/dev/msk/if_msk.c (revision 216827) +++ sys/dev/msk/if_msk.c (working copy) @@ -3070,7 +3070,7 @@ default: return; } - csum = ntohs(sc_if->msk_csum & 0xFFFF); + csum = bswap16(sc_if->msk_csum & 0xFFFF); /* Checksum fixup for IP options. */ len = hlen - sizeof(struct ip); if (len > 0) { --NzB8fVQJ5HfG6fxh--