My NIC driver, which is writed by myself, didn't pass high pressure test!

I writed a shell script in which the key commands are "scp" to test the driver under high pressure. The shell script loop 3000 times and in each loop, the scp command transmits 1GB data.

When the test fail, it report like this:
"... 0B/s ... stalled ... "
"write failure: broken pipe"
It means the transmission rate between client and server is fall gradually to 0Byte per second from 11MB per second when the driver run nomally. Finally, the "pipe broken"(what does it mean)! This failure often ocurred after a large amount of data transmitted, such as 36GB or 52GB and so on.

what is the problem? How should I crrect it?