-
Notifications
You must be signed in to change notification settings - Fork 382
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: introduce TCP_NO_CONNECT flag #10534
base: v1.22.x
Are you sure you want to change the base?
Conversation
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.
Add to the man page as well
357d8e3
to
1ed132e
Compare
There are some specific use cases where we may not want one side of communication to initiate connections, namely when we know that one side of our configuration is being heavily restricted by a firewall. To prevent indefinite hangs with certain operations, such as RMA reads and writes, introduce a provider specific flag to trigger an error if there is not already an established connection. In this case, the application can force the connection from the other direction. Signed-off-by: Stephen Oost <stephen.oost@intel.com>
1ed132e
to
d447e69
Compare
@@ -78,6 +78,11 @@ enum { | |||
FI_OPT_EFA_WRITE_IN_ORDER_ALIGNED_128_BYTES, /* bool */ | |||
}; | |||
|
|||
/* provider specific op flags range between 60-63 */ | |||
enum { | |||
FI_FLAG_TCP_NO_CONNECT = (1ULL << 60) |
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.
I would remove FLAG
from the name.
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.
Personally, I prefer the flag to be clear about it, similar to how the EP options start with FI_OPT_{PROV}
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.
FI_OPT_
is a common prefix for options passed to fi_setopt/fi_getopt, but we don't use FI_FLAG_
for other flags.
: The tcp provider supports the following op flags | ||
|
||
*FI_FLAG_TCP_NO_CONNECT* | ||
: This flag indicates that operations should fail if there is not an |
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.
not an
--> no
*FI_FLAG_TCP_NO_CONNECT* | ||
: This flag indicates that operations should fail if there is not an | ||
existing connection to the remote peer. Instead, if there is not | ||
an established connection, an FI_ENOTCONN error should be expected. |
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.
Instead ..... should be expected.
--> In such case, an FI_ENOTCONN error should be returned.
: This flag indicates that operations should fail if there is not an | ||
existing connection to the remote peer. Instead, if there is not | ||
an established connection, an FI_ENOTCONN error should be expected. | ||
If there is an existing connection, the operation can complete normally. |
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.
The last sentence can be removed.
There are some specific use cases where we may not want one side of communication to initiate connections, namely when we know that one side of our configuration is being heavily restricted by a firewall. To prevent indefinite hangs with certain operations, such as RMA reads and writes, introduce a provider specific flag to trigger an error if there is not already an established connection. In this case, the application can force the connection from the other direction.