Add ipv6 address support for initial communication.
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
Last commit is redundant, maintainer should probably update changelog by himself ( commands described in commit message)
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.
I've fixed some mistakes in debian build config. Now debian package build works w/o crunches.
@dmonakhov What is the status of merged, seems nice feature to be added in perftest
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}, };
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
Ok, will do.
Hi @dmonakhov, have you had a chance to work on it?
Sorry, missed this notification. No issue is not resolved yet. I'll try to fix it this week.
Hi dmonakhov, any update?
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.
@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
@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.
@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
@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