summaryrefslogtreecommitdiffhomepage
path: root/table/destination.go
AgeCommit message (Collapse)Author
2016-03-14table: remove Destination's oldKnownPathListFUJITA Tomonori
Withdrawn pathes are kept to be referenced thus the memory for them are not freed. Kill oldKnownPathList and Destination's NewFeed(). Destination's Calculate() returns the best paths. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-03-14table: remove Destination's WithdrawnList and UpdatedPathList used for ↵FUJITA Tomonori
validation Withdrawn pathes are kept to be referenced thus the memory for them are not freed. Nobody uses this so let's remove it. Paths in UpdatedPathList are also in KnownPathList so doesn't lead to memory leak. But remove it for simplicity. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-03-14table: remove Destination's ImplicitWithdrawnListFUJITA Tomonori
Implicitly withdrawn pathes are kept to be referenced thus the memory for them are not freed. Nobody uses this so let's remove it. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-02-10table: expose (*Destination).getRouteFamily()ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-17rpki: add rpki validate APIFUJITA Tomonori
$ gobgp rpki validate validates all the paths in the table with the current ROAs. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-17update rpki monitor APIFUJITA Tomonori
- handle withdraw - added some new info (peer address, timestamp, aspath attribute) Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-16server: reduce number of path.Clone() call to reduce memory footprintISHIDA Wataru
the result of memory profile (500 route-server-clients each of them advertises 100 routes) before: (pprof) top5 3913.02MB of 3978.69MB total (98.35%) Dropped 148 nodes (cum <= 19.89MB) Showing top 10 nodes out of 11 (cum >= 21MB) flat flat% sum% cum cum% 2970.30MB 74.66% 74.66% 2975.80MB 74.79% github.com/osrg/gobgp/server.filterpath 810.09MB 20.36% 95.02% 810.59MB 20.37% github.com/osrg/gobgp/table.(*AdjRib).Update 115.60MB 2.91% 97.92% 119.10MB 2.99% github.com/osrg/gobgp/table.createUpdateMsgFromPath 10MB 0.25% 98.17% 1878.02MB 47.20% github.com/osrg/gobgp/server.(*BgpServer).propagateUpdate 4.50MB 0.11% 98.29% 144.60MB 3.63% github.com/osrg/gobgp/table.CreateUpdateMsgFromPaths after: (pprof) top5 1259.49MB of 1284.27MB total (98.07%) Dropped 175 nodes (cum <= 6.42MB) Showing top 10 nodes out of 26 (cum >= 36.51MB) flat flat% sum% cum cum% 975.81MB 75.98% 75.98% 976.31MB 76.02% github.com/osrg/gobgp/table.(*AdjRib).Update 198.67MB 15.47% 91.45% 208.17MB 16.21% github.com/osrg/gobgp/table.createUpdateMsgFromPath 22MB 1.71% 93.16% 22MB 1.71% github.com/osrg/gobgp/packet.(*IPAddrPrefix).Serialize 20MB 1.56% 94.72% 707.19MB 55.07% github.com/osrg/gobgp/server.(*BgpServer).propagateUpdate 13.50MB 1.05% 95.77% 13.50MB 1.05% github.com/osrg/gobgp/table.NewPath Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-16table: remove unnecessary copy of path attributesISHIDA Wataru
the result of memory profile (500 route-server-clients each of them advertises 100 routes) before: (pprof) top5 9330.48MB of 9367.53MB total (99.60%) Dropped 157 nodes (cum <= 46.84MB) Showing top 10 nodes out of 17 (cum >= 9334.17MB) flat flat% sum% cum cum% 6163.04MB 65.79% 65.79% 6163.04MB 65.79% github.com/osrg/gobgp/table.NewPath 1155.05MB 12.33% 78.12% 7302.59MB 77.96% github.com/osrg/gobgp/table.(*Path).Clone 986.31MB 10.53% 88.65% 1388.81MB 14.83% github.com/osrg/gobgp/table.(*AdjRib).Update 402.51MB 4.30% 92.95% 402.51MB 4.30% fmt.Sprintf 402.51MB 4.30% 97.24% 402.51MB 4.30% net.parseIPv4 after: (pprof) top 3913.02MB of 3978.69MB total (98.35%) Dropped 148 nodes (cum <= 19.89MB) Showing top 10 nodes out of 11 (cum >= 21MB) flat flat% sum% cum cum% 2970.30MB 74.66% 74.66% 2975.80MB 74.79% github.com/osrg/gobgp/server.filterpath 810.09MB 20.36% 95.02% 810.59MB 20.37% github.com/osrg/gobgp/table.(*AdjRib).Update 115.60MB 2.91% 97.92% 119.10MB 2.99% github.com/osrg/gobgp/table.createUpdateMsgFromPath 10MB 0.25% 98.17% 1878.02MB 47.20% github.com/osrg/gobgp/server.(*BgpServer).propagateUpdate 4.50MB 0.11% 98.29% 144.60MB 3.63% github.com/osrg/gobgp/table.CreateUpdateMsgFromPaths Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-29config: use viper and support multiple configuration formatsISHIDA Wataru
// toml by default $ gobgpd -f gobgpd.toml // use -t to change configuration type $ gobgpd -t yaml -f gobgpd.yaml Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-28config: make config/state variable name simpleISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-08server/table: use only one rib for multiple route server clientsISHIDA Wataru
speed up and reduce memory footprint Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-12-02table: improve implicitWithdraw()FUJITA Tomonori
remove one loop. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-02table: sort all known paths instead of just selecting bestISHIDA Wataru
this is a preparation for add-path recv/send feature Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-11-18rpki: fix IPv4-mapped addresss handlingFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-12table: fix how to mark a path as best in ToApiStruct()ISHIDA Wataru
When two peers advertise exactly same path, one will be marked as best, and another will not. In this case, in ToApiStruct(), we mustn't mark a path as best by Equal() method since Equal() compare path's content, not identity. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-11-09server: move peerInfo from peer to fsmFUJITA Tomonori
fsm needs it with the later commit. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-27server: fix radix key bug in rpki testFUJITA Tomonori
also clean up functions to create a radix key. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-20api: rename package/service name to gobgpapiISHIDA Wataru
api/Grpc is too general for package/service name. rename them to gobgpapi/GobgpApi. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-09-10table: add string method for easier debuggingISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-09-01zebra: distribute routes from zebraHiroshi Yokoi
Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
2015-08-31server: support route reflector behaviorISHIDA Wataru
scenario_test is also added Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-08-25*: better log msgISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-08-21speed up showing ipv6 routesFUJITA Tomonori
same as ipv4. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-20server: fix for sorting adj-in/out routesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-19gobgp: improve the time to show routesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-19table: fix best path selection which considers local asnISHIDA Wataru
TableManager.localAsn wasn't used. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-08-08*: kill protobuf path structureISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-08-03mrt: merge gomrt to gobgp cli commandISHIDA Wataru
Usage $ gobgp mrt inject global <filename> [<count>] Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-07-22mrt: support mrt dumpISHIDA Wataru
$ gobgp mrt dump 10 -o ./dump Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-07-01table: remove unused field/funcISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-07-01table: check paths' equivalence deeperISHIDA Wataru
if we add same path multiple times by the following gobgp cli commands, $ gobgp global rib add 10.0.0.0/24 $ gobgp global rib add 10.0.0.0/24 $ gobgp global rib add 10.0.0.0/24 current implementation sends multiple update messages to peers even through the content of the path is same. This is due to the shallow equivalence checking. This patch checks paths' equivalence deeper by adding Equal() method to Path. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-07-01table: refactor Path/Destination/Table structISHIDA Wataru
Path/Destination/Table was defined as interface. Simplify by making them normal struct. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-23table: use isLocal() to check if path is locally generatedISHIDA Wataru
original code assumes locally generated path's source is nil, which is not true. use isLocal() instead. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-23table: add Equal() method to compare PeerInfoISHIDA Wataru
this patch fixes the wrong behavior shown below $ gobgp global rib add 10.0.0.0/24 $ gobgp global rib del 10.0.0.0/24 $ gobgp global rib Network Next Hop AS_PATH Age Attrs *> 10.0.0.0/24 0.0.0.0 65000 00:05:48 [{Origin: IGP}] since we used to compare path's source by PeerInfo's pointer, locally originated routes is considered as a different route even if they have same prefix. this patch introduce Equal() method to compare PeerInfo's content and fix this wrong behavior. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-09server: kill peerMsgFUJITA Tomonori
Peers send and receive messages via channels, which could lead to a deadlock. With this patch, multiple goroutines are used for network I/Os per peer but one goroutine handle all ribs (including the global rib). So there is no messages via channels between peers. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-06-02packet: return aspath length based on the segment type.Hiroshi Yokoi
2015-05-01table: add support for route target constraint nlriISHIDA Wataru
add rtc route $ gobgp global rib add 65000 77 -a rtc check it $ gobgp global rib -a rtc Network Next Hop AS_PATH Age Attrs *> 65001:65000:75 0.0.0.0 [65001] 00:15:35 [{Origin: IGP}] Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-04-27table: remove unused methodsISHIDA Wataru
get/setOldBestPath is not used Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-04-25table: add support for encapsulation nlriISHIDA Wataru
add encap end point route(10.0.0.1) with vni 20 $ gobgp global rib add 10.0.0.1 20 -a encap check it $ gobgp global rib -a encap Please specify one command of: add or del Network Next Hop AS_PATH Age Attrs *> 10.0.0.1 0.0.0.0 [64512] 00:00:01 [{Origin: IGP} {Encap: < VXLAN | color: 20 >}] Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-04-15api: add a method to convert internal structs to protobuf structsISHIDA Wataru
- add ToApiStruct() for convertion of internal structs to protobuf structs to avoid ugly convertion by json.Marshal() && json.Unmarshal() - move grpc server code under /server instead of /api - update proto file to include more detailed path information Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-04-14api: use gRPC instead of RESTISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-04-04table: fix typoISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-04-03table: support displaying evpn destination through cliISHIDA Wataru
evpn nlri key is not expressed in CIDR format. in that case give up sorting. we can think later how to sort evpn nlri after we decided the way to express evpn nlri key(current evpn nlri key is insufficient to keep evpn nlris unique in evpn table). this patch also add a MarshalJSON method to EVPNDestination for displaying evpn routes through cli Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-03-24policy: add prefix filterNaoto Hanaue
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-21table: add EVPN route family supportYuji Oshima
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-11table: IPv4_VPN route familyYuji Oshima
2015-03-06table: remove RF from PeerInfoFUJITA Tomonori
Cleanup for supporting multiple route families. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-28table: add owner to NewTableManager's argumentsHiroshi Yokoi
2015-01-28table: revise table logsHiroshi Yokoi
2015-01-27table: fix ipv6 JSON reggressionFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>