Re: Using BPF_MAP_TYPE_LPM_TRIE for string matching

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

 



Hi,

On 12/22/2023 8:05 PM, Dominic wrote:
> Can BPF_MAP_TYPE_LPM_TRIE be used for string matching? I tried it but
> the matching doesn't work as expected.

Yes. LPM_TRIE will work for string matching.  Did you setup the key size
of the map and the prefixlen field of bpf_lpm_trie_key correctly ?
Because the unit of key_size is in-bytes and it should be the maximal
length of these strings, but the unit of prefixlen is in-bits and it is
the length of string expressed in bits. And could you share the steps on
how you used it ?

> Thanks & Regards,
> Dominic
>
> .





[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