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

prov/tcp: introduce TCP_NO_CONNECT flag #10534

Draft
wants to merge 1 commit into
base: v1.22.x
Choose a base branch
from

Conversation

ooststep
Copy link
Contributor

@ooststep ooststep commented Nov 13, 2024

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.

prov/tcp/src/xnet.h Outdated Show resolved Hide resolved
Copy link
Contributor

@aingerson aingerson left a 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

prov/tcp/src/xnet_rdm_cm.c Outdated Show resolved Hide resolved
prov/tcp/src/xnet_attr.c Outdated Show resolved Hide resolved
prov/tcp/src/xnet_attr.c Outdated Show resolved Hide resolved
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>
@@ -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)
Copy link
Contributor

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.

Copy link
Contributor

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}

Copy link
Contributor

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
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants