diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-08-02 00:16:33 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-08-02 00:16:33 +0900 |
commit | 07196197675c07c712eba0c24a934dcbe20783e4 (patch) | |
tree | f2f08f2606040b90e3f2abe2960f2160d4b93145 /table/adj.go | |
parent | 15f598ad8e5be47725cc7aea31c80e38e346c408 (diff) |
table: allocate bitmap for path id dynamically
allocating 256 bytes per prefix isn't a good idea. Let's allocate 8
bytes by default and expand dynamically if necessary.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/adj.go')
-rw-r--r-- | table/adj.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/table/adj.go b/table/adj.go index 05a795be..98c714e6 100644 --- a/table/adj.go +++ b/table/adj.go @@ -178,7 +178,7 @@ func (adj *AdjRib) Select(family bgp.RouteFamily, accepted bool, option ...Table if d, y := dsts[path.GetNlri().String()]; y { d.knownPathList = append(d.knownPathList, path) } else { - dst := NewDestination(path.GetNlri()) + dst := NewDestination(path.GetNlri(), 0) dsts[path.GetNlri().String()] = dst dst.knownPathList = append(dst.knownPathList, path) } |