From 6a468dfd3dadbcd3c29bb684b6bd2c6059bfc5a3 Mon Sep 17 00:00:00 2001 From: Asias He Date: Wed, 4 Feb 2015 10:39:54 +0800 Subject: [PATCH] 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. --- net/packet-util.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/net/packet-util.hh b/net/packet-util.hh index 4bc88d0b27..f5518fa107 100644 --- a/net/packet-util.hh +++ b/net/packet-util.hh @@ -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;