On 9/28/21 8:17 PM, Alexei Starovoitov wrote:
On Tue, Sep 28, 2021 at 05:14:55PM -0700, Andrii Nakryiko wrote:
So for Bloom filter you get performance advantage from a dedicated map
(due to having just 1 helper call to do N hashing operations). For
pure bitset, there seems to be little benefit at all because it is
basically ARRAY.
I brought up bitset only as an idea to make bloomfilter map a bit more
generic and was looking for feedback whether to call the new map
"bitset that allows bloomfilter operations" or call it
"bloomfilter that simplifies to bitset" with nr_hashes=0.
It sounds that using bloomfilter as a base name fits better.
I am in favor of calling the new map "bitset that allows bloom filter
operations"
and having the map be BPF_MAP_TYPE_BITSET everywhere.
To me that is more intuitive since the bloom filter is based on top of a
bitset.
And I think more people will generally be using bitsets than the bloom
filter.
Additionally, for users who don't know or care what a bloom filter is, they
might skip this map type altogether and not realize it also can be used as
a bitset.
I haven't found SPDX header or any mention of GPL in
include/linux/jhash.h, so I assumed someone can just copy paste the
code (given the references to public domain). Seems like that's not
the case? Just curious about implications, license-wise, if there is
no SPDX? Is it still considered GPL?
I believe so. Every project that copy pasted jhash from the kernel
add SPDX gpl-2 to its source.