Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E929C6379F for ; Mon, 20 Feb 2023 00:14:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229658AbjBTAMG (ORCPT ); Sun, 19 Feb 2023 19:12:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbjBTAMF (ORCPT ); Sun, 19 Feb 2023 19:12:05 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FD3AC159 for ; Sun, 19 Feb 2023 16:12:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=kRQSDr4fYzeFipfcoVk+0YTchNjho9jsJQS1BZ3IL2U=; b=up zf1DjD8Mmo2SSDtks/5lYkQsmdtdH+5LTUeAqqstyZbWpVwny60H53uipJLQKGdFUnuBrX3vppERP DfX0Nc8Ho37aiCAMNyNk604REv8EpMKZTuEVGJKluqAcsiz+2rog/U3+eGDqLa+x8A7MexzPfR8o4 G8OHHYwX6B3UEDQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pTtmZ-005Sru-1s; Mon, 20 Feb 2023 01:11:51 +0100 Date: Mon, 20 Feb 2023 01:11:51 +0100 From: Andrew Lunn To: Richard Weinberger Cc: wei fang , David Laight , netdev , shenwei wang , xiaoning wang , linux-imx Subject: Re: high latency with imx8mm compared to imx6q Message-ID: References: <1422776754.146013.1676652774408.JavaMail.zimbra@nod.at> <130183416.146934.1676713353800.JavaMail.zimbra@nod.at> <2030061857.147332.1676721783879.JavaMail.zimbra@nod.at> <2015643728.147543.1676726453615.JavaMail.zimbra@nod.at> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2015643728.147543.1676726453615.JavaMail.zimbra@nod.at> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, Feb 18, 2023 at 02:20:53PM +0100, Richard Weinberger wrote: > ----- Ursprüngliche Mail ----- > > Von: "wei fang" > > If you use the ethtool cmd, the minimum can only be set to 1. > > But you can set the coalescing registers directly on your console, > > ENET_RXICn[ICEN] (addr: base + F0h offset + (4d × n) where n=0,1,2) and > > ENET_TXICn[ICEN] (addr: base + 100h offset + (4d × n), where n=0d to 2d) > > set the ICEN bit (bit 31) to 0: > > 0 disable Interrupt coalescing. > > 1 disable Interrupt coalescing. > > or modify you fec driver, but remember, the interrupt coalescing feature > > can only be disable by setting the ICEN bit to 0, do not set the tx/rx > > usecs/frames > > to 0. > > Disabling interrupt coalescing seems to make things much better. :-) Another thing to consider. The FEC in imx8 gained support for EEE. So if your link is otherwise idle, it could be put into low power mode, and takes a little time to wake up. Like most MAC drivers, EEE is broken on the FEC, but it could still be active. You might want to put a printk() in fec_enet_eee_mode_set() and see if it is active. I would not trust ethtool. Andrew