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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 22 Sep 2021 13:18:37 +0000
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     Xiaoliang Yang <xiaoliang.yang_1@....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>
Subject: Re: [PATCH v4 net-next 7/8] net: mscc: ocelot: use index to set vcap
 policer

On Wed, Sep 22, 2021 at 06:52:01PM +0800, Xiaoliang Yang 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?

Also, FWIW, Seville has this policer allocation:

      0 ----+----------------------+
            |  Port Policers (11)  |
     11 ----+----------------------+
            |  VCAP Policers (21)  |
     32 ----+----------------------+
            |   QoS Policers (88)  |
    120 ----+----------------------+
            |  VCAP Policers (43)  |
    162 ----+----------------------+

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ