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
Implement read timeout for PFCP connection to detect a peer crash #420
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Just left a few minor comments.
pfcpiface/conn.go
Outdated
@@ -179,12 +179,26 @@ func (pConn *PFCPConn) setLocalNodeID(id string) { | |||
|
|||
// Serve serves forever a single PFCP peer. | |||
func (pConn *PFCPConn) Serve() { | |||
go func() { | |||
connClosed := make(chan struct{}, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name is misleading, it looks like a read timeout can happen even with a connection that is still open
connClosed := make(chan struct{}, 1) | |
connTimeout := make(chan struct{}, 1) |
Co-authored-by: Carmelo Cascone <carmelo@opennetworking.org>
retest this please |
If a PFCP does not send any message in the
read_timeout
period, PFCP Agent closes the PFCP connection and clears the fastpath state.This behavior is needed to detect SMF crash (covered by
smf-failure.xml
STC test).