Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3458006pxb; Mon, 16 Nov 2020 15:34:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJzB4w6ykIyZvg7lBaC6nZvX+peRCYylhrPSY5706AVseuo7ERJVM5M+sZrt7eGJ9BLKs6eD X-Received: by 2002:aa7:d858:: with SMTP id f24mr17529892eds.12.1605569650146; Mon, 16 Nov 2020 15:34:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605569650; cv=none; d=google.com; s=arc-20160816; b=JIHYGDzG1/pg5cytCjE6RdVSvUtMNh4jnSiPyL2A2cdlVhMjQqcD7XVkZXssZ50Cay NYwIHzmILYd2IKXmWr5r7RDoVw3SqnjB0sqUqQVtcaZm7l7jnalb7KGHIzn8Z4qsN/iy q7LN+DpJTEEFxn5MdiunRGRYrKb9rDr+1O5ZzfE1Mnqz4Y+c6Z26KL2rYJ7wYsqGy8V4 I6GVgHHxAjopOn3XM3jvb/QkZFgk/q6vCx+PYRyLFnDzFpSCkSri5ycoD3XCmuD0Lxko /DNa12AMvUfiFjiQvBLiNpYhiPGt120nfJM0Tp3AR4OqtZAUF4kgQSv2ApzeuCM7HMQO UfAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=5ou/5pW7AIVEvFHUa9jT/7OvHUMLYuW3hQS9lGnvLJc=; b=01JWK1PLKu3z+KQ3+ksuTdJs41flSA1AveVoY66dsF4pDIEeiM3V4pILIsLcnKX/R1 gsvTgcoBIwQVQPMLlFe+b8EKOOGCEO2jxKPUht8MJrqkRMH00V19ltD+0/0ueGtfVko+ gowtJnWsyq+3uumAtcpiNxVzzYCAozvSJFz0ZnhAKZc9RMZIV3Jc4VdzPYqlztMCwoHP jPiDu6zpH1GqHBTESQbeUlWV6sDk27tcgQ+ae4oRvJohTCTUh3Kof8ksWQ1kgcnYEAkc 5EdDpyPDgJoLN7mfuQV0jRFlcK0o7bgPB0t+OQ0WEfQbmKCq8ZCEV5j281oV52eve5z+ eaPw== 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 w29si42033edi.534.2020.11.16.15.33.47; Mon, 16 Nov 2020 15:34:10 -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 S1729983AbgKPXag (ORCPT + 99 others); Mon, 16 Nov 2020 18:30:36 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:58850 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726227AbgKPXag (ORCPT ); Mon, 16 Nov 2020 18:30:36 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kenx5-007QmT-IU; Tue, 17 Nov 2020 00:30:27 +0100 Date: Tue, 17 Nov 2020 00:30:27 +0100 From: Andrew Lunn To: Vladimir Oltean Cc: Grygorii Strashko , "David S. Miller" , netdev@vger.kernel.org, Jakub Kicinski , Vignesh Raghavendra , Sekhar Nori , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Tony Lindgren , Jamal Hadi Salim , Cong Wang , Jiri Pirko Subject: Re: [PATCH net-next 3/3] net: ethernet: ti: am65-cpsw: enable broadcast/multicast rate limit support Message-ID: <20201116233027.GC1756591@lunn.ch> References: <20201114035654.32658-1-grygorii.strashko@ti.com> <20201114035654.32658-4-grygorii.strashko@ti.com> <20201114191723.rvmhyrqinkhdjtpr@skbuf> <20201116185919.qwaklquxhhhtqttg@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201116185919.qwaklquxhhhtqttg@skbuf> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Same as above, just in packets per second. > > tc qdisc add dev eth0 clsact > tc filter add dev eth0 ingress flower skip_sw \ > dst_mac 01:00:00:00:00:00/01:00:00:00:00:00 \ > action police rate 20kpps I agree with Vladimir here. Since the hardware does PPS limits, the TC API should also be PPS limit based. And as you said, CPU load is more a factor of PPS than BPS, so it is a useful feature in general to have. You just need to implement the software version first, before you offload it to the hardware. Andrew