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

Draft: Trying to implement bgp-actions.set_next_hop #250

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kuroa-me
Copy link

@kuroa-me kuroa-me commented Feb 1, 2024

This is more like a request for comment than PR.

Greetings, thanks for the great works on this project. I am trying to use this project to ingest mrt dumps and modify next hop information. Being a beginner in both rust and bgp, this is quite a challenge for me, so please bear with my ignorance and correct me if wrong.

I have noticed that the current way of storing route attributes with Arc<Vec<_>> does not provide ability to modify them when applying policies like set_next_hop. At first I tried to use RwLock inside Arc to provide mutability of the attributes. But that didn't go well with 4 times longer full table mrt injection time than stock.

The second way, being this patch, tried to remove the Arc on attibutes all along, since TABLEs have their own global mutex lock. Could you please help me understand why attributes are being Arced instead of being copied around? My guess is to save memory when having multiple TABLEs.

Would please take a look at this PR and give me some direction in implementing this ability? Thank you.

p.s. I only modified the minimum possible code to make this action work.

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.

1 participant