[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220217092442.4948b48c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Thu, 17 Feb 2022 09:24:42 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: "David S. Miller" <davem@...emloft.net>,
Pablo Neira Ayuso <pablo@...filter.org>,
Jozsef Kadlecsik <kadlec@...filter.org>,
Florian Westphal <fw@...len.de>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, netfilter-devel@...r.kernel.org,
coreteam@...filter.org
Subject: Re: [PATCH net-next v1] net: Use csum_replace_... and csum_sub()
helpers instead of opencoding
On Thu, 17 Feb 2022 16:43:55 +0100 Christophe Leroy wrote:
> static inline void nft_csum_replace(__sum16 *sum, __wsum fsum, __wsum tsum)
> {
> - *sum = csum_fold(csum_add(csum_sub(~csum_unfold(*sum), fsum), tsum));
> + csum_replace4(sum, fsum, tsum);
Sparse says:
net/netfilter/nft_payload.c:560:28: warning: incorrect type in argument 2 (different base types)
net/netfilter/nft_payload.c:560:28: expected restricted __be32 [usertype] from
net/netfilter/nft_payload.c:560:28: got restricted __wsum [usertype] fsum
Powered by blists - more mailing lists