lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210923092226.nmin3abnrilmu6rj@skbuf>
Date:   Thu, 23 Sep 2021 09:22:27 +0000
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     Horatiu Vultur <horatiu.vultur@...rochip.com>
CC:     Xiaoliang Yang <xiaoliang.yang_1@....com>,
        "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>
Subject: Re: [PATCH v4 net-next 7/8] net: mscc: ocelot: use index to set vcap
 policer

On Thu, Sep 23, 2021 at 09:30:59AM +0200, Horatiu Vultur wrote:
> > 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?
>
> It was defined as 383 because the HW actually support this number of
> policers. But for this SKU it is recomended to use 191, but no one will
> stop you from using 383.

So if it is recommended to use 191, why did you use 383? Should Xiaoliang
change that to 191, or leave it alone?

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

Strange enough, I don't remember having reports about the VCAP IS2
policers on Seville not working, and of course being in the common code,
we'd start with a count of 384 policers for that hardware too, and
counting from the end. I think I even tested the policers when adding
the VCAP IS2 constants, and they worked. Is there any sort of index
wraparound that takes place?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ