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: <20190823172648.7777e2b6@cakuba.netronome.com>
Date:   Fri, 23 Aug 2019 17:26:48 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Vlad Buslov <vladbu@...lanox.com>
Cc:     netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com,
        jiri@...nulli.us, davem@...emloft.net, pablo@...filter.org
Subject: Re: [PATCH net-next v2 03/10] net: sched: refactor block offloads
 counter usage

On Fri, 23 Aug 2019 21:50:49 +0300, Vlad Buslov wrote:
> @@ -1201,14 +1199,11 @@ static int u32_reoffload_knode(struct tcf_proto *tp, struct tc_u_knode *n,
>  			cls_u32.knode.link_handle = ht->handle;
>  	}
>  
> -	err = cb(TC_SETUP_CLSU32, &cls_u32, cb_priv);
> -	if (err) {
> -		if (add && tc_skip_sw(n->flags))
> -			return err;
> -		return 0;
> -	}
> -
> -	tc_cls_offload_cnt_update(block, &n->in_hw_count, &n->flags, add);
> +	err = tc_setup_cb_reoffload(block, tp, add, cb, TC_SETUP_CLSU32,
> +				    &cls_u32, cb_priv, &n->flags,
> +				    &n->in_hw_count);
> +	if (err && add && tc_skip_sw(n->flags))
> +		return err;

Could this be further simplified by adding something along the lines of:

	if (!add || !tc_skip_sw(*flags))
		err = 0;

to tc_setup_cb_reoffload() ?

>  
>  	return 0;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ