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]
Message-ID: <ef0fb089409e1bacecbd2f6d00e09d85253e2637.camel@microchip.com>
Date:   Fri, 20 Jan 2023 10:36:48 +0100
From:   Steen Hegelund <steen.hegelund@...rochip.com>
To:     Dan Carpenter <error27@...il.com>
CC:     "David S . Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        <UNGLinuxDriver@...rochip.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Casper Andersson <casper.casan@...il.com>,
        "Russell King" <rmk+kernel@...linux.org.uk>,
        Wan Jiabing <wanjiabing@...o.com>,
        "Nathan Huckleberry" <nhuck@...gle.com>,
        <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        "Daniel Machon" <daniel.machon@...rochip.com>,
        Horatiu Vultur <horatiu.vultur@...rochip.com>,
        Lars Povlsen <lars.povlsen@...rochip.com>,
        Michael Walle <michael@...le.cc>
Subject: Re: [PATCH net-next 4/8] net: microchip: sparx5: Add TC support for
 IS0 VCAP

Hi Dan,

On Fri, 2023-01-20 at 12:13 +0300, Dan Carpenter wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> On Fri, Jan 20, 2023 at 10:08:27AM +0100, Steen Hegelund wrote:
> > -/* Add a rule counter action - only IS2 is considered for now */
> > +/* Add a rule counter action */
> >  static int sparx5_tc_add_rule_counter(struct vcap_admin *admin,
> >                                     struct vcap_rule *vrule)
> >  {
> > -     int err;
> > +     int err = 0;
> 
> Don't initialize.

Yep. No need for that.

> 
> > 
> > -     err = vcap_rule_mod_action_u32(vrule, VCAP_AF_CNT_ID, vrule->id);
> > -     if (err)
> > -             return err;
> > +     if (admin->vtype == VCAP_TYPE_IS2) {
> > +             err = vcap_rule_mod_action_u32(vrule, VCAP_AF_CNT_ID,
> > +                                            vrule->id);
> > +             if (err)
> > +                     return err;
> > +             vcap_rule_set_counter_id(vrule, vrule->id);
> > +     }
> > 
> > -     vcap_rule_set_counter_id(vrule, vrule->id);
> >       return err;
> 
> return 0;

I will update that.
> 
> >  }
> 
> regards,
> dan carpenter

Thanks for the review.

BR
Steen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ