Draft: Trying to implement bgp-actions.set_next_hop #250
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 useRwLock
insideArc
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, sinceTABLE
s have their own global mutex lock. Could you please help me understand why attributes are beingArc
ed instead of being copied around? My guess is to save memory when having multipleTABLE
s.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.