perftest icon indicating copy to clipboard operation
perftest copied to clipboard

Add ipv6 address support for initial communication.

Open dmonakhov opened this issue 5 years ago • 9 comments

Currenty initial negotiation performed via ipv4 which is not suitable for modern ipv6 only topology This patch allow to specify which address family to use, default behaviour not changed.

New option: --ipv6-addr

Usage example:

Server

./ib_write_bw -d mlx5_0 --ipv6-addr

Client

./ib_write_bw -d mlx5_0 --ipv6-addr 2a02:6b8:c0e:97f:0:441d:9fbd:3f1e

dmonakhov avatar Jun 19 '20 08:06 dmonakhov

Last commit is redundant, maintainer should probably update changelog by himself ( commands described in commit message)

dmonakhov avatar Jun 20 '20 07:06 dmonakhov

Hi @dmonakhov,

It would take more time to review and testing the code from my side, sorry for delayed merge. Thank you for the contribution.

dimasique1 avatar Jun 29 '20 11:06 dimasique1

I've fixed some mistakes in debian build config. Now debian package build works w/o crunches.

dmonakhov avatar Jul 01 '20 11:07 dmonakhov

@dmonakhov What is the status of merged, seems nice feature to be added in perftest

alokprasad avatar Feb 19 '21 14:02 alokprasad

With latest rdma-core you have to remove #ifdef HAVE_GID_TYPE // declaration is copied from rdma-core, since it is private there. enum ibv_gid_type { IBV_GID_TYPE_IB_ROCE_V1, IBV_GID_TYPE_ROCE_V2, }; and also modify

struct roce_version_sorted_enum roce_versions_sorted[] = { {IBV_GID_TYPE_ROCE_V1, 1}, {IBV_GID_TYPE_ROCE_V2, 2}, };

alokprasad avatar Feb 19 '21 15:02 alokprasad

Complete Command should be ./ib_write_bw -d qedr0 --ipv6-addr --ipv6 ./ib_write_bw -d qedr0 --ipv6-addr 2001:0:0:0:0:0:0:2 --ipv6

Also will good to have it working with rdma_cm

alokprasad avatar Feb 21 '21 01:02 alokprasad

Ok, will do.

dmonakhov avatar Apr 28 '22 13:04 dmonakhov

Hi @dmonakhov, have you had a chance to work on it?

sshaulnv avatar Aug 10 '22 07:08 sshaulnv

Sorry, missed this notification. No issue is not resolved yet. I'll try to fix it this week.

dmonakhov avatar Aug 15 '22 14:08 dmonakhov

Hi dmonakhov, any update?

HassanKhadour avatar Nov 10 '22 09:11 HassanKhadour

Hi, Sorry for delay. I've quit my job so I do not have access to infiniband hardware at the moment, so I can not test my stuff. But the good new is that I will probably have access to EFA devices soon so I'll be back to actual rebase.

dmonakhov avatar Nov 11 '22 10:11 dmonakhov

@xiakun-microsoft @joyom-msft , thanks for the assist guys!, you were very helpful. I followed below note "here is a bug, you can't define a struct sockaddr variable to save the ipv6 address. rdma_bind_addr() fails with the current change. change it to struct sockaddr *sin, and point it to res->ai_addr, no need to copy the values." on server and client parts and it solved the issue.

I didn't understand this note "use struct sockaddr_storage" much, can you please describe it more? I just switched "struct sockaddr sin" to be a pointer and it worked fine

HassanKhadour avatar Jun 28 '23 07:06 HassanKhadour

@xiakun-microsoft @joyom-msft , thanks for the assist guys!, you were very helpful. I followed below note "here is a bug, you can't define a struct sockaddr variable to save the ipv6 address. rdma_bind_addr() fails with the current change. change it to struct sockaddr *sin, and point it to res->ai_addr, no need to copy the values." on server and client parts and it solved the issue.

I didn't understand this note "use struct sockaddr_storage" much, can you please describe it more? I just switched "struct sockaddr sin" to be a pointer and it worked fine

Sorry I didn't make it clear. My teammate @joyom-msft rebased this PR on the master branch, and a new local variable struct sockaddr_in source_sin; was added on the master branch. I guess the purpose of that variable is to keep a copy of source address, so suggested using struct sockaddr_storage which has enough space for the ipv6 address.

xiakun-lu avatar Jun 28 '23 16:06 xiakun-lu

@dmonakhov Following the priority of this feature that has been raised from several perftest users and following the priority we created a new PR based on this PR that includes the requested changes that may solve all the commits of PR, RDMA CM issue was fixed with @xiakun-microsoft and @joyom-msft assist. @dmonakhov @xiakun-microsoft @joyom-msft Appreciate your review here https://github.com/linux-rdma/perftest/pull/218

HassanKhadour avatar Jul 02 '23 09:07 HassanKhadour

@xiakun-microsoft Thank you very much for moving this forward, your PR is looks good, probably we can close this one it favor to https://github.com/linux-rdma/perftest/pull/218

dmonakhov avatar Jul 02 '23 10:07 dmonakhov