-
Notifications
You must be signed in to change notification settings - Fork 398
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
prov/tcp: implement FI_FIREWALL_ADDR for AV inserts #10724
base: main
Are you sure you want to change the base?
Conversation
903879e
to
0399693
Compare
FI_FIREWALL_ADDR indicates to the provider that the inserted addresses may be restricted by a firewall Signed-off-by: Stephen Oost <[email protected]>
Signed-off-by: Stephen Oost <[email protected]>
0399693
to
fb9a9bb
Compare
peer = node->data; | ||
peer->refcnt++; | ||
*peer = node->data; | ||
(*peer)->refcnt++; |
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.
Set ret = FI_SUCCESS here to avoid an extra branch on return.
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.
Something is off in the flag settings. A peer might be inserted in response to a connection request (xnet_process_connreq). In that case, peer->av_flags = 0. When an address is inserted with FI_FIREWALL_ADDR, the peer will be found, but peer->av_flags won't be adjusted.
I think you need (*peer)->av_flags |= flags;
here.
*peer = rxm_alloc_peer(av, addr); | ||
if (!*peer) | ||
ret = -FI_ENOMEM; | ||
(*peer)->av_flags = flags; |
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.
Needs to be part of an else, or this results in a crash.
struct util_peer_addr * | ||
util_get_peer(struct rxm_av *av, const void *addr) | ||
|
||
int util_get_peer(struct rxm_av *av, const void *addr, struct util_peer_addr **peer, |
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.
nit: check line length
This PR introduces a new
fi_av_insert
flag,FI_FIREWALL_ADDR
, which indicates that an av insert should fail if there is not already an established connection to the peer and the provider has no means to circumvent the firewall. The PR also implements the functionality for the TCP provider (and RXM provider, though this is not the primary goal).I do still need to add a fabtest for the feature but wanted to push this up for initial review in the meantime.
resolves #10637
replaces #10534