This patch includes a new attribute in the numgen structure to allow the lookup of an element based on the number generator as a key. For this purpose, different ops have been included to extend the current numgen inc functions. Currently, only supported for numgen incremental operations, but it will be supported for random in a follow-up patch.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -1450,6 +1450,8 @@ enum nft_trace_types { · 1449 unmodified lines | |||
| 1450 | * @NFTA_NG_MODULUS: maximum counter value (NLA_U32) | 1450 | * @NFTA_NG_MODULUS: maximum counter value (NLA_U32) |
| 1451 | * @NFTA_NG_TYPE: operation type (NLA_U32) | 1451 | * @NFTA_NG_TYPE: operation type (NLA_U32) |
| 1452 | * @NFTA_NG_OFFSET: offset to be added to the counter (NLA_U32) | 1452 | * @NFTA_NG_OFFSET: offset to be added to the counter (NLA_U32) |
| 1453 | * @NFTA_NG_SET_NAME: name of the map to lookup (NLA_STRING) | ||
| 1454 | * @NFTA_NG_SET_ID: id of the map (NLA_U32) | ||
| 1453 | */ | 1455 | */ |
| 1454 | enum nft_ng_attributes { | 1456 | enum nft_ng_attributes { |
| 1455 | NFTA_NG_UNSPEC, | 1457 | NFTA_NG_UNSPEC, |
| @@ -1457,6 +1459,8 @@ enum nft_ng_attributes { · 1 unmodified line | |||
| 1457 | NFTA_NG_MODULUS, | 1459 | NFTA_NG_MODULUS, |
| 1458 | NFTA_NG_TYPE, | 1460 | NFTA_NG_TYPE, |
| 1459 | NFTA_NG_OFFSET, | 1461 | NFTA_NG_OFFSET, |
| 1462 | NFTA_NG_SET_NAME, | ||
| 1463 | NFTA_NG_SET_ID, | ||
| 1460 | __NFTA_NG_MAX | 1464 | __NFTA_NG_MAX |
| 1461 | }; | 1465 | }; |
| 1462 | #define NFTA_NG_MAX (__NFTA_NG_MAX - 1) | 1466 | #define NFTA_NG_MAX (__NFTA_NG_MAX - 1) |