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: <Y8pbHvJpvuIuCXws@kadam>
Date:   Fri, 20 Jan 2023 12:13:02 +0300
From:   Dan Carpenter <error27@...il.com>
To:     Steen Hegelund <steen.hegelund@...rochip.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

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.

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

>  }

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ