Skip to content

detect and negotiate mtu#3304

Open
randomkang wants to merge 2 commits into
apache:masterfrom
randomkang:dynamic_mtu
Open

detect and negotiate mtu#3304
randomkang wants to merge 2 commits into
apache:masterfrom
randomkang:dynamic_mtu

Conversation

@randomkang
Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: resolve

Problem Summary:

What is changed and the side effects?

Changed:

Side effects:

  • Performance effects:

The bandwith of rdma perf will be increased 25%(in my case, from 33GB/s to 41GB/s ).

  • Breaking backward compatibility:

Check List:

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Comment thread src/brpc/rdma/rdma_endpoint.cpp Outdated
uint32_t block_size;
uint16_t sq_size;
uint16_t rq_size;
uint16_t mtu_type;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

To maintain forward compatibility with the handshake protocol, mtu_type needs to be added to the end.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok

Comment thread src/brpc/rdma/rdma_helper.cpp Outdated
uint16_t detect_mtu(struct ibv_context* ctx, int port_num) {
struct ibv_port_attr port_attr;

if (ibv_query_port(ctx, port_num, &port_attr)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Only one MTU type detection is needed in GlobalRdmaInitializeOrDie(). It doesn't need to be detected on every handshake.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants