TUM-LIS / glip

Generic Logic Interfacing Project
http://glip.io
Other
44 stars 15 forks source link

loopback_measure: Partial writes on blocking #15

Closed wallento closed 8 years ago

wallento commented 8 years ago

The loopback_measure should also track the sub-index to the data for partial blocking writes. When we hit a timeout, the size_written progresses the amount of overall written data. We also need to offset into the data then to not transmit unexpected data.

imphil commented 8 years ago

The timeout is 0 ==unlimited in glip_write_b, so it should block forever.

I notice, however, two problems:

wallento commented 8 years ago

This means the tcp implementation should never return a timeout when timeout == 0, correct?

Does this workaround hurt for the moment? Its not a problem to capture partial writes anyways I suppose.

imphil commented 8 years ago

exactly, timeout == 0 means no -ETIMEDOUT. The actual bug is in the tcp implementation.

The workaround doesn't hurt, however, so let's add it for now. But please create another ticket so we don't forget about the other two issues.

wallento commented 8 years ago

Thanks, I have started already and will have a PR later today