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  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]
Date:   Fri, 25 Sep 2020 02:39:49 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Horatiu Vultur <horatiu.vultur@...rochip.com>
Cc:     Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>,
        Ralf Baechle <ralf@...ux-mips.org>,
        Paul Burton <paul.burton@...s.com>,
        James Hogan <jhogan@...nel.org>, linux-mips@...r.kernel.org,
        lkml <linux-kernel@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>,
        "Allan W. Nielsen" <allan.nielsen@...rochip.com>,
        Xiaoliang Yang <xiaoliang.yang_1@....com>, hongbo.wang@....com
Subject: Re: [PATCH net-next v3 1/2] net: mscc: ocelot: Add support for tcam

Hi Horatiu,

On Thu, Apr 23, 2020 at 10:29:48AM +0200, Horatiu Vultur wrote:
> > > +static const struct vcap_props vcap_is2 = {
> > > +       .name = "IS2",
> > > +       .tg_width = 2,
> > > +       .sw_count = 4,
> > > +       .entry_count = VCAP_IS2_CNT,
> > > +       .entry_words = BITS_TO_32BIT(VCAP_IS2_ENTRY_WIDTH),
> > > +       .entry_width = VCAP_IS2_ENTRY_WIDTH,
> > > +       .action_count = (VCAP_IS2_CNT + VCAP_PORT_CNT + 2),
> > > +       .action_words = BITS_TO_32BIT(VCAP_IS2_ACTION_WIDTH),
> > > +       .action_width = (VCAP_IS2_ACTION_WIDTH),
> > > +       .action_type_width = 1,
> > > +       .action_table = {
> > > +               {
> > > +                       .width = (IS2_AO_ACL_ID + IS2_AL_ACL_ID),
> > > +                       .count = 2
> > > +               },
> > > +               {
> > > +                       .width = 6,
> > > +                       .count = 4
> > > +               },
> > > +       },
> > > +       .counter_words = BITS_TO_32BIT(4 * ENTRY_WIDTH),
> > > +       .counter_width = ENTRY_WIDTH,
> > > +};

Coming again to this patch, I'm having a very hard time understanding
how VCAP_IS2_ENTRY_WIDTH is derived and what it represents, especially
since the VCAP_CONST_ENTRY_WIDTH register reads something different.
Could you please explain?

Thanks,
-Vladimir

Powered by blists - more mailing lists