-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
setsockopt ZMQ_TOS doesn't work for IPv6 #2208
Comments
Do you have a use case or a way to test that it would work properly if implemented? |
Yes. Here at Facebook we built We have internally carried out the patch and it is working well. Trying to send it upstream. Happy to take back your feedback and iterate as per the requirements. OpenR: https://code.facebook.com/posts/1142111519143652/introducing-open-r-a-new-modular-routing-platform/ |
Summary: To set `Type Of Service` for IP layer packets ZMQ provides `ZMQ_TOS` socket option. However this only works for v4 sockets. Considering things are moving to IPv6 heavily (especially within enterprise networks), ZMQ should support setting `traffic class` for v6 based on `ZMQ_TOS`. There is a subtle difference between v4 and v6 in terms of the positioning of field but TOS has same meaning in both v4 and v6. Linux provides following APIs for v4/v6 to set TOS field value. ``` // For v4 setsockopt(fd, IPPROTO_IP, IP_TOS, tos, sizeof(tos)); // For v6 setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, tos, sizeof(tos)); ``` Test Plan: Make sure Cmake works fine and all tests passes. Imported this change to `OpenR` project and tested on our local testbed. Captured some packets exchanged between PUB/SUB and ROUTER/ROUTER sockets pairs. Verify that `TCLASS` value is set as per expectation. Tasks: zeromq#2208
Summary: To set `Type Of Service` for IP layer packets ZMQ provides `ZMQ_TOS` socket option. However this only works for v4 sockets. Considering things are moving to IPv6 heavily (especially within enterprise networks), ZMQ should support setting `traffic class` for v6 based on `ZMQ_TOS`. There is a subtle difference between v4 and v6 in terms of the positioning of field but TOS has same meaning in both v4 and v6. Linux provides following APIs for v4/v6 to set TOS field value. ``` // For v4 setsockopt(fd, IPPROTO_IP, IP_TOS, tos, sizeof(tos)); // For v6 setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, tos, sizeof(tos)); ``` Test Plan: Make sure Cmake works fine and all tests passes. Imported this change to `OpenR` project and tested on our local testbed. Captured some packets exchanged between PUB/SUB and ROUTER/ROUTER sockets pairs. Verify that `TCLASS` value is set as per expectation. Tasks: zeromq#2208
Great! If you have already done the work, then please do send a PR and we'll merge it. Your diff looks good, the only thing you'll want to make sure is that if IPv6 is not enabled it doesn't cause a failure. Thanks! |
Fixed by #2209 |
To set
Type Of Service
for IP layer packets ZMQ providesZMQ_TOS
socket option. However this only works for v4 sockets. Considering things are moving to IPv6 heavily (especially within enterprise networks), ZMQ should support settingtraffic class
for v6 based onZMQ_TOS
.There is a subtle difference between v4 and v6 in terms of the positioning of field but TOS has same meaning in both v4 and v6. Linux provides following APIs for v4/v6 to set TOS field value.
Ask for this issue is to extend
ZMQ_TOS
to support ipv6traffic class
as well.The text was updated successfully, but these errors were encountered: