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 6EBBD42950; Sat, 15 Apr 2023 16:45:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 00A01410F1; Sat, 15 Apr 2023 16:45:47 +0200 (CEST) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id A0D5240A7A; Sat, 15 Apr 2023 16:45:45 +0200 (CEST) Received: from kwepemm600002.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4PzGHG2BT4z17KLQ; Sat, 15 Apr 2023 22:42:02 +0800 (CST) Received: from dggpeml500020.china.huawei.com (7.185.36.88) by kwepemm600002.china.huawei.com (7.193.23.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sat, 15 Apr 2023 22:45:40 +0800 Received: from dggpeml500020.china.huawei.com ([7.185.36.88]) by dggpeml500020.china.huawei.com ([7.185.36.88]) with mapi id 15.01.2507.023; Sat, 15 Apr 2023 22:45:40 +0800 From: "jiangheng (G)" To: "users@dpdk.org" , "jiayu.hu@intel.com" , "dev@dpdk.org" Subject: [GRO] check whether ip_id continuity needs to be checked when two TCP packets are merged. Thread-Topic: [GRO] check whether ip_id continuity needs to be checked when two TCP packets are merged. Thread-Index: AdlvqIcRh1F/iP8VTjaqZ0Fg9f9SKQ== Date: Sat, 15 Apr 2023 14:45:39 +0000 Message-ID: <3bec4e84b0dc406887e9df08ddfd91ad@huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.136.117.195] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected 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 Hi jiayu.hu It cannot be guaranteed that 16bit identification field of ip packets in th= e same tcp stream will be continuous. Please help check whether ip_id continuity needs to be checked when two TCP= packets are merged? Seems to modify the following code, gro will aggregate better, and work bet= ter: diff --git a/lib/gro/gro_tcp4.h b/lib/gro/gro_tcp4.h index 212f97a042..06faead7b5 100644 --- a/lib/gro/gro_tcp4.h +++ b/lib/gro/gro_tcp4.h @@ -291,12 +291,10 @@ check_seq_option(struct gro_tcp4_item *item, /* check if the two packets are neighbors */ len =3D pkt_orig->pkt_len - l2_offset - pkt_orig->l2_len - pkt_orig->l3_len - tcp_hl_orig; - if ((sent_seq =3D=3D item->sent_seq + len) && (is_atomic || - (ip_id =3D=3D item->ip_id + 1))) + if (sent_seq =3D=3D item->sent_seq + len) /* append the new packet */ return 1; - else if ((sent_seq + tcp_dl =3D=3D item->sent_seq) && (is_atomic || - (ip_id + item->nb_merged =3D=3D item->ip_id= ))) + else if (sent_seq + tcp_dl =3D=3D item->sent_seq) /* pre-pend the new packet */ return -1;