From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Matveychikov Subject: A question about GRO neighbor packet matching Date: Wed, 6 Dec 2017 18:02:21 +0400 Message-ID: <4F9781B2-338C-4154-BDA1-BC24D1B2B689@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: jiayu.hu@intel.com To: dev@dpdk.org Return-path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 40D471D8E for ; Wed, 6 Dec 2017 15:02:25 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id n138so7384165wmg.2 for ; Wed, 06 Dec 2017 06:02:25 -0800 (PST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hello all, My question is about neighbor packet matching algorithm for TCP. Is it correct to expect that IP packets should have continuous ID enumeration (i.e. iph-next.id = iph-prev.id + 1)? ~~~ lib/librte_gro/gro_tcp4.c:check_seq_option() ... /* check if the two packets are neighbors */ tcp_dl0 = pkt0->pkt_len - pkt0->l2_len - pkt0->l3_len - tcp_hl0; if ((sent_seq == (item->sent_seq + tcp_dl0)) && (ip_id == (item->ip_id + 1))) /* append the new packet */ return 1; else if (((sent_seq + tcp_dl) == item->sent_seq) && ((ip_id + item->nb_merged) == item->ip_id)) /* pre-pend the new packet */ return -1; else return 0; ~~~ As per RFC791: Identification: 16 bits An identifying value assigned by the sender to aid in assembling the fragments of a datagram.