Skip to content

Commit

Permalink
table: disable merging NLRIs if we don't have many NLRIs
Browse files Browse the repository at this point in the history
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
  • Loading branch information
fujita committed Aug 29, 2015
1 parent c46d51f commit 70a8399
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion table/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,14 @@ func CreateUpdateMsgFromPaths(pathList []*Path) []*bgp.BGPMessage {
var msgs []*bgp.BGPMessage

pathByAttrs := make(map[uint32][]*bucket)

pathLen := len(pathList)
for _, path := range pathList {
y := func(p *Path) bool {
// the merging logic makes gobgpd slower so if
// paths are not many, let's avoid mering.
if pathLen < 1024 {
return false
}
if p.GetRouteFamily() != bgp.RF_IPv4_UC {
return false
}
Expand Down

0 comments on commit 70a8399

Please sign in to comment.