Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp483882pxj; Thu, 10 Jun 2021 05:44:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlXTG5EOWzT0gbPN300oB3BmgC+l18KVZUJR04fu+za7JghCdxeq8lQIE1kXJH1cuVnuGO X-Received: by 2002:a17:906:f111:: with SMTP id gv17mr4270023ejb.435.1623329051586; Thu, 10 Jun 2021 05:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623329051; cv=none; d=google.com; s=arc-20160816; b=Kwkm/BTfxMhElzaZslXq2FaDoimXiptLHHRaRdD7wlD0Hv78oR6WZUR2DYRn4AIcds EU+E9RLJ6fh/OPU5LfzhTLIT15akmsOgGbX7p1XohnFyrSHYOgwgDLP7vjxNlgs0mfhf +lk/DeCrRWvULqbd/NYplvg4gOnjid+0/U9EgnD/3Ga54MLpwcjdICV7kFINnE8Enqnz Lj7K6dIserKXJcUqBwBT2wF8WzajZ/bOOSaUnjAkvWUsYuvioFIQltuheY30nvp8Obfc UTcu7ezyPGlDQGy044cV3v+SL6fmzgTvJDY4UgCs3jDrKw38TtW24Z20UQdX+1OSdpIE OX7g== 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:dkim-signature; bh=fYZOkkqyGXk8JYKQg4+wXZffVcyqp6AA7a9W28AH5c0=; b=mMhSGe7kSrbejGGA1F24AnglfTg1AaMDrWlEWy76PR0XYN0hHG2IsbUhWEQDfsX1MX /4yk/SyEH1TsyGzpxmMi+EWWGaQoRDycL09gBEnR5mtzAR2L5m6pEcHyuKUs6TLiORgl 3hcMUAUR7pEMzdckIS2HR7JOVh0WEu9UskBgRND9AoVWM2oTCOR49S/MEGDLBx2jo/0I 5H+CGrwNptXMl/mGtmnwRdMioIYJmKnqNKPPg7lbcklQ7aecl31Puz/CBUUc0n/p0uXl WG7Sw15zdz1S0Mi0hz+oV4vEV2k1H+NtKCvm3pXg0An4DyNmsz/60iows3EXtOiQTdMg MlnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="cwod/ROh"; 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 gh25si2156123ejb.170.2021.06.10.05.43.48; Thu, 10 Jun 2021 05:44:11 -0700 (PDT) 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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="cwod/ROh"; 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 S230317AbhFJMn1 (ORCPT + 99 others); Thu, 10 Jun 2021 08:43:27 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:56260 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230238AbhFJMn0 (ORCPT ); Thu, 10 Jun 2021 08:43:26 -0400 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=fYZOkkqyGXk8JYKQg4+wXZffVcyqp6AA7a9W28AH5c0=; b=cwod/ROhT7dqe5F485qk6xUjBX Ms5LwknrYrkc2TrbQmnpilaN9Jvg74rib3eyuOosO+zhkisVrd2a6hjlAExXekGdljQyE+YtUyRxd vKU7W/AunYaMSyRtOseVks8bZ++ZUOs/n0d6LmuNX0r7dGF3d4XV4xu6A+ckb84DP7M4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1lrJzu-008evV-Sv; Thu, 10 Jun 2021 14:41:22 +0200 Date: Thu, 10 Jun 2021 14:41:22 +0200 From: Andrew Lunn To: Oleksandr Mazur Cc: jiri@nvidia.com, davem@davemloft.net, kuba@kernel.org, Vadym Kochan , Taras Chornyi , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 10/11] net: marvell: prestera: add storm control (rate limiter) implementation Message-ID: References: <20210609151602.29004-1-oleksandr.mazur@plvision.eu> <20210609151602.29004-11-oleksandr.mazur@plvision.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210609151602.29004-11-oleksandr.mazur@plvision.eu> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 09, 2021 at 06:16:00PM +0300, Oleksandr Mazur wrote: > Storm control (BUM) provides a mechanism to limit rate of ingress > port traffic (matched by type). Devlink port parameter API is used: > driver registers a set of per-port parameters that can be accessed to both > get/set per-port per-type rate limit. > Add new FW command - RATE_LIMIT_MODE_SET. Hi Oleksandr Just expanding on the two comments you already received about this. We often see people miss that switchdev is about. It is not about writing switch drivers. It is about writing network stack accelerators. You take a feature of the Linux network stack and you accelerate it by offloading it to the hardware. So look around the network stack and see how you configure it to perform rate limiting of broadcast traffic ingress. Once you have found a suitable mechanism, accelerate it via offloading. If you find Linux has no way to perform a feature the hardware could accelerate, you first need to add a pure software version of that feature to the network stack, and then add acceleration support for it. Andrew