From owner-freebsd-fs@FreeBSD.ORG Fri Oct 26 01:38:57 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 09C2ED58 for ; Fri, 26 Oct 2012 01:38:57 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-da0-f54.google.com (mail-da0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id C2B6D8FC0C for ; Fri, 26 Oct 2012 01:38:56 +0000 (UTC) Received: by mail-da0-f54.google.com with SMTP id z9so1125078dad.13 for ; Thu, 25 Oct 2012 18:38:56 -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=dLaATWJ20Q/+J86Jz6O7EPB1m4YpK1VdRuZQVBnPfxE=; b=V1NonOilYTj2AQcfGaB+s4/jM/ABdk3YKVkaq87gr3fxs/rjVPMwEtETofQdWUjide rzEUHPRh+wMcrEo5j+KVlXe2Xx5VMjl9R5tG86HW+ivz/oIdn5xYp3AZGWVROw0UjLV6 EcYbMS7UgjCDftXSUYhkHymPeYLdZuHcUYUzqFSvC3RgylGLrQ+V0MdZjYzkKEt0u+y/ Hq8mWDa8lLvARZWiFRACoMBbXNaZ8ujB8DuDRh7mrvkTURiaK31w0La1PuiNF3s4yhej QQTPEjbyKK22t71qQHIXq4IQVbvIghrvO8c0OsXrgDgi9L0AijrpohsMnaNxmSm1UNgT 2Qow== Received: by 10.66.76.98 with SMTP id j2mr57700833paw.65.1351215536075; Thu, 25 Oct 2012 18:38:56 -0700 (PDT) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPS id a10sm95649paz.35.2012.10.25.18.38.52 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 25 Oct 2012 18:38:54 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Fri, 26 Oct 2012 10:38:47 -0700 From: YongHyeon PYUN Date: Fri, 26 Oct 2012 10:38:47 -0700 To: Yamagi Burmeister Subject: Re: Can not read from ZFS exported over NFSv4 but write to it Message-ID: <20121026173847.GA3140@michelle.cdnetworks.com> References: <20121023204623.a1eef4f99b5f786050229b6c@yamagi.org> <1579346453.2736080.1351029315835.JavaMail.root@erie.cs.uoguelph.ca> <20121024213602.b727c557f0332f28a66f87cc@yamagi.org> <20121025180344.GC3267@michelle.cdnetworks.com> <20121025191745.7f6a7582d4401de467d3fe18@yamagi.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="7JfCtLOvnd9MIVvH" Content-Disposition: inline In-Reply-To: <20121025191745.7f6a7582d4401de467d3fe18@yamagi.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2012 01:38:57 -0000 --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 25, 2012 at 07:17:45PM +0200, Yamagi Burmeister wrote: > Hello :) > > On Thu, 25 Oct 2012 11:03:44 -0700 > YongHyeon PYUN wrote: > > > age(4) is cheap and consumer grade controller but it shows > > good performance on various network loads. It's much better choice > > than using other cheap controllers. > > > > Would you show me dmesg output(age(4) and atphy(4) only)? > > And try disabling TSO or TX checksum offloading and see whether > > that makes any difference. > > I remember age(4) had a 64bit DMA bug but it was fixed long > > time ago. > > Yeah I was the one who reported it. This is the same machine... > If disabled TSO and it seems to work. I've copied ~10GB from > the client to the server and the other way round without any > problem. > > The dmesg (with verbose boot enabled) is: > > age0: mem > 0xfeac0000-0xfeafffff irq 18 at device 0.0 on pci2 age0: PCI device > revision : 0x00b0 age0: Chip id/revision : 0x9006 > age0: 1280 Tx FIFO, 2364 Rx FIFO > age0: MSIX count : 0 > age0: MSI count : 1 > age0: attempting to allocate 1 MSI vectors (1 supported) > msi: routing MSI IRQ 256 to local APIC 0 vector 48 > age0: using IRQ 256 for MSI > age0: Using 1 MSI messages. > age0: Read request size : 512 bytes. > age0: TLP payload size : 128 bytes. > age0: 4GB boundary crossed, switching to 32bit DMA addressing mode. > age0: PCI VPD capability not found! > miibus0: on age0 > atphy0: PHY 0 on miibus0 > atphy0: OUI 0x00c82e, model 0x0001, rev. 5 > atphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT-FDX, 1000baseT-FDX-master, auto age0: bpf attached > age0: Ethernet address: 00:23:54:31:a0:12 > pci3: driver added > age0: link state changed to DOWN > age0: interrupt moderation is 100 us. > age0: link state changed to UP Thanks the info. Would you try attached patch? --7JfCtLOvnd9MIVvH Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="age.tso.diff" Index: sys/dev/age/if_age.c =================================================================== --- sys/dev/age/if_age.c (revision 242114) +++ sys/dev/age/if_age.c (working copy) @@ -1562,8 +1562,12 @@ age_encap(struct age_softc *sc, struct mbuf **m_he *m_head = NULL; return (ENOBUFS); } - ip = (struct ip *)(mtod(m, char *) + ip_off); tcp = (struct tcphdr *)(mtod(m, char *) + poff); + m = m_pullup(m, poff + (tcp->th_off << 2)); + if (m == NULL) { + *m_head = NULL; + return (ENOBUFS); + } /* * L1 requires IP/TCP header size and offset as * well as TCP pseudo checksum which complicates @@ -1578,14 +1582,11 @@ age_encap(struct age_softc *sc, struct mbuf **m_he * Reset IP checksum and recompute TCP pseudo * checksum as NDIS specification said. */ + ip = (struct ip *)(mtod(m, char *) + ip_off); + tcp = (struct tcphdr *)(mtod(m, char *) + poff); ip->ip_sum = 0; - if (poff + (tcp->th_off << 2) == m->m_pkthdr.len) - tcp->th_sum = in_pseudo(ip->ip_src.s_addr, - ip->ip_dst.s_addr, - htons((tcp->th_off << 2) + IPPROTO_TCP)); - else - tcp->th_sum = in_pseudo(ip->ip_src.s_addr, - ip->ip_dst.s_addr, htons(IPPROTO_TCP)); + tcp->th_sum = in_pseudo(ip->ip_src.s_addr, + ip->ip_dst.s_addr, htons(IPPROTO_TCP)); } *m_head = m; } --7JfCtLOvnd9MIVvH--