tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: so_rerror



On 07/11/2018 12:31, Christos Zoulas wrote:
What concerns me is that the unit test t_sendrecv behaves differently
in the presence and absense of SO_RERROR and it should not.

In the presence of SO_RERROR there is an extra context switch to pump the error to userland. Recall, I prompted you to make this change in your patch. This effectively causes the receiver to overflow more often in your test case because it has more work to do. If you revert my suggestion and always wake up the socket, the chances are that you'll see similar loss without SO_RERROR as well.

But fundamentally, the test case is flawed. UDP says packets can:
1) be discarded
2) arrive in a different order than what was sent
This is basic UDP 101, but the test cases requires the complete opposite of the above.

On 06/11/2018 00:31, Christos Zoulas wrote:
> Yes and the prevailing opinion from others is that the "medium" should
> not affect the protocol behavior. I.e. UDP connections between two hosts
> and the same host should behave the same way.

We could argue the that SO_RERROR path is a different medium as it has more work to do and when it's fully loaded it won't transmit as fast. Like say a saturated wireless network.

As such I contend that medium can and will affect protocol behaviour with regards to the expectations of the receiver. Your test case and expectation clearly demonstrates this given your knowledge and expertise in UDP.

Roy


Home | Main Index | Thread Index | Old Index