packet: Linearize more in packet_merger::merge

This fix tcp_server rxrx test on DPDK. The problem is that when we
receive out of order packets, we will hold the packet in the ooo queue.
We do linearize on the incoming packet which will copy the packet and
thus free the old packet. However, we missed one case where we need to
linearize. As a result, the original packet will be held in the ooo
queue. In DPDK, we have fixed buffer in the rx pool. When all the dpdk
buffer are in ooo queue, we will not be able to receive further packets.
So rx hangs, even ping will not work.
This commit is contained in:
Asias He
2015-02-04 10:39:54 +08:00
parent 4f21d500cb
commit 6a468dfd3d

View File

@@ -51,6 +51,7 @@ public:
// Merge two segments, trim front of new segment
auto trim = seg_end - beg;
p.trim_front(trim);
p.linearize();
// Append new data to the old segment, keep the old segment
seg_pkt.append(std::move(p));
insert = false;