-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hashmap for vrf lookup by table #10821
base: master
Are you sure you want to change the base?
Hashmap for vrf lookup by table #10821
Conversation
vrf_lookup_by_table() function is used outside of rt_netlink.c currently in if_netlink.c and may be useful in other files in the future Will add to vrf.c[h], as this currently is home to other vrf lookup functions Signed-off-by: Nathan Duddles <[email protected]>
1c0ec9c
to
aaf6647
Compare
Lookup uses hashmap with table_id key and vrf_id values. Only for vrf backended by vrf lite. Could do similar implementation with ns_id in future. Hashmap local to vrf.c but must be updated when vrf is added or modified. For updates to vrf_id, call to helper function vrf_ids_by_table_update() is added in the publicly used vrf_update() function. Previously, the table_id was set by directly modifying vrf->data.l.table_id in zclient.c. However, as no functions in vrf.c are notified when change occurs, a helper function, vrf_update_table_id(), is added. This both updates vrf_data.l.table_id, and updates the local hashmap. vrf_delete() function used for removing vrfs. Add call to here to vrf_ids_by_table_delete() helper function to remove entries from hashmap. Signed-off-by: Nathan Duddles <[email protected]>
aaf6647
to
399a33c
Compare
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 i386 part 3: Failed (click for details)Topotests Ubuntu 18.04 i386 part 3: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO3U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 3: No useful log foundTopotests Ubuntu 18.04 arm8 part 9: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 9: No useful log foundTopotests Ubuntu 18.04 i386 part 1: Failed (click for details)Topotests Ubuntu 18.04 i386 part 1: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO1U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 1: No useful log foundTopotests Ubuntu 18.04 i386 part 6: Failed (click for details)Topotests Ubuntu 18.04 i386 part 6: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO6U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 6: No useful log foundTopotests Ubuntu 18.04 i386 part 8: Failed (click for details)Topotests Ubuntu 18.04 i386 part 8: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO8U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 8: No useful log foundTopotests Ubuntu 18.04 i386 part 5: Failed (click for details)Topotests Ubuntu 18.04 i386 part 5: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO5U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 5: No useful log foundTopotests Ubuntu 18.04 i386 part 0: Failed (click for details)Topotests Ubuntu 18.04 i386 part 0: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO0U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 0: No useful log foundTopotests Ubuntu 18.04 i386 part 9: Failed (click for details)Topotests Ubuntu 18.04 i386 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO9U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 9: No useful log foundTopotests Ubuntu 18.04 i386 part 4: Failed (click for details)Topotests Ubuntu 18.04 i386 part 4: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO4U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 4: No useful log foundTopotests Ubuntu 18.04 i386 part 2: Failed (click for details)Topotests Ubuntu 18.04 i386 part 2: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO2U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 2: No useful log foundTopotests Ubuntu 18.04 i386 part 7: Failed (click for details)Topotests Ubuntu 18.04 i386 part 7: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO7U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 7: No useful log foundSuccessful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsTopotests Ubuntu 18.04 i386 part 3: Failed (click for details)Topotests Ubuntu 18.04 i386 part 3: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO3U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 3: No useful log foundTopotests Ubuntu 18.04 arm8 part 9: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 9: No useful log foundTopotests Ubuntu 18.04 i386 part 1: Failed (click for details)Topotests Ubuntu 18.04 i386 part 1: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO1U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 1: No useful log foundTopotests Ubuntu 18.04 i386 part 6: Failed (click for details)Topotests Ubuntu 18.04 i386 part 6: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO6U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 6: No useful log foundTopotests Ubuntu 18.04 i386 part 8: Failed (click for details)Topotests Ubuntu 18.04 i386 part 8: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO8U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 8: No useful log foundTopotests Ubuntu 18.04 i386 part 5: Failed (click for details)Topotests Ubuntu 18.04 i386 part 5: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO5U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 5: No useful log foundTopotests Ubuntu 18.04 i386 part 0: Failed (click for details)Topotests Ubuntu 18.04 i386 part 0: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO0U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 0: No useful log foundTopotests Ubuntu 18.04 i386 part 9: Failed (click for details)Topotests Ubuntu 18.04 i386 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO9U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 9: No useful log foundTopotests Ubuntu 18.04 i386 part 4: Failed (click for details)Topotests Ubuntu 18.04 i386 part 4: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO4U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 4: No useful log foundTopotests Ubuntu 18.04 i386 part 2: Failed (click for details)Topotests Ubuntu 18.04 i386 part 2: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO2U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 2: No useful log foundTopotests Ubuntu 18.04 i386 part 7: Failed (click for details)Topotests Ubuntu 18.04 i386 part 7: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4209/artifact/TOPO7U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 7: No useful log found
|
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 i386 part 3: Failed (click for details)Topotests Ubuntu 18.04 i386 part 3: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO3U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 3: No useful log foundTopotests debian 10 amd64 part 3: Failed (click for details)Topotests debian 10 amd64 part 3: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO3DEB10AMD64/ErrorLog/ Topotests debian 10 amd64 part 3: No useful log foundTopotests Ubuntu 18.04 i386 part 6: Failed (click for details)Topotests Ubuntu 18.04 i386 part 6: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO6U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 6: No useful log foundTopotests Ubuntu 18.04 i386 part 1: Failed (click for details)Topotests Ubuntu 18.04 i386 part 1: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO1U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 1: No useful log foundTopotests Ubuntu 18.04 i386 part 8: Failed (click for details)Topotests Ubuntu 18.04 i386 part 8: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO8U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 8: No useful log foundTopotests Ubuntu 18.04 i386 part 5: Failed (click for details)Topotests Ubuntu 18.04 i386 part 5: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO5U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 5: No useful log foundTopotests Ubuntu 18.04 i386 part 0: Failed (click for details)Topotests Ubuntu 18.04 i386 part 0: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO0U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 0: No useful log foundTopotests Ubuntu 18.04 i386 part 9: Failed (click for details)Topotests Ubuntu 18.04 i386 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO9U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 9: No useful log foundTopotests Ubuntu 18.04 i386 part 4: Failed (click for details)Topotests Ubuntu 18.04 i386 part 4: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO4U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 4: No useful log foundTopotests Ubuntu 18.04 i386 part 7: Failed (click for details)Topotests Ubuntu 18.04 i386 part 7: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO7U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 7: No useful log foundTopotests Ubuntu 18.04 i386 part 2: Failed (click for details)Topotests Ubuntu 18.04 i386 part 2: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO2U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 2: No useful log foundSuccessful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsTopotests Ubuntu 18.04 i386 part 3: Failed (click for details)Topotests Ubuntu 18.04 i386 part 3: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO3U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 3: No useful log foundTopotests debian 10 amd64 part 3: Failed (click for details)Topotests debian 10 amd64 part 3: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO3DEB10AMD64/ErrorLog/ Topotests debian 10 amd64 part 3: No useful log foundTopotests Ubuntu 18.04 i386 part 6: Failed (click for details)Topotests Ubuntu 18.04 i386 part 6: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO6U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 6: No useful log foundTopotests Ubuntu 18.04 i386 part 1: Failed (click for details)Topotests Ubuntu 18.04 i386 part 1: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO1U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 1: No useful log foundTopotests Ubuntu 18.04 i386 part 8: Failed (click for details)Topotests Ubuntu 18.04 i386 part 8: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO8U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 8: No useful log foundTopotests Ubuntu 18.04 i386 part 5: Failed (click for details)Topotests Ubuntu 18.04 i386 part 5: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO5U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 5: No useful log foundTopotests Ubuntu 18.04 i386 part 0: Failed (click for details)Topotests Ubuntu 18.04 i386 part 0: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO0U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 0: No useful log foundTopotests Ubuntu 18.04 i386 part 9: Failed (click for details)Topotests Ubuntu 18.04 i386 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO9U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 9: No useful log foundTopotests Ubuntu 18.04 i386 part 4: Failed (click for details)Topotests Ubuntu 18.04 i386 part 4: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO4U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 4: No useful log foundTopotests Ubuntu 18.04 i386 part 7: Failed (click for details)Topotests Ubuntu 18.04 i386 part 7: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO7U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 7: No useful log foundTopotests Ubuntu 18.04 i386 part 2: Failed (click for details)Topotests Ubuntu 18.04 i386 part 2: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4210/artifact/TOPO2U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 2: No useful log found
|
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 i386 part 3: Failed (click for details)Topotests Ubuntu 18.04 i386 part 3: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO3U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 3: No useful log foundTopotests Ubuntu 18.04 i386 part 6: Failed (click for details)Topotests Ubuntu 18.04 i386 part 6: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO6U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 6: No useful log foundTopotests Ubuntu 18.04 i386 part 8: Failed (click for details)Topotests Ubuntu 18.04 i386 part 8: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO8U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 8: No useful log foundTopotests Ubuntu 18.04 i386 part 1: Failed (click for details)Topotests Ubuntu 18.04 i386 part 1: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO1U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 1: No useful log foundTopotests Ubuntu 18.04 i386 part 5: Failed (click for details)Topotests Ubuntu 18.04 i386 part 5: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO5U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 5: No useful log foundTopotests Ubuntu 18.04 i386 part 0: Failed (click for details)Topotests Ubuntu 18.04 i386 part 0: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO0U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 0: No useful log foundTopotests Ubuntu 18.04 i386 part 9: Failed (click for details)Topotests Ubuntu 18.04 i386 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO9U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 9: No useful log foundTopotests Ubuntu 18.04 i386 part 4: Failed (click for details)Topotests Ubuntu 18.04 i386 part 4: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO4U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 4: No useful log foundTopotests Ubuntu 18.04 i386 part 2: Failed (click for details)Topotests Ubuntu 18.04 i386 part 2: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO2U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 2: No useful log foundTopotests Ubuntu 18.04 i386 part 7: Failed (click for details)Topotests Ubuntu 18.04 i386 part 7: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO7U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 7: No useful log foundSuccessful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsTopotests Ubuntu 18.04 i386 part 3: Failed (click for details)Topotests Ubuntu 18.04 i386 part 3: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO3U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 3: No useful log foundTopotests Ubuntu 18.04 i386 part 6: Failed (click for details)Topotests Ubuntu 18.04 i386 part 6: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO6U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 6: No useful log foundTopotests Ubuntu 18.04 i386 part 8: Failed (click for details)Topotests Ubuntu 18.04 i386 part 8: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO8U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 8: No useful log foundTopotests Ubuntu 18.04 i386 part 1: Failed (click for details)Topotests Ubuntu 18.04 i386 part 1: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO1U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 1: No useful log foundTopotests Ubuntu 18.04 i386 part 5: Failed (click for details)Topotests Ubuntu 18.04 i386 part 5: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO5U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 5: No useful log foundTopotests Ubuntu 18.04 i386 part 0: Failed (click for details)Topotests Ubuntu 18.04 i386 part 0: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO0U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 0: No useful log foundTopotests Ubuntu 18.04 i386 part 9: Failed (click for details)Topotests Ubuntu 18.04 i386 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO9U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 9: No useful log foundTopotests Ubuntu 18.04 i386 part 4: Failed (click for details)Topotests Ubuntu 18.04 i386 part 4: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO4U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 4: No useful log foundTopotests Ubuntu 18.04 i386 part 2: Failed (click for details)Topotests Ubuntu 18.04 i386 part 2: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO2U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 2: No useful log foundTopotests Ubuntu 18.04 i386 part 7: Failed (click for details)Topotests Ubuntu 18.04 i386 part 7: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4211/artifact/TOPO7U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 7: No useful log found
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any reason to make this part of the library. vrf_lookup_by_table
is only ever used in zebra.
Sorry, I'm not sure how to interpret these test failures. It looks like all TopoTests Ubuntu 18.04 i386 failed. Running topotests locally in an Ubuntu 20.04 x86_64 VM, I'm only getting a single failing test, which occurs when run on both FRRouting:master and nathan-duddles:hashmap_for_vrf_lookup_by_table. Failing test is: Also, it like some warnings were generated for formatting (e.g. trailing white spaces). I did see a linter test failing when initially creating the pull request and I made the recommended changes, amended the commit and force pushed. I guess these warnings reflect the code before those changes. |
Thank you for the comment @idryzhov . I had moved it to I believe it was originally added in |
bgpd is crashing. Here is some valgrind hints as to what is going wrong: ==884032== Conditional jump or move depends on uninitialised value(s) |
Thank you providing the hint and the Valgrind output! It looks like I failed to call As I'm not getting this failing case locally, is it possible to push changes to this branch and run the CI check again? Shall I amend and force push to the same commit? |
while currently only being used by zebra, the function makes sense to made general for VRFs and added to lib in my opinion. The API could be useful for other daemons. Pbr is one example that deals with both vrfs/table's directly. |
yes you can force-push and re-run CI. Do it sparingly though as it is a shared resource. |
Thank you for these changes! I made the updates, along with the check on the hash initialization, and pushed the new commit. It looks like CI is being rerun automatically. |
2107c09
to
de68f39
Compare
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: FailedOpenBSD 7 amd64 build: Failed (click for details)OpenBSD 7 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4228/artifact/CI011BUILD/frr.xref.xz/frr.xref.xz OpenBSD 7 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4228/artifact/CI011BUILD/config.log/config.log.gz OpenBSD 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-PULLREQ2-4228/artifact/CI011BUILD/config.status/config.statusDejaGNU Unittests (make check) failed for OpenBSD 7 amd64 build Successful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsOpenBSD 7 amd64 build: Failed (click for details)OpenBSD 7 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4228/artifact/CI011BUILD/frr.xref.xz/frr.xref.xz OpenBSD 7 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4228/artifact/CI011BUILD/config.log/config.log.gz OpenBSD 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-PULLREQ2-4228/artifact/CI011BUILD/config.status/config.statusDejaGNU Unittests (make check) failed for OpenBSD 7 amd64 build
|
de68f39
to
21577d0
Compare
Sorry, I didn't realize the issue with explicitly initializing a static variable to zero. Seems this was flagged as an ERROR by the OpenBSD 7 amd64. I've corrected this, along with other WARNINGS related to formatting and re-pushed. |
9dd3347
to
458100c
Compare
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 i386 part 9: Failed (click for details)Topotests Ubuntu 18.04 i386 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4242/artifact/TOPO9U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 9: No useful log foundSuccessful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsTopotests Ubuntu 18.04 i386 part 9: Failed (click for details)Topotests Ubuntu 18.04 i386 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4242/artifact/TOPO9U18I386/ErrorLog/ Topotests Ubuntu 18.04 i386 part 9: No useful log found
|
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 arm8 part 6: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 6: No useful log foundSuccessful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsTopotests Ubuntu 18.04 arm8 part 6: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 6: No useful log found
|
This patch failed two tests for Ubuntu 18.04 arm8: I'm sorry I haven't been able to figure out why these be failing on Ubuntu 18.04 arm8. I only have access to an amd64 machine and running all topotests on Ubuntu 18.04 is passing for me locally. (Running with valgrind shows possible memory leaks in unrelated modules and these same warnings appear when running on main without this patch.) If anyone has any ideas why these tests may be failing or suggestions on how to debug this, I would really appreciate any feedback. Thanks! |
those tests are not unknown to occassionally fail. Let me rerun |
ci:rerun snmp test fialure? |
Ok, thanks! I also just noticed from the warning that there is a comment to myself that I should have removed. I'll fix this by amending the last commit. |
458100c
to
15bbb2e
Compare
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4368/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
|
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4369/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
|
Each entry in hash map must be allocated memory on the heap. In addition, much check that head is initialized prior to calling _add() and _del() functions. Also made corrections to compare and hash functions. Fix formatting causing build warnings Signed-off-by: Nathan Duddles <[email protected]>
15bbb2e
to
24b7dc7
Compare
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4388/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
|
@nathan-duddles looks mostly good to me. I think the way you are checking for initialization is fine. could you address the checkpatch warning? you can recreate this locally by turning your patches into a single patch file, reverting the tree to before they are applied and doing: it's the same script the linux kernel uses for style checking
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once again, the functionality is daemon-specific.
And the current implementation only confirms this.
We can't use daemon-specific structs and headers in the library code.
Hmm... yea @idryzhov is correct here. I didn't realize netns-backed vrfs breaks it from being shared knowledge in lib. Let's just move the code to zebra/zebra_vrf.c[h] for now probably and leave it zebra specific to get the code merged. |
Thank you both for your review and comments on this! Good catch @idryzhov on the inclusion of zebra_vrf. Actually, |
Use of zebra_vrf was from when vrf_lookup_by_table() was defined in rt_netlink. Use of zebra_vrf function: zvrf_id() is not needed, as this just encapsulates the return of vrf->vrf_id. Also fixed formatting to pass checkpath warning on line 161. Signed-off-by: Nathan Duddles <[email protected]>
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-4680/ This is a comment from an automated CI system. |
When you have time, please take a look at the updates I've made and let me know if more changes are needed. As I mentioned above, I think If |
This PR is stale because it has been open 180 days with no activity. Comment or remove the |
Hello! The autoclose tag reminded me about this pull request. I would love to get this reviewed and merged if you are still wanting the patch. Please let me know if there is anything else I can do on this. Thanks! |
This PR is stale because it has been open 180 days with no activity. Comment or remove the |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Summary
Add hashmap for lookup of vrf_id by table_id to
vrf_lookup_by_id()
.vrf_lookup_by_id()
moved fromzebra/rt_netlink.c
tolib/vrf.c
Related Issue
Add Mapping From Table ID to VRF #5982
Components
zebra, lib