diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-11-09 14:14:16 -0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-11-09 14:14:16 -0800 |
commit | 84d73c1b45006c40764c1587207b5ad67598e893 (patch) | |
tree | de2bb447da0d11aef0c589d8fe5fc3e06be71f44 /server/peer.go | |
parent | 431ce6b171a05cd17784a86ea2da1dfbf2f37ea0 (diff) |
server: move POLICY_DIRECTION_IN processing from peer to fsm
For parallel processing. Each peer's rx goroutine can process IN
policy.
Note that RWLock() should be called in looking at policies via grpc
too but such operaitons are done in the main goroutine so not called.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/peer.go')
-rw-r--r-- | server/peer.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/server/peer.go b/server/peer.go index 3009c73e..425d61ee 100644 --- a/server/peer.go +++ b/server/peer.go @@ -59,7 +59,7 @@ func NewPeer(g config.Global, conf config.Neighbor, loc *table.TableManager) *Pe conf.NeighborState.SessionState = uint32(bgp.BGP_FSM_IDLE) conf.Timers.TimersState.Downtime = time.Now().Unix() peer.adjRib = table.NewAdjRib(peer.configuredRFlist()) - peer.fsm = NewFSM(&g, &conf) + peer.fsm = NewFSM(&g, &conf, peer) return peer } @@ -197,7 +197,6 @@ func (peer *Peer) handleBGPmessage(e *fsmMsg) ([]*table.Path, bool, []*bgp.BGPMe if len(e.PathList) > 0 { pathList = e.PathList peer.staleAccepted = true - peer.ApplyPolicy(table.POLICY_DIRECTION_IN, pathList) peer.adjRib.UpdateIn(pathList) } case bgp.BGP_MSG_NOTIFICATION: |