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

Implement read timeout for PFCP connection to detect a peer crash #420

Merged
merged 10 commits into from Jan 24, 2022

Conversation

osinstom
Copy link
Contributor

@osinstom osinstom commented Jan 21, 2022

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).

@osinstom osinstom marked this pull request as ready for review January 21, 2022 11:15
ccascone
ccascone previously approved these changes Jan 22, 2022
Copy link
Contributor

@ccascone ccascone left a 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 Show resolved Hide resolved
@@ -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)
Copy link
Contributor

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

Suggested change
connClosed := make(chan struct{}, 1)
connTimeout := make(chan struct{}, 1)

ccascone
ccascone previously approved these changes Jan 22, 2022
@osinstom
Copy link
Contributor Author

retest this please

@ccascone ccascone merged commit 295ee17 into omec-project:master Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants