All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: Re: [RFC,net-next  8/9] net: qos: police action add index for tc flower offloading
@ 2020-06-22  1:19 Po Liu
  0 siblings, 0 replies; only message in thread
From: Po Liu @ 2020-06-22  1:19 UTC (permalink / raw)
  To: Ido Schimmel
  Cc: davem, linux-kernel, netdev, vinicius.gomes, Claudiu Manoil,
	Vladimir Oltean, Alexandru Marginean, Xiaoliang Yang, Roy Zang,
	Mingkai Hu, Jerry Huang, Leo Li, michael.chan, vishal, saeedm,
	leon, jiri, idosch, alexandre.belloni, UNGLinuxDriver, kuba, jhs,
	xiyou.wangcong, john.hurley, simon.horman,
	pieter.jansenvanvuuren, pablo, moshe, ivan.khoronzhuk,
	m-karicheri2, andre.guedes, jakub.kicinski

Hi Ido,


> -----Original Message-----
> From: Ido Schimmel <idosch@idosch.org>
> Sent: 2020年6月21日 18:04
> To: Po Liu <po.liu@nxp.com>
> Cc: davem@davemloft.net; linux-kernel@vger.kernel.org;
> netdev@vger.kernel.org; vinicius.gomes@intel.com; Claudiu Manoil
> <claudiu.manoil@nxp.com>; Vladimir Oltean <vladimir.oltean@nxp.com>;
> Alexandru Marginean <alexandru.marginean@nxp.com>; Xiaoliang Yang
> <xiaoliang.yang_1@nxp.com>; Roy Zang <roy.zang@nxp.com>; Mingkai Hu
> <mingkai.hu@nxp.com>; Jerry Huang <jerry.huang@nxp.com>; Leo Li
> <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
> 
> 
> 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 <Po.Liu@nxp.com>
> 
> 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.

Yes, I am preparing the patches and push again very soon. The patches will add mtu and index for offloading as first step. 
The next step is seeking method to  implement two color + two buckets mode but seems absent one bucket in policing action. The current burst + rate_bytes_ps only can only implement one color+ one bucket policing. 

> 
> 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
> >

Thanks a lot!
Br,
Po Liu


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-22  1:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22  1:19 Re: [RFC,net-next 8/9] net: qos: police action add index for tc flower offloading Po Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.