From owner-freebsd-net@FreeBSD.ORG Mon Jul 15 06:47:36 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C6FC5DED for ; Mon, 15 Jul 2013 06:47:36 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pb0-x235.google.com (mail-pb0-x235.google.com [IPv6:2607:f8b0:400e:c01::235]) by mx1.freebsd.org (Postfix) with ESMTP id A0D09C14 for ; Mon, 15 Jul 2013 06:47:36 +0000 (UTC) Received: by mail-pb0-f53.google.com with SMTP id xb12so10938830pbc.26 for ; Sun, 14 Jul 2013 23:47:36 -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=PaTjONhsniBy8BBwXY8xqCZqWtSvfZXIEOoKJpTcm/4=; b=hZPSZ+o+TxjC5f2/ywdVpulfAOz4MWZlRpDWldYb+JEjzKbm7y3BaHxEc+V6jqzTrm GMkdZLkh5S3Q86bRSeSIBwJeKAFCgNtnVWYmS3DyQk737csZe0JF/W1VmIhgnyBQIFk2 Z2yQj5CvtJ7vvG3ibwX2D6q1cbuBAmEK6fYh+vNBTOWToiZnYf0glogcaYX7oMI7jg+K dAxzS5/nmSa9Rld4bNjBRnqZjft5V4nv5T4PppE4c644X6uoXtybljeQgki0zbf6qpZK uDPXP7OGHMJ7gK0e9JO0ftp4KrkN8oL8uL/SQgLXJi2+i3j+2SDqrEg97owjtAZpZab4 hbTA== X-Received: by 10.66.2.130 with SMTP id 2mr53866577pau.13.1373870856425; Sun, 14 Jul 2013 23:47:36 -0700 (PDT) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPSA id re16sm62666474pac.16.2013.07.14.23.47.33 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 14 Jul 2013 23:47:35 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 15 Jul 2013 15:47:31 +0900 From: Yonghyeon PYUN Date: Mon, 15 Jul 2013 15:47:30 +0900 To: Andreas Longwitz Subject: Re: sis(4) flow control Message-ID: <20130715064730.GA1088@michelle.cdnetworks.com> References: <51DC1599.8040805@incore.de> <20130710023512.GB2753@michelle.cdnetworks.com> <51DDDDAB.6070100@incore.de> <20130711002557.GA6697@michelle.cdnetworks.com> <51E1B8F0.5030100@incore.de> <20130714100347.GA1105@michelle.cdnetworks.com> <51E30186.9050707@incore.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51E30186.9050707@incore.de> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 15 Jul 2013 06:47:36 -0000 On Sun, Jul 14, 2013 at 09:52:38PM +0200, Andreas Longwitz wrote: > Yonghyeon PYUN wrote: > > >> Maybe there is a bug in vr(4) that generates the hang, but why is > > > > Probably yes and I shall have to narrow down the issue. > > One more hint: No hang - but of course no TX support - anymore, when I use > > --- if_vr.c.orig 2013-06-25 09:58:29.000000000 +0200 > +++ if_vr.c 2013-07-14 18:09:12.000000000 +0200 > @@ -351,7 +351,6 @@ > fc |= VR_FLOWCR1_RXPAUSE; > if ((IFM_OPTIONS(mii->mii_media_active) & > IFM_ETH_TXPAUSE) != 0) { > - fc |= VR_FLOWCR1_TXPAUSE; > sc->vr_flags |= VR_F_TXPAUSE; > } > CSR_WRITE_1(sc, VR_FLOWCR1, fc); > > Probably the RX pause frames will work with this patch. Yes but it also disables generating TX pause frames. The controller is not smart enough to know how many number of RX buffers are available so driver has to explicitly tell the amount of free RX buffers. It seems the logic has a bug. > > >> negotiation of flowcontrol on vr(4) not done at boot time as shown for > >> msk(4) ? > >> > > > > msk(4) supported flow-control from day 1 with a hack and it was > > re-implemented later with proper way such that it always announces > > flow-control. However for other drivers(i.e vr(4)) that didn't > > support the feature in the beginning, you have to explicitly enable > > the feature. The decision was made to provide compatibility and to > > not introduce POLA. > > Thanks for clarification, I see the flag MIIF_FORCEPAUSE does the job. > > >> If you need more information about the hang let me know. > > > > I guess it would be good idea to use a link partner that shows > > hardware MAC statistics. If your switch provides such information > > that's fine. If you use direct connection between two hosts without > > switch, use other network drivers(most gigabit controllers support > > hardware MAC counters). > > I can easy realize to use my laptop with msk(4) as a link partner for my > soekris box with vr(4). > > -- > Dr. Andreas Longwitz >