From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5BBFF438A4; Tue, 16 Jan 2024 15:28:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4C4F40278; Tue, 16 Jan 2024 15:28:29 +0100 (CET) Received: from out203-205-251-80.mail.qq.com (out203-205-251-80.mail.qq.com [203.205.251.80]) by mails.dpdk.org (Postfix) with ESMTP id 5398440042 for ; Tue, 16 Jan 2024 15:28:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1705415298; bh=d747tYXJrRK5UidSXHlAY8hdHQYYxdEe+Qg2eCZsXW4=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=SMgNWTFzxwoQb3uTV1NbBG22B2qzwmEIjIKhQmeqKpATLTJglMqQ0GhSgBFN1D/oT HhjP+RLF5zIdAivyDMAhK5PyLb0hFTGS0DdbokZMb+wshvcraJL2TXLxjIAGOnHu+T UGnpjRJYA7FGJ6J13NQRPm8D7S4quPGr3Cg1pakc= Received: from [192.168.31.105] ([101.93.40.233]) by newxmesmtplogicsvrszc5-2.qq.com (NewEsmtp) with SMTP id 71122239; Tue, 16 Jan 2024 22:28:17 +0800 X-QQ-mid: xmsmtpt1705415297t2xc8r50a Message-ID: X-QQ-XMAILINFO: MsVh1D+XQWnX/dEdAk/zRHuPkhYhIBA2jtOmsIroh71m1HX87FjwCccz0Wt2Mv rhyLlMkH6v1eGHqSXMxZD6ZqtHzI9kQmxiWT7/HhLfl7H7ewsBKSGUBuX12lo5LT6ztklM9f639O WpeJh2lbCn1qBaGpbwK3l2RvDuFqD/Ykn/FaIse+gDIIuYA7hmV2/n4RpbPAyu+VRZniXNPalhQ3 dr45AKNaBkBrMYPg8jync+Kkj7ZhSZKk3NGaKSLg4SQTG0K+cyoO4KbvUKkrTvK0tnmh0RVnCH+A fMDvwE6BJ8yllKAXWgI7LKqmcNHKk2SuA4mX0s2LDOF/j6t/uImBoZU5aVpsRRfPEOZyzKjaiZ2p BOIm3FK91HX7+wwlc15NT5w8QpBHmk6hvuYeOn8AY3cM+2X+Rl3YBRWobMgIvHYbi0IEIBxDA7Mv E8EIth6onvB3SKj+nYAuYHXepwoTwa3J3FT0EnIAjMLsJamWIBdTTTLgUJmVYGybkgLVaT+dgL1F lgnPWKMBAOeDluQm4G5xHH8FAsI7a25OzbWoJN1Qof5OWo6j4v+94dY6MDdALIUgIW9tPP+Hxq8U 4QZh5JLeDIofuHZ4tzpZG0JrZNJwu+gxK/SpLGJCpC8GnbshW6mgG3Qr5KgEGoqruPRGvD7JzwJx rS9JeUG8vK8Zv6w+LSSd26VtQiQn3q9Ndmmk2a/ADhI323/JA0/AGmkrPSgNOqM4H6u9LXpjgUpn c5A0gkm+rdeunqyAGWsFpy01N4wFyPOM7qi7q7AOu7I38AyO+rjo+jNRCwXGWlTCiOAVpk4n+yn8 W0cw3HpEordFTEngPaGn58goqVqXQ9qUqkIIFG3iPEpUki88p4wJhiJ1gX6RaQODw6E1JmBJit8m 09O5QLWh1V4vmtasWDUiwvun9b1xYZ5WLWLB2eY/7bcDBqtiSW4E6vOybrhaPDca6Rajh4p6EnfJ mnJavgXyfsWMpCe5/BE6Zilp1H0gAo X-QQ-XMRINFO: Mp0Kj//9VHAxr69bL5MkOOs= X-OQ-MSGID: Date: Tue, 16 Jan 2024 22:28:16 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v13] gro: fix reordering of packets in GRO layer To: Kumara Parameshwaran Cc: dev@dpdk.org References: <20231208181738.23931-1-kumaraparamesh92@gmail.com> <20240108160453.723207-1-kumaraparamesh92@gmail.com> From: =?UTF-8?B?6IOh5ZiJ55Gc?= In-Reply-To: <20240108160453.723207-1-kumaraparamesh92@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 在 2024/1/9 上午12:04, Kumara Parameshwaran 写道: > In the current implementation when a packet is received with > special TCP flag(s) set, only that packet is delivered out of order. > There could be already coalesced packets in the GRO table > belonging to the same flow but not delivered. > This fix makes sure that the entire segment is delivered with the > special flag(s) set which is how the Linux GRO is also implemented > > Signed-off-by: Kumara Parameshwaran > --- > If the received packet is not a pure ACK packet, we check if > there are any previous packets in the flow, if present we indulge > the received packet also in the coalescing logic and update the flags > of the last recived packet to the entire segment which would avoid > re-ordering. > > Lets say a case where P1(PSH), P2(ACK), P3(ACK) are received in burst mode, > P1 contains PSH flag and since it does not contain any prior packets in the flow > we copy it to unprocess_packets and P2(ACK) and P3(ACK) are merged together. > In the existing case the P2,P3 would be delivered as single segment first and the > unprocess_packets will be copied later which will cause reordering. With the patch > copy the unprocess packets first and then the packets from the GRO table. > > Testing done > The csum test-pmd was modified to support the following > GET request of 10MB from client to server via test-pmd (static arp entries added in client > and server). Enable GRO and TSO in test-pmd where the packets recived from the client mac > would be sent to server mac and vice versa. > In above testing, without the patch the client observerd re-ordering of 25 packets > and with the patch there were no packet re-ordering observerd. > > v2: > Fix warnings in commit and comment. > Do not consider packet as candidate to merge if it contains SYN/RST flag. > > v3: > Fix warnings. > > v4: > Rebase with master. > > v5: > Adding co-author email > v6: > Address review comments from the maintainer to restructure the code > and handle only special flags PSH,FIN > > v7: > Fix warnings and errors > > v8: > Fix warnings and errors > > v9: > Fix commit message > > v10: > Update tcp header flags and address review comments > > v11: > Fix warnings > > v12: > Fix nit review comments > > v13: > Fix warnings > > lib/gro/gro_tcp.h | 9 +++++++++ > lib/gro/gro_tcp4.c | 36 +++++++++++++++++++++++++++--------- > lib/gro/gro_tcp_internal.h | 2 +- > lib/gro/gro_vxlan_tcp4.c | 5 +++-- > 4 files changed, 40 insertions(+), 12 deletions(-) > Reviewed-by: Jiayu Hu Thanks, Jiayu