From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDFFFC11F66 for ; Wed, 14 Jul 2021 06:28:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D176F61167 for ; Wed, 14 Jul 2021 06:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237958AbhGNGbU (ORCPT ); Wed, 14 Jul 2021 02:31:20 -0400 Received: from smtp-relay-canonical-0.canonical.com ([185.125.188.120]:40452 "EHLO smtp-relay-canonical-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237948AbhGNGbN (ORCPT ); Wed, 14 Jul 2021 02:31:13 -0400 Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPS id E0DB640658 for ; Wed, 14 Jul 2021 06:28:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1626244095; bh=ifAKi/8NC0EOibZ4i+5eRwicNltCDFNtD419Xm7JbbU=; h=MIME-Version:From:Date:Message-ID:Subject:To:Content-Type; b=u3Dr4RRtR+dXZ80PvpHgV028rCHu+ayargtP+OXzzAPrQGCp/cIcZhBvP8UW3hQeL 8yY2j8hc708R+WmkBeGbNWRKpvmEyT2vgnytEzaUeVqn6qJGl4SJb8YTQctom8uomj 7DV7YAW7A8pPf/j0Qvm4tz7dnP6Wv6iN+dbK8O8Jxw9gzFmxjIKIoxpmTz/plFBQ9V au5XaI0JJ3hC8fBXeDZlH+4W0WzyUp5lOSApVcUS8/8zR+lsMINfD8/POjv1KDs0fv D4jceeGalucYeazXbArMgrbFrNEU3zxwG7QhtAwv8+8Csi9Aztiz/ZkoQ/vGy7+j8X ZutKyzDzKb1oQ== Received: by mail-ej1-f71.google.com with SMTP id nc15-20020a1709071c0fb029052883e9de3eso327917ejc.19 for ; Tue, 13 Jul 2021 23:28:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ifAKi/8NC0EOibZ4i+5eRwicNltCDFNtD419Xm7JbbU=; b=hRHqp+zW6sINE8Gy1QRwI6QLd8QVgVcmfaakfB/fZNssqDZ7VxhfVoNVwLv85xkclP BLares5EMK2lPrEcEDYalHYY8cPc0CEQCYr6tMN6nz8fIaOmu9jl4HQQytRCjSdLZldt WPmpS0XNpcFQC00c70KC9UrleSbVTBY4FRgFYgSjT4va+LuDHgj7u2jxv1obKyPAurNc AeorneBXHAOFiDxE5UPEJFrmX6C/VTzNxMg+OqxLnh83/HX2KmJ9z9Gl/fBrafXAp5de 2Vcb3ruC8mJgJziULfdbH8Em7W+UBVRxpRxCSK65M3z1vt7P3XQz4ig0DazwesW/dTS8 EjAQ== X-Gm-Message-State: AOAM530gMkedA5XMyyhA8mV7ga1LlSTSTPRH2gzhlav8kc4/aYusHZdO rOuFWWog36oKrhjKJk5PO4JgfsqU5F/lUX3k+8OjdrfA3MnTy6DsBmI2ABXh0+1Gsv5PBZDxAXC BzWVrd44Rg0yyS9r+l5wDYLDn7668XOY01SHdqFTpS7EO6ClaIXruZM2oeQ== X-Received: by 2002:a17:907:724b:: with SMTP id ds11mr10892548ejc.192.1626244095514; Tue, 13 Jul 2021 23:28:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3w8m7rtpG6oHyvf3utp6yndL+zmE52W2nspCRV/NYU9TmybG/CY6KQGvNk27u7N3Zfg/SOzh8s5fSCAGMCaw= X-Received: by 2002:a17:907:724b:: with SMTP id ds11mr10892512ejc.192.1626244095137; Tue, 13 Jul 2021 23:28:15 -0700 (PDT) MIME-Version: 1.0 References: <20210712133500.1126371-1-kai.heng.feng@canonical.com> <20210712133500.1126371-2-kai.heng.feng@canonical.com> <3947d70a-58d0-df93-24f1-1899fd567534@intel.com> In-Reply-To: <3947d70a-58d0-df93-24f1-1899fd567534@intel.com> From: Kai-Heng Feng Date: Wed, 14 Jul 2021 14:28:03 +0800 Message-ID: Subject: Re: [Intel-wired-lan] [PATCH 2/3] e1000e: Make mei_me active when e1000e is in use To: Sasha Neftin Cc: Jesse Brandeburg , "Nguyen, Anthony L" , "open list:NETWORKING DRIVERS" , open list , AceLan Kao , Jakub Kicinski , "moderated list:INTEL ETHERNET DRIVERS" , "David S. Miller" , "Ruinskiy, Dima" , devora.fuxbrumer@intel.com, alexander.usyskin@intel.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sasha, On Wed, Jul 14, 2021 at 1:39 PM Sasha Neftin wrote: > > On 7/12/2021 16:34, Kai-Heng Feng wrote: > > Many users report rather sluggish RX speed on TGP I219. Since > > "intel_idle.max_cstate=1" doesn't help, so it's not caused by deeper > > package C-state. > > > > A workaround that always works is to make sure mei_me is runtime active > > when e1000e is in use. > > > > The root cause is still unknown, but since many users are affected by > > the issue, implment the quirk in the driver as a temporary workaround. > Hello Kai-Heng, > First - thanks for the investigation of this problem. As I know CSME/AMT > not POR on Linux and not supported. Recently we started add support for > CSME/AMT none provisioned version (handshake with CSME in s0ix flow - > only CSME with s0ix will support). It is not related to rx bandwidth > problem. I am aware that ME is not POR under Linux, so the commit message states clearly that the patch is just a "temporary workaround". Not every laptop can disable ME/AMT, and I don't think asking user to fiddle with BIOS is a good thing, hence the patch. > I do not know how MEI driver affect 1Gbe driver - so, I would suggest to > involve our CSME engineer (alexander.usyskin@intel.com) and try to > investigate this problem. > Does this problem observed on Dell systems? As I heard no reproduction > on Intel's RVP platform. > Another question: does disable mei_me runpm solve your problem? Yes, disabling runpm on mei_me can workaround the issue, and that's essentially what this patch does by adding DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE flag. Kai-Heng > > > > Also adds mei_me as soft dependency to ensure the device link can be > > created if e1000e is in initramfs. > > > > BugLink: https://bugs.launchpad.net/bugs/1927925 > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213377 > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213651 > > Signed-off-by: Kai-Heng Feng > > --- > > drivers/net/ethernet/intel/e1000e/netdev.c | 26 ++++++++++++++++++++++ > > 1 file changed, 26 insertions(+) > > > > diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c > > index 5835d6cf2f51..e63445a8ce12 100644 > > --- a/drivers/net/ethernet/intel/e1000e/netdev.c > > +++ b/drivers/net/ethernet/intel/e1000e/netdev.c > > @@ -7317,6 +7317,27 @@ static const struct net_device_ops e1000e_netdev_ops = { > > .ndo_features_check = passthru_features_check, > > }; > > > > +static void e1000e_create_device_links(struct pci_dev *pdev) > > +{ > > + struct pci_dev *tgp_mei_me; > > + > > + /* Find TGP mei_me devices and make e1000e power depend on mei_me */ > > + tgp_mei_me = pci_get_device(PCI_VENDOR_ID_INTEL, 0xa0e0, NULL); > > + if (!tgp_mei_me) { > > + tgp_mei_me = pci_get_device(PCI_VENDOR_ID_INTEL, 0x43e0, NULL); > > + if (!tgp_mei_me) > > + return; > > + } > > + > > + if (device_link_add(&pdev->dev, &tgp_mei_me->dev, > > + DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE | > > + DL_FLAG_AUTOREMOVE_CONSUMER)) > > + pci_info(pdev, "System and runtime PM depends on %s\n", > > + pci_name(tgp_mei_me)); > > + > > + pci_dev_put(tgp_mei_me); > > +} > > + > > /** > > * e1000_probe - Device Initialization Routine > > * @pdev: PCI device information struct > > @@ -7645,6 +7666,9 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > > if (pci_dev_run_wake(pdev) && hw->mac.type != e1000_pch_cnp) > > pm_runtime_put_noidle(&pdev->dev); > > > > + if (hw->mac.type == e1000_pch_tgp) > > + e1000e_create_device_links(pdev); > > + > > return 0; > > > > err_register: > > @@ -7917,6 +7941,8 @@ static void __exit e1000_exit_module(void) > > } > > module_exit(e1000_exit_module); > > > > +/* Ensure device link can be created if e1000e is in the initramfs. */ > > +MODULE_SOFTDEP("pre: mei_me"); > > MODULE_AUTHOR("Intel Corporation, "); > > MODULE_DESCRIPTION("Intel(R) PRO/1000 Network Driver"); > > MODULE_LICENSE("GPL v2"); > > > Thanks,Sasha