This patch creates new attributes to accept a map as argument and then perform the lookup with the generated hash accordingly. Both current hash functions are supported: Jenkins and Symmetric Hash.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -856,6 +856,8 @@ enum nft_hash_types { · 855 unmodified lines | |||
| 856 | * @NFTA_HASH_SEED: seed value (NLA_U32) | 856 | * @NFTA_HASH_SEED: seed value (NLA_U32) |
| 857 | * @NFTA_HASH_OFFSET: add this offset value to hash result (NLA_U32) | 857 | * @NFTA_HASH_OFFSET: add this offset value to hash result (NLA_U32) |
| 858 | * @NFTA_HASH_TYPE: hash operation (NLA_U32: nft_hash_types) | 858 | * @NFTA_HASH_TYPE: hash operation (NLA_U32: nft_hash_types) |
| 859 | * @NFTA_HASH_SET_NAME: name of the map to lookup (NLA_STRING) | ||
| 860 | * @NFTA_HASH_SET_ID: id of the map (NLA_U32) | ||
| 859 | */ | 861 | */ |
| 860 | enum nft_hash_attributes { | 862 | enum nft_hash_attributes { |
| 861 | NFTA_HASH_UNSPEC, | 863 | NFTA_HASH_UNSPEC, |
| @@ -866,6 +868,8 @@ enum nft_hash_attributes { · 4 unmodified lines | |||
| 866 | NFTA_HASH_SEED, | 868 | NFTA_HASH_SEED, |
| 867 | NFTA_HASH_OFFSET, | 869 | NFTA_HASH_OFFSET, |
| 868 | NFTA_HASH_TYPE, | 870 | NFTA_HASH_TYPE, |
| 871 | NFTA_HASH_SET_NAME, | ||
| 872 | NFTA_HASH_SET_ID, | ||
| 869 | __NFTA_HASH_MAX, | 873 | __NFTA_HASH_MAX, |
| 870 | }; | 874 | }; |
| 871 | #define NFTA_HASH_MAX (__NFTA_HASH_MAX - 1) | 875 | #define NFTA_HASH_MAX (__NFTA_HASH_MAX - 1) |