From owner-freebsd-hackers@freebsd.org Tue Apr 24 05:45:09 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63626FBC1F6 for ; Tue, 24 Apr 2018 05:45:09 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pg0-x234.google.com (mail-pg0-x234.google.com [IPv6:2607:f8b0:400e:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D48BF78FB3 for ; Tue, 24 Apr 2018 05:45:08 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by mail-pg0-x234.google.com with SMTP id e9so10021033pgr.7 for ; Mon, 23 Apr 2018 22:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=IkICy7aMTN3/ZKSXc+zfRT6FjDzO6fc/J82GaH1lars=; b=kYpUTjE4pKfi19WLG/bBfP0AlWrY7odp5+Y1zNI8rNBn0Qol5JJsowyrn2Cl5M+t3b lh78vyTJvFVzgHoLdAbBQQ9QrYasIwLjR+kM038Vb5xnxn0FCnO4DBH/EFDWnyff8GrU iKq7+DLWdkUATdqK/xYpW+8sMGZwFjEp9TbBQuhLrPS7FcCGiBlwXF2IKnoQtDIZ/rJG zwLfX34EqiQVn8eMBW7rgNNNSjXmToOY7sBfKrqIO1+2qqyiToVhwjO/UTijhuumPjim DsZPU7CyV3ckKT+yp4faojWM/Gv/t7vOv39otq9vTDScuQCQgn+45uWv2HzVWWJi4L+i l8YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=IkICy7aMTN3/ZKSXc+zfRT6FjDzO6fc/J82GaH1lars=; b=INup1HNu8dM5I+MO/LEvRy7Eonr8qiYe9fWh4cCW1LKtzE3v6Qp6ddY2vSRtguqSoc 7Giu1VFgOV3wnAr4mOLAWvJnc6a56RhWdcA+Epq2DkBhP2Mpy7lUvjGUE1kg1PqewlFq uH2bwS3RNIPm53OfRkWPkIgxzGk9pKnGzIurvj5qPFkIElFFIH5OJpx/C65SDR+l0pfo K7P6IfqFVAAc4JSe+mjlgKI081faCilcj7BaaJvvRhg2u1UaTaUC26T5H+yJGTULfQkX VH6L7xcA3mJtg7mBa0ce4MHIb1JsoQE7i9REyXaCwZ+fG2QAqEBcB+3bKQAtKIHg5ZWR 2SiA== X-Gm-Message-State: ALQs6tCeIlSbHLjwFPRL7KX6COVdmx0l/YwfGMzK1d96kGANi8dHqnlT BW/P3p44+O8g536iv8iFYVcjuA== X-Google-Smtp-Source: AIpwx4+7pzQflshksdbYMKlK31+0sArpmtDnY+HfClA5IAftkEP1EE2FJi4WkJy/RIInQbzAVu1SrQ== X-Received: by 10.98.7.152 with SMTP id 24mr22535940pfh.94.1524548707940; Mon, 23 Apr 2018 22:45:07 -0700 (PDT) Received: from localhost ([58.237.141.52]) by smtp.gmail.com with ESMTPSA id 86sm32290800pfh.93.2018.04.23.22.45.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Apr 2018 22:45:07 -0700 (PDT) From: YongHyeon PYUN X-Google-Original-From: "YongHyeon PYUN" Received: by localhost (sSMTP sendmail emulation); Tue, 24 Apr 2018 14:45:03 +0900 Date: Tue, 24 Apr 2018 14:45:03 +0900 To: Dieter BSD Cc: freebsd-hackers@freebsd.org Subject: Re: Realtek re(4) driver Message-ID: <20180424054503.GC3123@michelle.fasterthan.co.kr> Reply-To: pyunyh@gmail.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2018 05:45:09 -0000 On Sun, Apr 22, 2018 at 10:57:07PM -0700, Dieter BSD wrote: > With several days more data, the Realtek driver is slightly different > than the stock FreeBSD 10.3 driver, but it still fails a lot, with both > TCP and UDP. > [...] > My re run (1000baseT ) but the pauses happen even with > light traffic. You don't have to run them full blast with rcp/ftp/whatever > to get failures. > I guess benchmarks/netperf or benchmarks/iperf is better tool to measure performance of ethernet driver. rcp/ftp involves other IOs with network IO so you may measure performance of other subsystem. If you see intermittent pauses during the test, try enabling or disabling ethernet flow control of the controller. # Disable flowcontrol #ifconfig re0 media auto -mediaopt flow # Enable flowcontrol #ifconfig re0 media auto mediaopt flow [...] > rcp(1) to 8111F using Realtek driver > Both machines basically idle. > mtu=9000 on both ends but appears to be using 1500 anyway? Cached route may cache the MTU of the interface. You may have to down and re-up the interface to reflect the change. > netstat -w 1 -d -I re0 > > input re0 output > packets errs idrops bytes packets errs bytes colls drops > 5 0 0 330 6 0 755 0 0 > 4 0 0 264 4 0 564 0 0 > 5 0 0 331 5 0 630 0 0 > 17454 0 0 26176844 17453 0 1152264 0 0 > 67883 0 0 101023187 67880 0 4481248 0 0 > 52133 0 0 77141014 52140 0 3444580 0 0 > 72410 0 0 107980584 72409 0 4780384 0 0 > 80736 0 0 120645177 80735 0 5328810 0 0 > 71898 0 0 107298972 71899 0 4745634 0 0 > 14452 0 0 21510681 14475 0 955577 0 0 > 5 0 0 330 6 0 755 0 0 > 4 0 0 264 4 0 564 0 0 > 5 0 0 331 5 0 630 0 0 > 4 0 0 264 4 0 564 0 0 > 65323 0 0 97533279 65321 0 4311552 0 0 > 28383 0 0 42398766 28385 0 1873769 0 0 > 80759 0 0 120315366 80756 0 5330394 0 0 > 80992 0 0 120693553 80995 0 5345772 0 0 > 80932 0 0 120692488 80930 0 5341746 0 0 > 78905 0 0 117912275 78922 0 5209152 0 0 > 80158 0 0 119592452 80159 0 5290728 0 0 These counters are maintained in driver but it's not from MAC of the controller. So you can't tell how much RX packets were dropped before driver sees them. There is an undocumented sysctl variable which reads H/W MAC counters and output them on console. #sysctl dev.re.0.stats=1