-
Notifications
You must be signed in to change notification settings - Fork 29
Minor: fix bridge implementation #110
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
Minor: fix bridge implementation #110
Conversation
I'm a bit confused here, while I tested the intended gateway route creation in test framework, that seem to be working as expected if ifindex = 0 as arg in mctp_nl_route_add(). But same fails in my machine.
though per my understanding of implementation func:
on further inspecting looks like RTA_GATEWAY rta policy is not supported yet in the latest kernel ?? I remember testing this with your branch you gave last time to test from https://github.com/CodeConstruct/linux/tree/dev/forwarding |
The forwarding patches are upstream, but not in a released version as yet. 6.17 should have the merged gateway support. |
Thanks for the infor, will this be a blocker in merge till release happens? |
No, that shouldn't block us here, as long as you're able to test with a pre-release kernel. |
Ack, will update soon on testing. |
I was able to test this.
|
On cc7ea36, you mention:
I think we also have an issue that the pool route is not created until after the allocate endpoint IDs call. This gives us the following race:
which is essentially the same thing fixed in 9711f0b, but with bridges. |
If i understand the original problem statement correctly which got fixed in 9711f0b,, the issue is right after the moment EID is assigned to an endpoint, we were spending few moments during publishing the peer and then setting up the routes, right at this window, endpoint could very well begin communicating to BusOwner which BusOwner might not be able to respond to since routes doesn't exist yet. Going by same implication, we should setup routes for downstream eid just before AllocateEndpoint ID and may have delete these routes if Allocation fails. |
1303e95
to
9baff49
Compare
yes, that's correct. However, no specific need to have that fixed in this PR; more a note that we'll need to address it at some point. |
Ah, you have already added it here. All good! |
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.
Couple of minor things, plus a typo (birdge
) in the commit message for patch 3.
Otherwise, all looks good.
For bridged endpoints, route setup is already done once pool space is allocated successfully. These are destined to be routed from the bridge itself. Add appropiate check to avoid extra route creation while setting up bridged endpoints. Signed-off-by: Faizan Ali <[email protected]>
If endpoint responds with some error in endpoint_send_set_endpoint_id() , assumed bridge pool space needs to reset too, this is needed as it misleads remove_peer() to delete gateway routes too which will only be created after bridge pool allocation Signed-off-by: Faizan Ali <[email protected]>
if ifindex is zero and mctp_fq_addr is valid then only gateway routes are created. Immediately after bridge allocates the EID to downstream endpoint, they could initiate communication to bridge -> busowner which requires routes to those endpoints for busowner to respond back. Fix: update ifindex as zero for gateway route creation and deletion. Also setup routes for downstream endpoints right allocation of eid happens by the bridge. Signed-off-by: Faizan Ali <[email protected]>
9baff49
to
3e0e9c2
Compare
Addressed the comments, once this merges, will rebase other PR 85 to ease the review |
Merged, thanks! |
This PR addresses minor fixes for bridge implementation.