-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In the zebra PBR rule database, the hash was previously calculated over many fields, including most of the filter and action values. But a given rule should be identifiable by just: 1. the identity of its originating daemon (ZAPI socket FD); and 2. the 'unique' field in struct pbr_rule However, pbrd assigns a 'unique' field value per map (which may be assigned to multiple interfaces, yielding multiple corresponding rules). We could possibly modify pbrd to generate a 'unique' field value per rule instance, but the simpler solution for the moment is to also hash on the interface name. This commit changes the PBR hash function to use only the following parameters: 1. the identity of its originating daemon (ZAPI socket FD); and 2. the 'unique' field in struct pbr_rule 3. the VRF ID 4. the interface name The goal of the above change is to get a better handle on what parameters uniquely identify a rule, to (eventually) allow the assignment or parallel generation of a globally-unique identifier for each rule that can be used with a dataplane. This commit also removes the inefficient pbr_rule_lookup_unique() code that iterated linearly over the entire rule database. Signed-off-by: G. Paul Ziemba <[email protected]>
- Loading branch information
Showing
2 changed files
with
14 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters