Vista, GQoS and WSAIoctl
I am currently trying to port an existing GQoS solution (since we cannot use the traffic control API, due to user privilege restrictions) from Windows XP to Vista and I am struggling with a issue regarding WSAIoctl.
We are running the exact same code under XP and Vista, using the v6.0 Microsoft SDK and the behaviour is different.
We set the SIO_SET_QOS option using WSAIoctl and the FLOWSPEC structure, on a UDP socket, after binding it. Under XP, WSAIoctl returns NO_ERROR and I can see DSCP field values changing, but under Vista, it returns WSAEINVAL and, of course the DSCP field values remains zero.
The FLOWSPEC structure has the exact same values (especially token rate at 9250 and service type being SERVICETYPE_GUARANTEED | SERVICE_NO_QOS_SIGNALING and the other sending and receiving values set to QOS_NOT_SPECIFIED).
I tried, in vain, changing the sending FLOWSPEC values and moving the call to WSAIoctl before binding the socket.
Would anyone have any pointers to where there could be an errorWould anyone have any pointers to where there could be an error?
Thanks
In order to help on this issue here are the values for the sending and receiving flowspecs:
sending:
token rate at 128000 and service type = SERVICETYPE_CONTROLLEDLOAD | SERVICE_NO_QOS_SIGNALING (others are set to QOS_NOT_SPECIFIED)
receiving:
service type set to SERVICETYPE_NOTRAFFIC, others are set to QOS_NOT_SPECIFIED
Thanks
Hi,
we discovered the same problem. Everything with WSAIoctl and SIO_SET_QOS works fine with Windows 2000 and XP, but the same code does not work with Vista any more. The error code returned is 10022.
I can provide sample code for this problem and I saw also problems with the old GQos Platform SDK samples on Vista.
Could anyone from Microsoft give us a hint what's going wrong here ?
The available documentation only tells, that the GQos should be supported by Vista...
Please let me know if more details are necessary.
Thx,
Stefan
Hi,
We are also seeing the exact same issue with the WSAIoctl function where it works on an XP machine but the exact same code fails on a Vista machine returning the same error code 10022.Please let us know us if there is something we could try or implement as a work around temporarily for Vista machines.
Sincerely,
Ray
I'm having the same problem as well. Can someone from Microsoft please respond to this thread?
Count me in too... I can't get it to work on Vista either. Hello, Microsoft? Tell us what's changed and how to correct it!
mark wrote: |
| Count me in too... I can't get it to work on Vista either. Hello, Microsoft? Tell us what's changed and how to correct it! | |
Oh, by the way, yes I have tried to use qWave on Vista, but QOSAddSocketToFlow always fails, and it does in the Qos2 sample in the SDK too...
Ray, Stefan, Guy,
we are aware of this particular issue with the SERVICE_NO_QOS_SIGNALING flag. The fix for the bug will be available in Vista's SP1.
In the meantime, as a workaround, your API calls will succeed on Vista if you do not pass in this specific flag.
thx
Mathias
Mark,
can you tell us more about the error codes you're seeing from the QOSAddSocketToFlow call, the setup you're using and the environment you're running it in?
thx
Mathias
Hi Mathias, thanks for the reponse... Two things threw me off: 1) I wasn't using (and the sample didn't use) QOS_NON_ADAPTIVE_FLOW so when it wasn't on the same subnet, it was failing. Not knowing that at the time, I then simplified and tried running the cilent and server on the same machine to try to get the API's to work (knowing QoS tagging doesn't make a lot of practical sense but thinking I could at least work out the APIs) and later discovered that 2) QOSAddSocketToFlow always fails when the target of the flow is the same machine (even when not using loopback directly). Having those two things in the documentation would have helped me significantly. Thanks... Mark.
I still can't get it to work, even without the SERVICE_NO_QOS_SIGNALLING flag. I still get the 10022 error from WSAIoctl(). Here is what I'm doing, basically (the code succeeds under XP and fails under Vista):
...
// Find a protocol provider that supports QOS and open the socket using that provider
...
// Set the QOS
QOS qos;
qos.SendingFlowspec.TokenRate = 15000;
qos.SendingFlowspec.TokenBucketSize = QOS_NOT_SPECIFIED;
qos.SendingFlowspec.PeakBandwidth = QOS_NOT_SPECIFIED;
qos.SendingFlowspec.Latency = QOS_NOT_SPECIFIED;
qos.SendingFlowspec.DelayVariation = QOS_NOT_SPECIFIED;
qos.SendingFlowspec.ServiceType = SERVICETYPE_GUARANTEED;
qos.SendingFlowspec.MaxSduSize = QOS_NOT_SPECIFIED;
qos.SendingFlowspec.MinimumPolicedSize = QOS_NOT_SPECIFIED;
qos.ReceivingFlowspec.TokenRate = 15000;
qos.ReceivingFlowspec.TokenBucketSize = QOS_NOT_SPECIFIED;
qos.ReceivingFlowspec.PeakBandwidth = QOS_NOT_SPECIFIED;
qos.ReceivingFlowspec.Latency = QOS_NOT_SPECIFIED;
qos.ReceivingFlowspec.DelayVariation = QOS_NOT_SPECIFIED;
qos.ReceivingFlowspec.ServiceType = SERVICETYPE_GUARANTEED;
qos.ReceivingFlowspec.MaxSduSize = QOS_NOT_SPECIFIED;
qos.ReceivingFlowspec.MinimumPolicedSize = QOS_NOT_SPECIFIED;
QOS_DESTADDR qosdest;
qosdest.ObjectHdr.ObjectType = QOS_OBJECT_DESTADDR;
qosdest.ObjectHdr.ObjectLength = sizeof(QOS_DESTADDR);
qosdest.SocketAddress = address.get_sockaddr();
qosdest.SocketAddressLength = address.get_sockaddr_size();
qos.ProviderSpecific.buf = (char *)&qosdest;
qos.ProviderSpecific.len = sizeof(qosdest);
if (WSAIoctl(s, SIO_SET_QOS, &qos, sizeof(qos) + sizeof(qosdest), NULL, 0, &bytes, NULL, NULL) == SOCKET_ERROR) {
DWORD error = ::WSAGetLastError();
}
Can you provide or point me to a code sample that works under Vista?
Vista has a different QoS architecture than XP; the Ioctl won't work... see QOSAddSocketToFlow and related APIs that are new to Vista. I have gotten them to correctly tag...
Mark, I believe you are confused. First, this thread is not about qWAVE (QOSAddSocketToFlow etc.), the new QOS API introduced in Vista. Your posts about qWAVE are simply confusing the issue we're trying to get solved here. Please start a new thread if you have a problem with qWAVE.
Second, the Generic QOS API, which uses the WSAIoctl(), IS supported in Vista, according to Microsoft. At least they stated this in the MSDN docs, various posts on this forum and in blogs. It may not be the preferred API under Vista, but it's basically the only choice for both XP and Vista compatibility.
Kevin, I initially joined this thread because I too couldn't get the WSAIoctl QoS to work. I later discovered through another source that it was not supported on Vista in that way and that qWAVE was the only way to accomplish QoS. I'm not confused at all and I have no problem with qWAVE; I'm trying to
help people here with my posts. My
working QoS code portably uses WSAIoctl on XP and qWAVE on Vista. If you want to press ahead with your battle on trying to get WSAIoctl to work on Vista, you may, but there is a simple working alternative that others may use...
While it is certainly possible, and not all that difficult, to code the software to use GQoS under XP and qWAVE under Vista, it isn't desirable. In our case, our customers want control over the DSCP value. This greatly complicates our documentation as we have to give instructions dependent on the OS the customer is running. QoS is complicated enough without this added hassle.
In fact, I've yet to find any documentation describing where the DSCP values for the qWAVE traffic types can be set. The qWAVE documentation seems to imply that it will determine at run time what DSCP marking to use. That may work for a small home network, but it is unacceptable for the enterprise that many be running many devices that are not LLDP aware.
It was my private email to Gabe Frost that finally got someone from Microsoft to look into this thread. He has stated in private emails to me that GQoS is still in Vista. That's my source, so who is this "other source" that's saying it's not in Vista?