On Tue, Jul 14, 2015 at 5:18 PM, Herbert Xu wrote:
> On Tue, Jul 14, 2015 at 04:45:49PM -0700, Tom Herbert wrote:
>>
>> + } else if (score == best_score) {
>> + matches++;
>> + if (reciprocal_scale(khash, matches) == 0)
>> +
On Tue, Jul 14, 2015 at 04:45:49PM -0700, Tom Herbert wrote:
>
> + } else if (score == best_score) {
> + matches++;
> + if (reciprocal_scale(khash, matches) == 0)
> + result = he;
> + khash = next_ps
This patch adds a mechanism to do scored lookups in an rhashtable.
This mechanism is based on the UDP and TCP listener socket lookup
functions.
When a bucket is traversed, a matching score is computed for each entry
and the input key. The entry with the greatest non-zero score is
returned, and if