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

rstream [RFC]: Set INLINE data for iWARP #1423

Merged
merged 1 commit into from Feb 14, 2024

Conversation

tatyana-en
Copy link
Contributor

@tatyana-en tatyana-en commented Jan 29, 2024

Set rsocket SQ INLINE to RS_MSG_SIZE for iWARP.

@rleon
Copy link
Member

rleon commented Feb 4, 2024

@tatyana-en , rstream as an example application, why is this change marked as RFC?

@tatyana-en
Copy link
Contributor Author

It is marked as RFC to get comments, since I didn't discuss it with an rstream maintainer.

@rleon
Copy link
Member

rleon commented Feb 6, 2024

It is marked as RFC to get comments, since I didn't discuss it with an rstream maintainer.

Are you referring to Sean? @shefty

@@ -304,7 +304,7 @@ static void set_options(int fd)
rs_setsockopt(fd, SOL_RDMA, RDMA_INLINE, &inline_size,
sizeof inline_size);
} else if (optimization == opt_bandwidth) {
val = 0;
val = 4;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm soooo out of touch with this code... One could argue the problem is actually in rs_create_ep() and not rstream. The spot in rs_create_ep() where it does this:

    if (rs->cm_id->verbs->device->transport_type == IBV_TRANSPORT_IWARP)
        rs->opts |= RS_OPT_MSG_SEND;

adjusts the rsocket options, which causes the check below (also in rs_create_ep()) to fail:

    if ((rs->opts & RS_OPT_MSG_SEND) && (rs->sq_inline < RS_MSG_SIZE))
        return ERR(ENOTSUP);

Technically, there's nothing a use did wrong here. I think a better fix is to handle this internally. Something like:

    /* See comment for RS_OPT_MSG_SEND */
    if (rs->cm_id->verbs->device->transport_type == IBV_TRANSPORT_IWARP) {
        rs->opts |= RS_OPT_MSG_SEND;
        if (rs->sq_inline < RS_MSG_SIZE)
            rs->sq_inline = RS_MSG_SIZE;
    }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback!

Set rsocket SQ INLINE to RS_MSG_SIZE for
iWARP, because rstream sets INLINE to zero
for bandwidth tests and there is a check in
rs_create_ep():

if ((rs->opts & RS_OPT_MSG_SEND) && (rs->sq_inline < RS_MSG_SIZE))
                return ERR(ENOTSUP);

which causes the test to fail for iWARP.

Signed-off-by: Tatyana Nikolova <[email protected]>
Copy link
Contributor

@shefty shefty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me. nit: Maybe update the PR comment to align with the commit if you have permission to change it.

@tatyana-en
Copy link
Contributor Author

Changes look good to me. nit: Maybe update the PR comment to align with the commit if you have permission to change it.

I updated the comment, but you need to go to the commit to see the change.

@shefty
Copy link
Contributor

shefty commented Feb 12, 2024

I meant to the pull request itself. That is, where is says "rstream [RFC]: Set INLINE data for iWARP". It doesn't really matter, since it doesn't end up in the git logs, but can be helpful for whoever is managing the pull requests.

@tatyana-en
Copy link
Contributor Author

I meant to the pull request itself. That is, where is says "rstream [RFC]: Set INLINE data for iWARP". It doesn't really matter, since it doesn't end up in the git logs, but can be helpful for whoever is managing the pull requests.

Unfortunately, I don't know how to do this without closing this PR and opening a new one with a different name.

@rleon rleon merged commit 942bc24 into linux-rdma:master Feb 14, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants