Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7666812ybl; Thu, 16 Jan 2020 03:38:02 -0800 (PST) X-Google-Smtp-Source: APXvYqxbyUoNW/S0Z3ljjaEiVkX0q5Y2YtotuUzwQvdQ3JBErtlfK17+z+Rnvva3H4IBUK5gmvPd X-Received: by 2002:a9d:5545:: with SMTP id h5mr1630928oti.296.1579174682153; Thu, 16 Jan 2020 03:38:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579174682; cv=none; d=google.com; s=arc-20160816; b=ESz6DfyH/Xtj9nHZkWkUvuffDVAS76lHr6fY7+ub9r/shVOVarSyPjmSXZoWgJa5rv CaGFh6efvARCHcNN561hyZ95fegTjY6/0uYiDKgdErvEbH39b8kIQ+WFJAgg24em3ezO 0J2SjWhGg6GUt67m6F4rwUooyJOJJELDsEHsg2j+b9CS/jUp/YuCZxqwUHo2DhFWkXLW l8+qFZYj90H3ySLqwkS/eQZhjFJbbeSeC9q6bsPro+sZaOWPHrFvHBVEBwaOte9qpoWE u0fSDfQRL+J+pcg0V1iV26worqd9JTNqve+IgR+pJFXiftXScT9vOoTwFqQmqHnTph83 g/Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=OLyXtU526qdx5xf33BlGmE0i1MYknPPelBrjGFUIFwQ=; b=ZtZ3m3Q3+ggwgjKmH8C6qd7tSgQFGx6YR2VEA1EA3QW6yOkSAnIyjecy978hzrPrfc WnG7OFrLsT/1CCoX1wjcWwBRim+SxHL1uu+63xE0FKFRdtU0WaG+fzO2r5AjwD7NGNjU cqsRQESbHLeZZf4GfYfkqmG9aVb2wHVxOgep5OAOoATHsCvCebbIoByhK1uSDqa463hS ETk7UGpg3TRuW2AT0ykWpkbholVRhFR8rcXWcKVNQdCMvOFXmgzNX7j9XwJggTxXrqx8 LOdEWFLyfJl0qJngnJdym3zz8Bso2bOQs5zBhAsqFqyV83q4dKvpXQxQ/BiIjLGGqgo1 2m6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q72si11911684oic.18.2020.01.16.03.37.50; Thu, 16 Jan 2020 03:38:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726730AbgAPLfu (ORCPT + 99 others); Thu, 16 Jan 2020 06:35:50 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:35139 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726406AbgAPLfu (ORCPT ); Thu, 16 Jan 2020 06:35:50 -0500 Received: from kresse.hi.pengutronix.de ([2001:67c:670:100:1d::2a]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1is3R7-00072N-2n; Thu, 16 Jan 2020 12:35:41 +0100 Message-ID: Subject: Re: [PATCH] ARM: dts: colibri-imx7: fix ethernet performance From: Lucas Stach To: Oleksandr Suvorov , "linux-next@vger.kernel.org" Cc: Mark Rutland , "devicetree@vger.kernel.org" , Marcel Ziswiler , Shawn Guo , Sascha Hauer , "linux-kernel@vger.kernel.org" , Igor Opanyuk , Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , "linux-arm-kernel@lists.infradead.org" Date: Thu, 16 Jan 2020 12:35:40 +0100 In-Reply-To: <20200116101313.2524795-1-oleksandr.suvorov@toradex.com> References: <20200116101313.2524795-1-oleksandr.suvorov@toradex.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::2a X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Do, 2020-01-16 at 10:13 +0000, Oleksandr Suvorov wrote: > Performance test of ethernet interface shows extremely low result: > > === w/o fix ================= > Connecting to host 192.168.x.x, port 5201 > [ 5] local 192.168.x.y port59020 connected to 192.168.x.x port 5201 > ... > [ ID] Interval Transfer Bitrate Retr > [ 5] 0.00-10.00 sec 2.78 MBytes 2.33 Mbits/sec 337 sender > [ 5] 0.00-10.00 sec 2.66 MBytes 2.23 > Mbits/sec receiver > ============================= > > Adding correct settings of the mdio bus with the respective phy > fixes this issue. So what's the actual issue being fixed here? High packet loss due to trying to force GBit speeds through 100MBit magnetics? So the addition of "max-speed = <100>;" is the real core of the fix? The commit log should mention this. Regards, Lucas > > === after fix =============== > iperf3 -c 192.168.x.x > Connecting to host 192.168.x.x, port 5201 > [ 5] local 192.168.x.y port 50702 connected to 192.168.x.x port 5201 > ... > [ ID] Interval Transfer Bitrate Retr > [ 5] 0.00-10.00 sec 114 MBytes 95.4 Mbits/sec 56 sender > [ 5] 0.00-10.00 sec 112 MBytes 94.1 > Mbits/sec receiver > ============================= > > Fixed: commit b326629f25b7 ("ARM: dts: imx7: add Toradex Colibri > iMX7S/iMX7D support") > Signed-off-by: Marcel Ziswiler > Signed-off-by: Oleksandr Suvorov > > --- > > arch/arm/boot/dts/imx7-colibri.dtsi | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi > b/arch/arm/boot/dts/imx7-colibri.dtsi > index d05be3f0e2a7..7b6a7c124345 100644 > --- a/arch/arm/boot/dts/imx7-colibri.dtsi > +++ b/arch/arm/boot/dts/imx7-colibri.dtsi > @@ -115,7 +115,20 @@ &fec1 { > assigned-clock-rates = <0>, <100000000>; > phy-mode = "rmii"; > phy-supply = <®_LDO1>; > + phy-handle = <ðphy0>; > fsl,magic-packet; > + > + mdio { > + #address-cells = <1>; > + #size-cells = <0>; > + > + ethphy0: ethernet-phy@0 { > + compatible = "ethernet-phy-ieee802.3-c22"; > + max-speed = <100>; > + micrel,led-mode = <0>; > + reg = <0>; > + }; > + }; > }; > > &flexcan1 {