OpenVPN / tap-windows6

Windows TAP driver (NDIS 6)
Other
785 stars 237 forks source link

hlk2: Transmit flow control #77

Closed sgstair closed 5 years ago

sgstair commented 5 years ago

Previously, tap-windows6 was happy to accept and buffer as many packets as the client could send. With some performance tests (including one in the HLK) this would typically lead the system to exhausting its memory as the performance test client would send as fast as possible. This change limits the buffered data to fixed amount (TAP_BUFFER_SIZE), and delays acceptance of sends after that threshold is reached.

cron2 commented 5 years ago

After quite a bit of discussion on IRC, I think I now understand how this works, and the code looks good. Thanks.