Re: [PATCH bpf-next v2 09/13] selftests/bpf: move ip checksum helper to network helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux