[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66c6702a-d4a8-4354-8cd3-6edc93d0ae79@bootlin.com>
Date: Tue, 19 Nov 2024 09:49:31 +0100
From: Alexis Lothoré <alexis.lothore@...tlin.com>
To: Stanislav Fomichev <stfomichev@...il.com>
Cc: Andrii Nakryiko <andrii@...nel.org>, Eduard Zingerman
<eddyz87@...il.com>, Mykola Lysenko <mykolal@...com>,
Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <martin.lau@...ux.dev>, Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>, Shuah Khan <shuah@...nel.org>,
"David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Jesper Dangaard Brouer <hawk@...nel.org>, ebpf@...uxfoundation.org,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Bastien Curutchet <bastien.curutchet@...tlin.com>, bpf@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next v2 09/13] selftests/bpf: move ip checksum helper
to network helpers
Hello Stanislas,
On 11/15/24 16:32, Stanislav Fomichev wrote:
> On 11/14, Alexis Lothoré (eBPF Foundation) wrote:
>> +static unsigned long add_csum_hword(const __u16 *start, int num_u16)
>> +{
>> + unsigned long sum = 0;
>> + int i;
>> +
>> + for (i = 0; i < num_u16; i++)
>> + sum += start[i];
>> +
>> + return sum;
>> +}
>
> Sorry for nitpicking, but can we call it csum_partial? And match
> kernel's prototype with extra sum argument? Should be more greppable
> for the future test cases that might want to use it...
Sure. TBH I did not realize that those were based on the kernel ones. I'll
update this to keep the same prototype.
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists