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: <20230523210454.12963d67@kernel.org>
Date: Tue, 23 May 2023 21:04:54 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Mengyuan Lou <mengyuanlou@...-swift.com>
Cc: netdev@...r.kernel.org, jiawenwu@...stnetic.com
Subject: Re: [PATCH net-next v6 2/8] net: wangxun: libwx add rx offload
 functions

On Tue, 23 May 2023 11:06:52 +0800 Mengyuan Lou wrote:
> +static inline struct wx_dec_ptype wx_decode_ptype(const u8 ptype)
> +{
> +	return wx_ptype_lookup[ptype];
> +}

No need for inline keyword here, compiler will definitely inline this.

> +	/* If there is an outer header present that might contain a checksum
> +	 * we need to bump the checksum level by 1 to reflect the fact that
> +	 * we are indicating we validated the inner checksum.
> +	 */
> +	if (dptype.etype >= WX_DEC_PTYPE_ETYPE_IG) {
> +		skb->csum_level = 1;
> +		skb->encapsulation = 1;
> +	}

That's not right, you shouldn't set encapsulation, that field means skb
encap state / fields are valid. Just use
__skb_incr_checksum_unnecessary() please, it will do the right thing.

-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ