From patchwork Wed Nov 15 14:58:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 10059653 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F20DB60231 for ; Wed, 15 Nov 2017 14:59:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3BCB2868C for ; Wed, 15 Nov 2017 14:59:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6CEB28D1A; Wed, 15 Nov 2017 14:59:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 44A402868C for ; Wed, 15 Nov 2017 14:59:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fg/5vpzo7NM35PxENg/g00VX+gVaIcCijwkjwKc+Zuc=; b=dqPutZLMxbJKsH IlDFJ+r+qE50dwHZLaMl9P4jaxvKH6C1yjdAHXkIH5iD1FPfV1YVqheeupsg79vmWRgV+GoBZyk5z Sz+c2mJSmHUkRJE/9XirTZ44xV6DBxA4vhlMw9CrBuJj7r24RUCZnCt+779JJdmVXNyRdgZdXdoiY ZIMQm/VcdTy9NIvZN/gP6PT74+Jl90EGdbVyFXeST7fHpNI8rR9wlluF7mP1U7UHCiZBvR/g5jkp7 poBPyXyax3tG09M6vWXLProe9AHiTrqtWUKKyd4e0cU3fTjQ96LlNBmRFzTWPgyMSVHRtLCbEOViM hgcMDoYt4b5W3H2Clh8g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eEzAD-0002iv-OQ; Wed, 15 Nov 2017 14:59:41 +0000 Received: from us-smtp-delivery-107.mimecast.com ([63.128.21.107]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eEzA4-0002Xf-9i for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2017 14:59:39 +0000 Received: from CPH-EX1.SDESIGNS.COM (195-215-56-170-static.dk.customer.tdc.net [195.215.56.170]) (Using TLS) by us-smtp-1.mimecast.com with ESMTP id us-mta-26-vR_zGA2bNZKd5yReyGFOpQ-1; Wed, 15 Nov 2017 09:59:03 -0500 X-MC-Unique: vR_zGA2bNZKd5yReyGFOpQ-1 Received: from [172.27.0.114] (172.27.0.114) by CPH-EX1.sdesigns.com (192.168.10.36) with Microsoft SMTP Server (TLS) id 14.3.294.0; Wed, 15 Nov 2017 15:58:59 +0100 Subject: Re: [PATCH v3 3/4] net: nb8800: Move HW init to ndo_open() To: netdev References: <230165aa-eaf1-6e2b-7ff3-45b3ee4ffc62@sigmadesigns.com> <103bc878-9311-a727-1c21-2070e0a480e5@sigmadesigns.com> <4e22ef54-d823-fc29-fedc-d447fa3d9c88@sigmadesigns.com> <30042004-4e13-b7e2-b49d-754db54cc5ce@sigmadesigns.com> From: Marc Gonzalez Message-ID: Date: Wed, 15 Nov 2017 15:58:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.1 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [172.27.0.114] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171115_065932_554301_8ADE5AD7 X-CRM114-Status: UNSURE ( 8.38 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , Mason , Thibaud Cornic , Mans Rullgard , David Miller , Linux ARM Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On 14/11/2017 17:55, Måns Rullgård wrote: > Marc Gonzalez wrote: > >> I will run iperf3 tests with RX_DESC_COUNT lowered to 2. >> Would that produce conclusive results? >> Do you have other suggestions? > > Leave RX_DESC_COUNT alone but add a delay in the nb8800_poll() loop. > That should ensure that queue is drained slowly enough for the buffers > to run out. Using the following patch: I saw both tango4 and tango5 wedged... :-( tango5: [ 5] local 172.27.64.23 port 5201 connected to 172.27.64.1 port 57415 [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 5] 0.00-1.00 sec 6.33 MBytes 53.1 Mbits/sec 0.030 ms 73897/78442 (94%) [ 5] 1.00-2.00 sec 6.59 MBytes 55.3 Mbits/sec 0.040 ms 76944/81675 (94%) [ 5] 2.00-3.00 sec 6.59 MBytes 55.3 Mbits/sec 0.036 ms 76944/81675 (94%) [ 5] 3.00-4.00 sec 6.59 MBytes 55.3 Mbits/sec 0.038 ms 76976/81708 (94%) [ 5] 4.00-5.00 sec 6.59 MBytes 55.3 Mbits/sec 0.038 ms 76976/81708 (94%) [ 5] 5.00-6.00 sec 6.59 MBytes 55.3 Mbits/sec 0.039 ms 76944/81675 (94%) [ 5] 6.00-7.00 sec 6.59 MBytes 55.3 Mbits/sec 0.042 ms 76941/81674 (94%) [ 5] 7.00-8.00 sec 6.59 MBytes 55.3 Mbits/sec 0.048 ms 76976/81707 (94%) [ 5] 8.00-9.00 sec 6.59 MBytes 55.3 Mbits/sec 0.041 ms 76928/81660 (94%) [ 5] 9.00-10.00 sec 6.59 MBytes 55.3 Mbits/sec 0.039 ms 76960/81692 (94%) [ 5] 10.00-10.04 sec 279 KBytes 55.1 Mbits/sec 0.094 ms 3088/3284 (94%) - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 5] 0.00-10.04 sec 0.00 Bytes 0.00 bits/sec 0.094 ms 769574/816900 (94%) ^Ciperf3: interrupt - the server has terminated # ping -c 10 172.27.64.1 PING 172.27.64.1 (172.27.64.1): 56 data bytes --- 172.27.64.1 ping statistics --- 10 packets transmitted, 0 packets received, 100% packet loss tango4: [ 5] local 172.27.64.23 port 5201 connected to 172.27.64.1 port 52983 [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 5] 0.00-1.00 sec 6.24 MBytes 52.3 Mbits/sec 0.035 ms 74019/78498 (94%) [ 5] 1.00-2.00 sec 6.51 MBytes 54.6 Mbits/sec 0.046 ms 77024/81702 (94%) [ 5] 2.00-3.00 sec 6.51 MBytes 54.7 Mbits/sec 0.050 ms 77024/81703 (94%) [ 5] 3.00-4.00 sec 6.51 MBytes 54.7 Mbits/sec 0.050 ms 77024/81703 (94%) [ 5] 4.00-5.00 sec 6.52 MBytes 54.7 Mbits/sec 0.052 ms 77024/81705 (94%) [ 5] 5.00-6.00 sec 6.52 MBytes 54.7 Mbits/sec 0.037 ms 76960/81640 (94%) [ 5] 6.00-7.00 sec 6.52 MBytes 54.7 Mbits/sec 0.043 ms 77008/81689 (94%) [ 5] 7.00-8.00 sec 6.52 MBytes 54.7 Mbits/sec 0.050 ms 77024/81704 (94%) [ 5] 8.00-9.00 sec 6.52 MBytes 54.7 Mbits/sec 0.045 ms 77024/81705 (94%) [ 5] 9.00-10.00 sec 6.52 MBytes 54.7 Mbits/sec 0.043 ms 77008/81688 (94%) [ 5] 10.00-10.04 sec 275 KBytes 54.5 Mbits/sec 0.103 ms 3040/3233 (94%) - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 5] 0.00-10.04 sec 0.00 Bytes 0.00 bits/sec 0.103 ms 770179/816970 (94%) ^Ciperf3: interrupt - the server has terminated # ping -c 10 172.27.64.1 PING 172.27.64.1 (172.27.64.1): 56 data bytes --- 172.27.64.1 ping statistics --- 10 packets transmitted, 0 packets received, 100% packet loss More tests needed... diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c index 31c3f0f10fbb..646300bb53b6 100644 --- a/drivers/net/ethernet/aurora/nb8800.c +++ b/drivers/net/ethernet/aurora/nb8800.c @@ -317,6 +317,7 @@ static int nb8800_poll(struct napi_struct *napi, int budget) len = RX_BYTES_TRANSFERRED(rxd->report); + udelay(200); if (IS_RX_ERROR(rxd->report)) nb8800_rx_error(dev, rxd->report); else @@ -1416,9 +1417,9 @@ static int nb8800_probe(struct platform_device *pdev) netdev_info(dev, "MAC address %pM\n", dev->dev_addr); /* Auto-negotiate by default */ - priv->pause_aneg = true; - priv->pause_rx = true; - priv->pause_tx = true; + priv->pause_aneg = false; + priv->pause_rx = false; + priv->pause_tx = false; priv->ops = match->data; priv->ops->power_down(dev); diff --git a/drivers/net/ethernet/aurora/nb8800.h b/drivers/net/ethernet/aurora/nb8800.h index 23fefca54804..9b59ea776e4a 100644 --- a/drivers/net/ethernet/aurora/nb8800.h +++ b/drivers/net/ethernet/aurora/nb8800.h @@ -7,7 +7,7 @@ #include #include -#define RX_DESC_COUNT 256 +#define RX_DESC_COUNT 16 #define TX_DESC_COUNT 256 #define NB8800_DESC_LOW 4