Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1906175ybt; Sun, 21 Jun 2020 03:08:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyB+4pPZog4IWh2TLgKGFekKR76iJDi2qlPjVVHPNKjj6J4O5SyfErqYX5aTQvZLWCw1EmH X-Received: by 2002:aa7:cb53:: with SMTP id w19mr11492218edt.328.1592734097446; Sun, 21 Jun 2020 03:08:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592734097; cv=none; d=google.com; s=arc-20160816; b=pYc2iLy2HjF4fFg8t4x8/KGXADX0sfalilFtEQbFTlFE9qHu6177lDbD4JvTxdRz70 TagwXlTlsDokYY1IS7GhUZiK4bXrLyI5Q+h6xd4Nr1TxDDWmsmuNiabZDqRWRXWVK0gM EW7JkSFKlfcGYcYIfRs8CyYftM/vIMZCwieaHSW6OHUKeIfSkSsROAMjn1aky72/ozeY WJTi0RxEE+r/tc4fzOw16HwIezY2bln1/6seDKMs8gp/9EgDd0QWH/InBeuWVIcEg3Uv 1zTeZlKzV+BE7FX06LByKEHPxJXuPBwdWYHP0icYXuwHGeq7+S2soNGURmJJ3iOaKYGZ Q/Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=enaKZ3P0o6Ph93CXxGqso4eTkC9mjZncv8RRs2hdv58=; b=nTN6910HBj692yzpY2pKFAr3qw4LDpnJmdgHNoAI7icmA6KR+l4pPv4c312aYpvyfK lFXRNbQlAncxqovxYv1iHwO9Cky/gSzHYBmC6oBsdVP6kBwI34VOgPheUyTHr3MrnZRc AZOln1XQv/iIa0AEoB+vGggS0Y9J6WtILIkMdUPmtq7Cef5b47J6hdddW54Y96klIPSC fI1Oli1xz4cPoIWZ5NFsLGtBKpEDsz1KKtpXwDZNsFDfYma9nezMyke8lbQp0v/NzfuU Pl2wpZ/a3Y9bl926lS3pj+wGU3fqTaav1ZVYxuc+kOE/23sSFbWVLk48x6Dq9jtX9WLL hmTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=qSVkPh5f; 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 l13si7015523ejx.63.2020.06.21.03.07.54; Sun, 21 Jun 2020 03:08:17 -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=@messagingengine.com header.s=fm3 header.b=qSVkPh5f; 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 S1729754AbgFUKEL (ORCPT + 99 others); Sun, 21 Jun 2020 06:04:11 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:49637 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729628AbgFUKEL (ORCPT ); Sun, 21 Jun 2020 06:04:11 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 74B39580593; Sun, 21 Jun 2020 06:04:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sun, 21 Jun 2020 06:04:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=enaKZ3 P0o6Ph93CXxGqso4eTkC9mjZncv8RRs2hdv58=; b=qSVkPh5f68sJYg9Kbd4/0O 1IXyxTdX4yBpIBWQvYcvzxKJPqI22Xi9CckdmoDKcTGC6KTOqJfOVi0VyE3/R6fv 7kq63p960rUJTwQpJpt7/RlHCk2OYMqVjDUmSVcnn0lBOOH9dO4fKcOssYx1BoLW +egUCtkskJCxqDNlxxTbn4dNk1+/GJMJvreRPCXsKqhSAhCO7GuZwPxHdUANZubz 9hniGX5jUxkjX5caN3RsQ25Udponx1xJcZJhNyojShpkEZyhkLyAxx3GWfWIWTyH K2324JzdzpUFWi8PwU23t6QbhQ9sI8qGc1N/DltoE1W0xKIfTGZSEISOufFDSYFA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudektddgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefkughoucfu tghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrdhorhhgqeenucggtffrrghtth gvrhhnpedtffekkeefudffveegueejffejhfetgfeuuefgvedtieehudeuueekhfduheel teenucfkphepuddtledrieejrdekrdduvdelnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepihguohhstghhsehiughoshgthhdrohhrgh X-ME-Proxy: Received: from localhost (bzq-109-67-8-129.red.bezeqint.net [109.67.8.129]) by mail.messagingengine.com (Postfix) with ESMTPA id 330BC3280060; Sun, 21 Jun 2020 06:04:08 -0400 (EDT) Date: Sun, 21 Jun 2020 13:04:06 +0300 From: Ido Schimmel To: Po Liu Cc: davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, vinicius.gomes@intel.com, claudiu.manoil@nxp.com, vladimir.oltean@nxp.com, alexandru.marginean@nxp.com, xiaoliang.yang_1@nxp.com, roy.zang@nxp.com, mingkai.hu@nxp.com, jerry.huang@nxp.com, leoyang.li@nxp.com, michael.chan@broadcom.com, vishal@chelsio.com, saeedm@mellanox.com, leon@kernel.org, jiri@mellanox.com, idosch@mellanox.com, alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com, kuba@kernel.org, jhs@mojatatu.com, xiyou.wangcong@gmail.com, john.hurley@netronome.com, simon.horman@netronome.com, pieter.jansenvanvuuren@netronome.com, pablo@netfilter.org, moshe@mellanox.com, ivan.khoronzhuk@linaro.org, m-karicheri2@ti.com, andre.guedes@linux.intel.com, jakub.kicinski@netronome.com Subject: Re: [RFC,net-next 8/9] net: qos: police action add index for tc flower offloading Message-ID: <20200621100406.GA481939@splinter> References: <20200306125608.11717-1-Po.Liu@nxp.com> <20200306125608.11717-9-Po.Liu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200306125608.11717-9-Po.Liu@nxp.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 06, 2020 at 08:56:06PM +0800, Po Liu wrote: > Hardware may own many entries for police flow. So that make one(or > multi) flow to be policed by one hardware entry. This patch add the > police action index provide to the driver side make it mapping the > driver hardware entry index. > > Signed-off-by: Po Liu Hi, I started looking into tc-police offload in mlxsw and remembered your patch. Are you planning to formally submit it? I'm asking because in mlxsw it is also possible to share the same policer between multiple filters. Thanks > --- > include/net/flow_offload.h | 1 + > net/sched/cls_api.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h > index 54df87328edc..3b78b15ed20b 100644 > --- a/include/net/flow_offload.h > +++ b/include/net/flow_offload.h > @@ -201,6 +201,7 @@ struct flow_action_entry { > bool truncate; > } sample; > struct { /* FLOW_ACTION_POLICE */ > + u32 index; > s64 burst; > u64 rate_bytes_ps; > u32 mtu; > diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c > index 363d3991793d..ce846a9dadc1 100644 > --- a/net/sched/cls_api.c > +++ b/net/sched/cls_api.c > @@ -3584,6 +3584,7 @@ int tc_setup_flow_action(struct flow_action *flow_action, > entry->police.rate_bytes_ps = > tcf_police_rate_bytes_ps(act); > entry->police.mtu = tcf_police_mtu(act); > + entry->police.index = act->tcfa_index; > } else if (is_tcf_ct(act)) { > entry->id = FLOW_ACTION_CT; > entry->ct.action = tcf_ct_action(act); > -- > 2.17.1 >