Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3278128pxb; Tue, 19 Jan 2021 19:45:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJy81D42BRUZJ00PCk/UsNovVi/J4fSxn7Ffsi9LUkXKeDSRq66dKOBeRrgjdvMih45w/lK9 X-Received: by 2002:a17:906:f246:: with SMTP id gy6mr4720927ejb.264.1611114335120; Tue, 19 Jan 2021 19:45:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611114335; cv=none; d=google.com; s=arc-20160816; b=IJV6fFRzieiFji3aZH9kiCHFKgcvcij7dmcIqJjumaJWUY5r8HBfjQVHjoqzy52+YY 7zrKac6jMu7YCwfDRA3sRNWAcP7ugcwRt+/1cV3JEkJnk2oxmWmop4BHHUu5gFblKDxm 0/3FmVXfzjSHV5V+OGGVQ5P4nJXiPPqOWhYMJDH17t7BO5YoD+HLPnIWCS+khyuH1Yxr HPCvIXPPHFxtGsFRxR08NyYdTlxDgc+UYh0U/oLGPxwKtTO99D8sak9nPzVNPWkhNsOI 6qrJkWlADZjJbcIFe6ZyxMysI90w0ukA7tAf4LlM3TpKbxeKRvwgn7ws0YM+3dDy2nXy JgIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=6uE8S3T9BpNSMBlo8j+3osq6gR+oVSHLDQnOaerXim8=; b=iIKDQKOJFKJRx6AXnxwrmr7KcH86Rp9CYf+z3cPcG+Lt3Mqs1t4Wt2VTn0DCfMM1S+ IR6N3cZ5rEHVRW1FY5q8nw+sE12Um/uZN3uSA5smdHdDfP19zVbRhXZq6TpIJuQcY6WI xTOAeH+lvb4y06cRdlZmbnJcUvRQM/sZJAle93v1TECwT8fzsczfEErZlfTjO9fieK3Z Q9JIvekUPW8+p8y/Js2PQX9ucJpoBVEHVV7/mtaSGvgpEW0kqoK4bIatTVKWcYoIHnJc zgsRv9srC3UmToPHBg0sUuReA1gkjfWtR5Q13kzt99OQq2M0gahZeSTA6gK0ts0HlNdi mGWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c95si375032edf.605.2021.01.19.19.44.28; Tue, 19 Jan 2021 19:45:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731064AbhATDkU convert rfc822-to-8bit (ORCPT + 99 others); Tue, 19 Jan 2021 22:40:20 -0500 Received: from rtits2.realtek.com ([211.75.126.72]:57853 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728756AbhATDjw (ORCPT ); Tue, 19 Jan 2021 22:39:52 -0500 Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.73 with qID 10K3cXZv9031456, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexmbs03.realtek.com.tw[172.21.6.96]) by rtits2.realtek.com.tw (8.15.2/2.70/5.88) with ESMTPS id 10K3cXZv9031456 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 20 Jan 2021 11:38:33 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS03.realtek.com.tw (172.21.6.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 20 Jan 2021 11:38:32 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::ecca:80ca:53:e833]) by RTEXMBS04.realtek.com.tw ([fe80::ecca:80ca:53:e833%12]) with mapi id 15.01.2106.006; Wed, 20 Jan 2021 11:38:32 +0800 From: Hayes Wang To: Grant Grundler , Jakub Kicinski , Oliver Neukum CC: "David S. Miller" , nic_swsd , Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH net] net: usb: cdc_ncm: don't spew notifications Thread-Topic: [PATCH net] net: usb: cdc_ncm: don't spew notifications Thread-Index: AQHW7smNYWwyfviJ4EOtGXflgw3CLaov3Wqg Date: Wed, 20 Jan 2021 03:38:32 +0000 Message-ID: <0a5e1dad04494f16869b44b8457f0980@realtek.com> References: <20210120011208.3768105-1-grundler@chromium.org> In-Reply-To: <20210120011208.3768105-1-grundler@chromium.org> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.177.146] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Grant Grundler > Sent: Wednesday, January 20, 2021 9:12 AM > Subject: [PATCH net] net: usb: cdc_ncm: don't spew notifications > > RTL8156 sends notifications about every 32ms. > Only display/log notifications when something changes. > > This issue has been reported by others: > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1832472 > https://lkml.org/lkml/2020/8/27/1083 > > ... > [785962.779840] usb 1-1: new high-speed USB device number 5 using xhci_hcd > [785962.929944] usb 1-1: New USB device found, idVendor=0bda, > idProduct=8156, bcdDevice=30.00 > [785962.929949] usb 1-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=6 > [785962.929952] usb 1-1: Product: USB 10/100/1G/2.5G LAN > [785962.929954] usb 1-1: Manufacturer: Realtek > [785962.929956] usb 1-1: SerialNumber: 000000001 > [785962.991755] usbcore: registered new interface driver cdc_ether > [785963.017068] cdc_ncm 1-1:2.0: MAC-Address: 00:24:27:88:08:15 > [785963.017072] cdc_ncm 1-1:2.0: setting rx_max = 16384 > [785963.017169] cdc_ncm 1-1:2.0: setting tx_max = 16384 > [785963.017682] cdc_ncm 1-1:2.0 usb0: register 'cdc_ncm' at > usb-0000:00:14.0-1, CDC NCM, 00:24:27:88:08:15 > [785963.019211] usbcore: registered new interface driver cdc_ncm > [785963.023856] usbcore: registered new interface driver cdc_wdm > [785963.025461] usbcore: registered new interface driver cdc_mbim > [785963.038824] cdc_ncm 1-1:2.0 enx002427880815: renamed from usb0 > [785963.089586] cdc_ncm 1-1:2.0 enx002427880815: network connection: > disconnected > [785963.121673] cdc_ncm 1-1:2.0 enx002427880815: network connection: > disconnected > [785963.153682] cdc_ncm 1-1:2.0 enx002427880815: network connection: > disconnected > ... > > This is about 2KB per second and will overwrite all contents of a 1MB > dmesg buffer in under 10 minutes rendering them useless for debugging > many kernel problems. > > This is also an extra 180 MB/day in /var/logs (or 1GB per week) rendering > the majority of those logs useless too. > > When the link is up (expected state), spew amount is >2x higher: > ... > [786139.600992] cdc_ncm 2-1:2.0 enx002427880815: network connection: > connected > [786139.632997] cdc_ncm 2-1:2.0 enx002427880815: 2500 mbit/s downlink > 2500 mbit/s uplink > [786139.665097] cdc_ncm 2-1:2.0 enx002427880815: network connection: > connected > [786139.697100] cdc_ncm 2-1:2.0 enx002427880815: 2500 mbit/s downlink > 2500 mbit/s uplink > [786139.729094] cdc_ncm 2-1:2.0 enx002427880815: network connection: > connected > [786139.761108] cdc_ncm 2-1:2.0 enx002427880815: 2500 mbit/s downlink > 2500 mbit/s uplink > ... > > Chrome OS cannot support RTL8156 until this is fixed. > > Signed-off-by: Grant Grundler Reviewed-by: Hayes Wang Best Regards, Hayes