From owner-freebsd-stable@FreeBSD.ORG Thu Apr 8 18:17:49 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 725AF106566B for ; Thu, 8 Apr 2010 18:17:49 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-ew0-f224.google.com (mail-ew0-f224.google.com [209.85.219.224]) by mx1.freebsd.org (Postfix) with ESMTP id EF5958FC19 for ; Thu, 8 Apr 2010 18:17:48 +0000 (UTC) Received: by ewy24 with SMTP id 24so120844ewy.33 for ; Thu, 08 Apr 2010 11:17:47 -0700 (PDT) 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=jnI+NiX8Zpk+KsUGjITyidAdkt3kT1CA1N9WzrGeTo8=; b=wLyqaZRAEDaKcia5PdcWJDPRTqOV2qUwV3cSCGbYNG5O1tVlqU30z2eZh95e9tDEub oVDtf7Yws0gFc24j5ogTE9/m/PH6/wVubHpTDxYLBP2QtNDahKAal7qpyQB8HLVuTnEc s8LWs6s0jLSeY3GEZ3ZMgYWb9ai0ct3AE8P88= 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=rAhfjelY3Lf43Rt+PTy8EbB5NLZszqtG4gEJWDJfUzc3ThG+9Z0bM60c2zrI84oOlB AA1gwfQK2nPPMfJ++byHP1o9oUVYZBtOYKEhH/OQI3t1QCtpswweRuQxts8ueEDSx00W eFU6OEgCrPwxnkuec1DqrMpBXldz3tRjtVBf0= Received: by 10.213.63.75 with SMTP id a11mr301560ebi.9.1270750667704; Thu, 08 Apr 2010 11:17:47 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 14sm215200ewy.14.2010.04.08.11.17.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 08 Apr 2010 11:17:45 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Thu, 8 Apr 2010 11:17:41 -0700 From: Pyun YongHyeon Date: Thu, 8 Apr 2010 11:17:41 -0700 To: Mike Tancsa Message-ID: <20100408181741.GI5734@michelle.cdnetworks.com> References: <201004081313.o38DD4JM041821@lava.sentex.ca> <7.1.0.9.0.20100408091756.10652be0@sentex.net> <201004081446.o38EkU7h042296@lava.sentex.ca> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: <201004081446.o38EkU7h042296@lava.sentex.ca> User-Agent: Mutt/1.4.2.3i Cc: freebsd-stable@freebsd.org, jfvogel@gmail.com Subject: Re: em driver regression X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 18:17:49 -0000 --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Apr 08, 2010 at 10:46:22AM -0400, Mike Tancsa wrote: > > OK, some more data... It seems dhclient is getting upset as well > since the updated driver > > Apr 8 10:28:37 ich10 dhclient[1383]: DHCPDISCOVER on em0 to > 255.255.255.255 port 67 interval 6 > Apr 8 10:28:38 ich10 dhclient[1383]: ip length 328 disagrees with > bytes received 332. > Apr 8 10:28:38 ich10 dhclient[1383]: accepting packet with data > after udp payload. > Apr 8 10:28:38 ich10 dhclient[1383]: DHCPOFFER from 192.168.xx.1 > Apr 8 10:28:40 ich10 dhclient[1383]: DHCPREQUEST on em0 to > 255.255.255.255 port 67 > Apr 8 10:28:40 ich10 dhclient[1383]: ip length 328 disagrees with > bytes received 332. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Try this patch. It should fix the issue. It seems Jack forgot to strip CRC bytes as old em(4) didn't strip it, probably to workaround silicon bug of old em(4) controllers. It seems there are also TX issues here. The system load is too high and sometimes system is not responsive while TX is in progress. Because I initiated TCP bulk transfers, TSO should reduce CPU load a lot but it didn't so I guess it could also be related watchdog timeouts you've seen. I'll see what can be done. --BXVAT5kNtrzKuDFl Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="em.crc.patch" Index: sys/dev/e1000/if_em.c =================================================================== --- sys/dev/e1000/if_em.c (revision 206399) +++ sys/dev/e1000/if_em.c (working copy) @@ -3706,6 +3706,8 @@ rxr->next_to_refresh = i; } update: + bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); if (cleaned != -1) /* Update tail index */ E1000_WRITE_REG(&adapter->hw, E1000_RDT(rxr->me), cleaned); @@ -4039,7 +4041,8 @@ rctl |= E1000_RCTL_EN | E1000_RCTL_BAM | E1000_RCTL_LBM_NO | E1000_RCTL_RDMTS_HALF | (hw->mac.mc_filter_type << E1000_RCTL_MO_SHIFT); - + /* Strip CRC bytes. */ + rctl |= E1000_RCTL_SECRC; /* Make sure VLAN Filters are off */ rctl &= ~E1000_RCTL_VFE; rctl &= ~E1000_RCTL_SBP; --BXVAT5kNtrzKuDFl--