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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2078AECAAD5 for ; Mon, 5 Sep 2022 17:01:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231801AbiIERBd (ORCPT ); Mon, 5 Sep 2022 13:01:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232276AbiIERBc (ORCPT ); Mon, 5 Sep 2022 13:01:32 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7F3B5E557 for ; Mon, 5 Sep 2022 10:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To: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=lBZxinyoQmF5EjXzN62yrc+Tx6T3i3l8nt7JxSW9rCU=; b=ogngQalNOdDqLn05ISPb84kghv qoTXUdI4JFHl5CBdZLRdEh6l5f3BFPpLAsXy4njGgGQzEsjLSPfCrAp/zKx5IA3YcicJm0ZsjLJ7x ASE3gdZQ/2UJ+oLiZgiAuNd2yqdStb7wTCDW0FCzeDd3yg9VYqwNz2ESgsXzqgRzyjnM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oVFTJ-00FfMK-BV; Mon, 05 Sep 2022 19:01:17 +0200 Date: Mon, 5 Sep 2022 19:01:17 +0200 From: Andrew Lunn To: Francois Romieu Cc: Heiner Kallweit , Jakub Kicinski , David Miller , Realtek linux nic maintainers , Eric Dumazet , Paolo Abeni , "netdev@vger.kernel.org" Subject: Re: [PATCH net-next] r8169: remove not needed net_ratelimit() check Message-ID: References: <1b1349bd-bb99-de1b-8323-2685d20f0c10@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, Sep 03, 2022 at 05:21:35PM +0200, Francois Romieu wrote: > Heiner Kallweit : > > We're not in a hot path and don't want to miss this message, > > therefore remove the net_ratelimit() check. > > > > Signed-off-by: Heiner Kallweit > > There had historically been some user push against excess "spam" > messages, even when systems are able to stand a gazillion of phy > generated messages - resources constrained systems may not - due > to dysfunctionning hardware or externally triggered events. Ethernet PHYs generally take 1 second to report link down. Auto neg takes a little over 1 second to complete on link up. So i think the worse case here is probably one message per second. Can a resource constrained system be DoS at one message a second? If it really can, i would suggest moving the rate limiting into the phylib helper, so all devices are protected from this DoS vector. Andrew