Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting BGP/MPLS L3VPNs with Frrouting Zebra API 6 #1992

Closed
wants to merge 4 commits into from

Conversation

irino
Copy link
Contributor

@irino irino commented Mar 2, 2019

 - This commit aims to solve reported problem on issues osrg#1611, osrg#1648 and osrg#1912
 - Partial changes of this commit duplicate with changes on PR osrg#1587 (not merged) and PR osrg#1766 (not merged and already closed)
 - This commit is tested with only FRRouting version 6.0.2 (which uses Zebra API 6)
 - This commit fixes lack of LABEL_MANAGER_CONNECT_ASYNC for ZAPI6.
   (This bug is introduced on commit 2bdb76f "Supporting Zebra API version 6 which is used in FRRouting version 6")
attrsHash uint32
aslooped bool
reason BestPathReason
receiveVrfId uint32 //VRF in which the path was received.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't fatten Path structure. Can you create a map or whatever in zclient.go to store that information?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for reply and reviewing my source code.
I introduced receiveVrfId to Path struct referring PR #1766 without careful consideration.
I sent new source code on this PR for introducing map on zclient instead of deleting receiveVrfID from Path struct.

 - Deleting receiveVrfId (which is introduced on 2 previous commit 90eeb5d) from Path struct and Introducing pathVrf Map in zclient.
 - Recovering logic (which is changed on 1 previous commit acfd5be) to use assignMplsLabel in server.go.
 - Refectoring zclient's newIPRouteBody for deleating duplicate logic for IPv4 and IPv6.
if pathList, err := s.globalRib.AddVrf(name, id, rd, im, ex, pi); err != nil {
return err
} else if len(pathList) > 0 {
s.propagateUpdate(nil, pathList)
}
if vrf, ok := s.globalRib.Vrfs[name]; ok {
if s.zclient != nil && s.zclient.mplsLabelRangeSize > 0 {
go assignMplsLabel(s, vrf)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why needs to use goroutine here?

Copy link
Contributor Author

@irino irino Mar 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function assignMplsLabel waits to read channel (at line 2045 in servr.go).
https://github.com/osrg/gobgp/pull/1992/files#diff-09856fe9becddf0199651f451409356aR2045

The channel is written when zclient receives body of GET_LABEL_CHUNK message (at line 406 in zclient.go)
https://github.com/osrg/gobgp/pull/1992/files#diff-596a9f4549e849312ed11458eb74b762R406

I confirmed the program continue to block following processing when I call assignMplsLabel without goroutine.

@fujita
Copy link
Member

fujita commented Mar 14, 2019

pushed, let's see how things work. Thanks a lot!

@fujita fujita closed this Mar 14, 2019
irino added a commit to irino/gobgp that referenced this pull request Mar 17, 2019
…S L3VPN (introduced from PR osrg#1992, commit 3a79ad3) from table_manager.go to zclient.go
irino added a commit to irino/gobgp that referenced this pull request Mar 17, 2019
…S L3VPN (introduced from PR osrg#1992, commit 3a79ad3) from table_manager.go to zclient.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants