diff options
author | Pin-Yen Lin <treapking@google.com> | 2018-08-14 14:23:25 +0800 |
---|---|---|
committer | Earl Ou <shunhsingou@google.com> | 2018-09-11 06:29:32 +0000 |
commit | 36276ba2392f030250fa9dd1e1ea28a026bc51c6 (patch) | |
tree | 432bffacd68395f8ab9514fdd00f68ebbe33cb2e /src/dev/serial/simple.hh | |
parent | 34b16aa817238c3db88462dc31173faf27cfdcba (diff) | |
download | gem5-36276ba2392f030250fa9dd1e1ea28a026bc51c6.tar.xz |
net: Fix a bug when receiving fragamented packets
In the previous implementation, the function EtherTap::recvReal will only
read one packet when received some ``interrupt'' (explicitly, when async_IO
set to true). When someone tries to send a large message to the simulated
device, the message will be divided to several packets due to packet
fragmentation. In this situation recvReal will only read one packet and
left the other packets in the buffer. This significantly increases the
networking latency. So before reading from socket, I change the socket into
non-blocking mode and keep reading from it until there's no packet left.
Change-Id: Ieb94a8532cd3994862b6f3eb9474caf7ccf617da
Reviewed-on: https://gem5-review.googlesource.com/12338
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/dev/serial/simple.hh')
0 files changed, 0 insertions, 0 deletions