From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 196F5A09E9 for ; Mon, 14 Dec 2020 21:16:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6DD58C876; Mon, 14 Dec 2020 21:16:33 +0100 (CET) Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) by dpdk.org (Postfix) with ESMTP id 01FAF29AC for ; Mon, 14 Dec 2020 21:16:30 +0100 (CET) Received: by mail-oi1-f182.google.com with SMTP id q25so20614175oij.10 for ; Mon, 14 Dec 2020 12:16:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version:thread-index :content-language; bh=pt0Z1FcZjjsAaEjnd2zvOjkK5anfUo+rdP4oB64Orew=; b=UalB5RP2X5ahn10Qb+YC4I8qgIwfxgBRPvEz4Z1rQ/4QLjxwsBy0E4lOLGqTbECmII u5o9PzsEH2fRAZdXrTV2ClDkJqqL0Bjy5GSHRVv+0oBem5PgcJCnzR8qaqZK/ovIQ/kv T7zZsS4QQWLM0gimnzbqqopyEGLgYJ9odTfNuWvv2K4CdyE8Y39wXDYCCgJjyt7yz4sA 185Ig4Qq7qZBPrkPc7i6bvaJl/UomCoCERHDNVFOHfoIYuCLoNhazSxd7WFV5gnFwsUS XHaLZNm+u+eTbqDU/myE5KtbcuF/ySsCKLamRaTuGnqYvv4GVAEwFqSZEPg4Pj+h2IC+ jOcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :thread-index:content-language; bh=pt0Z1FcZjjsAaEjnd2zvOjkK5anfUo+rdP4oB64Orew=; b=QeAiBgFoT1KNTIhG6zkD1CgSA2Qra8wf4SVu9PIYY+P7hNngMVuV+sS8J7Q01dKhux cHcqnLynBk1klDRNPQxev4BRvSAYh7fmsbm4JtD1QN5O0tZsz9Nj7ebfgQ33J7Gdjx/5 9gVh0GX/KnNymnv9GC4ll2gVOspxAZ/wpQnbr9pKOZFz1/9O6acMKqoEWNzonlv8kmr9 BAyuoVhrd9wo+Xmh/CkeAfdaETt6o7QYo5gHZWGs05VbXD6I5aWA1c7sLZMsMF+jzAio qKsQcyWADAMUW2nsSQPME1zaMgxbS8hxRIFkOYtntvRIYCg0oKbwBGH5A9LCz7V3dPWw CIPA== X-Gm-Message-State: AOAM532FhwZ32g5F3SNU9PxCfD/Klsc1ZaCzWUmAdlhXhSQO2nlu6Kz9 dqEPAFeOdCe/ddp5gZxwNTnfo58kUhI= X-Google-Smtp-Source: ABdhPJzTj2FFUoRZEiRqgZD830AAd+bhW68F5LFcSMjsTSEHyJ8vUbL163018naAUJ+I8F3GseNkhg== X-Received: by 2002:aca:44d:: with SMTP id 74mr19616467oie.4.1607976988944; Mon, 14 Dec 2020 12:16:28 -0800 (PST) Received: from ROYLT (99-127-125-116.lightspeed.renonv.sbcglobal.net. [99.127.125.116]) by smtp.gmail.com with ESMTPSA id o63sm4190391ooa.10.2020.12.14.12.16.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Dec 2020 12:16:28 -0800 (PST) From: To: Date: Mon, 14 Dec 2020 12:16:27 -0800 Message-ID: <003201d6d256$0178c240$046a46c0$@gmail.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdbSVQZnlx1CALcAR6ixHdUItieIFQ== Content-Language: en-us Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] DPDK reassembled packet has zero data for length of second fragment's data X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" I have observed that fragmenting a IPv4 UDP packet using dpdk rte_ipv4_fragment_packet() generates 2 packets as expected. When reassembling using rte_ipv4_frag_reassemble_packet() the end of the reassembled packet is all zeros. The zeros are the length of the data part of the second fragment. The same result was obtained using dpdk-20.08.0 and dpdk-20.11.0 (LTS) versions. Running CentOS-8.2.2004-x86_64 on Intel C3758 with 16G ram, 4x 1G hugepages dpdk-20.08.0 had kernel 4.18.0-193.19.1.el8_2.x86_64 dpdk-20.11.0 has kernel 4.18.0-240.1.1.el8_3.x86_64 Subset below of reassembly code involved with some constants replaced and error checking removed to simplify. Packets are read in burst of 32 max and code is typical of examples running polled mode. The fragment table is only updated from the workingThread(), the table is global so rte_ip_frag_table_statistics_dump(stdout, fragReassambleTblWan) can be called outside workingThread() for testing. The Wireshark capture was using dpdk-20.11.0 and is between 2 identical C3758 boxes, one fragmenting and the other doing reassembly, summarized below. static struct rte_mempool *pktmbuf_pool = NULL; struct rte_ip_frag_tbl *fragReassambleTblWan; Main() socket_id = rte_socket_id(); pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool", 131072, 256, 0, (2048+128), socket_id); workingThread() uint64_t tms; uint64_t fragCycles; struct rte_ether_hdr *ethhdr; struct rte_ipv4_hdr *iphdr4; struct rte_mbuf *m; struct rte_mbuf *mx; struct rte_ip_frag_death_row deathRow; memset(&deathRow, 0, sizeof(deathRow)); fragCycles = (rte_get_tsc_hz() + MS_PER_S - 1) / MS_PER_S * (8 * MS_PER_S); lcore_id = rte_lcore_id(); socketFrag = rte_lcore_to_socket_id(lcore_id); fragReassambleTblWan = rte_ip_frag_table_create(4096, 4, 4096, fragCycles, socketFrag) workingThread() processing loop for each packet tms = rte_rdtsc(); ethhdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *); iphdr4 = (struct rte_ipv4_hdr *) RTE_PTR_ADD(ethhdr, sizeof(struct rte_ether_hdr)); if (rte_ipv4_frag_pkt_is_fragmented(iphdr4)) { m->l2_len = sizeof(*ethhdr); m->l3_len = sizeof(*iphdr4); mx = rte_ipv4_frag_reassemble_packet(fragReassambleTblWan, &deathRow, m, tms, iphdr4); } rte_ip_frag_free_death_row(&deathRow, 0); mx is NULL on first fragment packet as expected. Second fragment and mx is non-NULL and contains reassembled but end of packet with zeros. Thank you in advance for your help Roy