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

bfdd: disable echo socket when not using it #16987

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

rzalamena
Copy link
Member

Fixes #16594.

Lets avoid a performance penalty in forwarding when not using the BFD echo feature. The echo socket uses raw packet capturing along with a BPF filter which causes performance issues.

bfdd/bfd.c Outdated Show resolved Hide resolved
@donaldsharp
Copy link
Member

once ci finishes I'll get this in.

@rzalamena rzalamena force-pushed the bfd-echo-sock branch 2 times, most recently from d1ebd56 to dc52e52 Compare October 4, 2024 13:59
Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

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

looks good ... waiting on ci and the one other comment

@riw777
Copy link
Member

riw777 commented Oct 8, 2024

looks like closing this socket is causing bfdd not to be able to "find itself" ... the test probably needs to be changed (?)

@RodrigoMNardi
Copy link
Contributor

ci:rerun

@crosser
Copy link
Contributor

crosser commented Oct 21, 2024

I can confirm that the change helps.
I backported the commit to 10.1.1. With running bfdd, creating 250 VRFs does not produce noticeable impact on the network throughput.

Thanks @rzalamena !

bfdd/bfd.c Show resolved Hide resolved
@riw777
Copy link
Member

riw777 commented Nov 5, 2024

It's odd it's only failing on docker ... let's try again

ci:rerun

@riw777
Copy link
Member

riw777 commented Nov 12, 2024

I think the CI test needs to be looked at ... probably not going to pass ...

Lets avoid a performance penalty in forwarding when not using the BFD
echo feature. The echo socket uses raw packet capturing along with a BPF
filter which causes performance issues.

While here change code to use `-1` for closed sockets instead of valid
FD number `0`.

Signed-off-by: Rafael Zalamena <[email protected]>
@riw777 riw777 merged commit e268fc4 into FRRouting:master Nov 26, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bfdd: large number of raw sockets for vrfs results in severe degradation of bandwidth for all network traffic
6 participants