[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB8PR04MB578599F04A8764034485CE89F0A39@DB8PR04MB5785.eurprd04.prod.outlook.com>
Date: Thu, 23 Sep 2021 01:52:38 +0000
From: Xiaoliang Yang <xiaoliang.yang_1@....com>
To: Vladimir Oltean <vladimir.oltean@....com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"allan.nielsen@...rochip.com" <allan.nielsen@...rochip.com>,
"joergen.andreasen@...rochip.com" <joergen.andreasen@...rochip.com>,
"UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
"vinicius.gomes@...el.com" <vinicius.gomes@...el.com>,
"michael.chan@...adcom.com" <michael.chan@...adcom.com>,
"vishal@...lsio.com" <vishal@...lsio.com>,
"saeedm@...lanox.com" <saeedm@...lanox.com>,
"jiri@...lanox.com" <jiri@...lanox.com>,
"idosch@...lanox.com" <idosch@...lanox.com>,
"alexandre.belloni@...tlin.com" <alexandre.belloni@...tlin.com>,
"kuba@...nel.org" <kuba@...nel.org>, Po Liu <po.liu@....com>,
Leo Li <leoyang.li@....com>,
"f.fainelli@...il.com" <f.fainelli@...il.com>,
"andrew@...n.ch" <andrew@...n.ch>,
"vivien.didelot@...il.com" <vivien.didelot@...il.com>,
Claudiu Manoil <claudiu.manoil@....com>,
Horatiu Vultur <horatiu.vultur@...rochip.com>
Subject: RE: [PATCH v4 net-next 7/8] net: mscc: ocelot: use index to set vcap
policer
On Wed, Sep 22, 2021 at 13:18:37 +0000, Vladimir Oltean wrote:
> > Policer was previously automatically assigned from the highest index
> > to the lowest index from policer pool. But police action of tc flower
> > now uses index to set an police entry. This patch uses the police
> > index to set vcap policers, so that one policer can be shared by multiple
> rules.
> >
> > Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@....com>
> > ---
> > +#define VSC9959_VCAP_POLICER_BASE 63
> > +#define VSC9959_VCAP_POLICER_MAX 383
> >
>
> > +#define VSC7514_VCAP_POLICER_BASE 128
> > +#define VSC7514_VCAP_POLICER_MAX 191
>
> I think this deserves an explanation.
>
> The VSC7514 driver uses the max number of policers as 383 (0x17f) ever since
> commit b596229448dd ("net: mscc: ocelot: Add support for tcam"), aka the
> very beginning.
>
> Yet, the documentation at "3.10.1 Policer Allocation"
> https://ww1.microchip.com/downloads/en/DeviceDoc/VMDS-10491.pdf
> says very clearly that there are only 192 policers indeed.
>
> What's going on?
In commit commit b596229448dd ("net: mscc: ocelot: Add support for tcam"), Horatiu Vultur define the max number of policers as 383:
+#define OCELOT_POLICER_DISCARD 0x17f
VCAP IS2 use this policer to set drop action. I did not change this and set the VCAP policers with 128-191 according to the VSC7514 document.
I don't know why 383 was used as the maximum value of policer in the original code. Can Microchip people check the code or the documentation for errors?
>
> Also, FWIW, Seville has this policer allocation:
>
> 0 ----+----------------------+
> | Port Policers (11) |
> 11 ----+----------------------+
> | VCAP Policers (21) |
> 32 ----+----------------------+
> | QoS Policers (88) |
> 120 ----+----------------------+
> | VCAP Policers (43) |
> 162 ----+----------------------+
I didn't find Seville's document, if this allocation is right, I will add it in Seville driver.
Thanks,
Xiaoliang
Powered by blists - more mailing lists