Test hanging inside ethernet driver transaction function: while loop

Where does packet_size change inside of the while(packet_size) loop? If packet_size never changes, I see no way of exiting the while(packet_size) loop. Is there something missing?