Difference between revisions of "Portal:DeveloperDocs/set internals"

From nftables wiki
Jump to navigation Jump to search
m
Line 4: Line 4:


|-
|-
! nft_set_type
! ''nft_set_type''
! nft_set_types[] order
! ''nft_set_types[]'' order
! NFT_SET_INTERVAL
! ''NFT_SET_INTERVAL''
! NFT_SET_MAP
! ''NFT_SET_MAP''
! NFT_SET_TIMEOUT
! ''NFT_SET_TIMEOUT''
! NFT_SET_OBJECT
! ''NFT_SET_OBJECT''
! NFT_SET_EVAL
! ''NFT_SET_EVAL''
! Notes
! Notes


|-
|-
! {{rh}} | nft_set_hash_fast_type
! {{rh}} | ''nft_set_hash_fast_type''
| 0
| 0
| {{no}}
| {{no}}
Line 24: Line 24:


|-
|-
! {{rh}} | nft_set_hash_type
! {{rh}} | ''nft_set_hash_type''
| 1
| 1
| {{no}}
| {{no}}
Line 34: Line 34:


|-
|-
! {{rh}} | nft_set_rhash_type
! {{rh}} | ''nft_set_rhash_type''
| 2
| 2
| {{no}}
| {{no}}
Line 44: Line 44:


|-
|-
! {{rh}} | nft_set_bitmap_type
! {{rh}} | ''nft_set_bitmap_type''
| 3
| 3
| {{no}}
| {{no}}
Line 54: Line 54:


|-
|-
! {{rh}} | nft_set_rbtree_type
! {{rh}} | ''nft_set_rbtree_type''
| 4
| 4
| {{yes}}
| {{yes}}
Line 64: Line 64:


|-
|-
! {{rh}} | nft_set_pipapo_avx2_type
! {{rh}} | ''nft_set_pipapo_avx2_type''
| 5
| 5
| {{yes}}
| {{yes}}
Line 74: Line 74:


|-
|-
! {{rh}} | nft_set_pipapo_type
! {{rh}} | ''nft_set_pipapo_type''
| 6
| 6
| {{yes}}
| {{yes}}
Line 85: Line 85:
|}
|}


If two nft_set_types have the same estimated lookup time and same estimated space requirement, the type that appears first in nft_set_types[] is chosen.
If two nft_set_types have the same estimated lookup time and same estimated space requirement, ''nft_select_set_ops()'' chooses the type that appears first in ''nft_set_types[]''.

Revision as of 00:00, 4 March 2021

NFT_SET_FEATURES of available nft_set_types

nft_set_type nft_set_types[] order NFT_SET_INTERVAL NFT_SET_MAP NFT_SET_TIMEOUT NFT_SET_OBJECT NFT_SET_EVAL Notes
nft_set_hash_fast_type 0 No Yes No Yes No
nft_set_hash_type 1 No Yes No Yes No
nft_set_rhash_type 2 No Yes Yes Yes Yes
nft_set_bitmap_type 3 No No No No No
nft_set_rbtree_type 4 Yes Yes Yes Yes No
nft_set_pipapo_avx2_type 5 Yes Yes Yes Yes No
nft_set_pipapo_type 6 Yes Yes Yes Yes No

If two nft_set_types have the same estimated lookup time and same estimated space requirement, nft_select_set_ops() chooses the type that appears first in nft_set_types[].