]> git.puffer.fish Git - matthieu/frr.git/commit
pbrd: use sparse table for allocated NHG table IDs
authorWesley Coakley <wcoakley@nvidia.com>
Sat, 15 May 2021 02:53:56 +0000 (22:53 -0400)
committerWesley Coakley <wcoakley@nvidia.com>
Sun, 16 May 2021 21:33:03 +0000 (17:33 -0400)
commit389571aaf4666129c0f68a1d111b4db5d1f1650c
tree6433404b758a7db69de7cae7b26170bd2c71fc93
parenta63273a5b48bcae375af39928bafafadc6a31e0c
pbrd: use sparse table for allocated NHG table IDs

Represent installed ("allocated") NHG tables with a hash keyed by table
ID. Replaces a pre-allocated array of booleans that implemented this
functionality before.

+ PBR table range > 65535 is fixed (was OOB access before :))
+ Pre-compute next available ID to save time when only checking
  if all tables are allocated

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
pbrd/pbr_nht.c
pbrd/pbr_nht.h