From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) by dpdk.org (Postfix) with ESMTP id 3E42F1BE0 for ; Wed, 7 Nov 2018 04:45:33 +0100 (CET) Received: by mail-io1-f46.google.com with SMTP id k17-v6so10943189ioc.4 for ; Tue, 06 Nov 2018 19:45:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=OW4Ojzi0tuXgNqb/i+sfhcx9U7D+/r4Q8ZvB0APvHxM=; b=kwmAZ9GYnhGPCo01FvRThOsHjwpazNH3CpzvL7L4EsOAvLIHI7lusrCyZPuLUvKd1I YBK17AURlNH5SmGQ3+dDZ4dzqyLvpDITddQVo52QDFmVBHEjwrhp+nc6WhRQghSb94K9 KUF6kXbLlVp3OQXsb6zEJV1U/pxUQBm3fJ9Umo5PLwugJ7c/VZudeyFc8H7clv3DxP4C F9R4BkLty+xAaI7V1zM+0eKK26rvMqcJwdox2ezfu5Wl8OqEAqUITZW0PRFN8oyMSX3R aNnCwRkFmLhGDGdsVQ+x+I754XBxEN7nz8JYqp5sZxgDRv9BEkn4/+SVq+if1vMmdjOE EbkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=OW4Ojzi0tuXgNqb/i+sfhcx9U7D+/r4Q8ZvB0APvHxM=; b=PqCMi5CMoyUePEMq8I/rYGIRZIxtjwNn3iXnk/FZakDiCnEkEvJDuW6DwRWblFALIT gW99EzEMUqIKq8AprtjzXNc4WItVAr3rZRqo9oQqVU7mPw8DaCs10jjxlTsdxgEpfeX2 TAFvvm7iYLKgr7gigsyEAFJFL4Mcz2dfOlIJ25Nac5rQcWu+2ytWLPKbmSk3kqL8WzLX g1dOd3S2n9c8euOPevKqJEel1QqBmboMhm2urJCKWeIwfzx2SvH4m6mD/ljluV0q3eKH 41jbfeHIn5H6o2gc2gLv5fsaeWgRh3I/XYKM1fvwbSZngos6IYryeHQL6jvowXADMlB7 vZ1A== X-Gm-Message-State: AGRZ1gKqiqb7358LzkC74SYXmTuRHBNcq1jKrVnTKYAdIpKas1+0a5Ly QI88vjJdm8MQc970aoKvzOsbdABx2HXb8h6n9mEdxmOk X-Google-Smtp-Source: AJdET5dTomdSShvQvRT04oZxkh2GfwAGWUxBgb1/7DwELYTQY+0/KmjHlx6yHVFlQ+w+iy3VACrYlwtB2mWJ/mJjaBQ= X-Received: by 2002:a6b:8e44:: with SMTP id q65-v6mr151800iod.197.1541562332000; Tue, 06 Nov 2018 19:45:32 -0800 (PST) MIME-Version: 1.0 From: Sungho Hong Date: Tue, 6 Nov 2018 20:45:20 -0700 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] Correct way to free the received packets after ip-assembly 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: , X-List-Received-Date: Wed, 07 Nov 2018 03:45:33 -0000 Hello DPDK experts, I was wondering, when to free the received packets after we have assembled the packets. For example, I just want to receive the assembled packets and not forward to any other ports. just want to free it right away. However when we try to free the packets after assemble, I face segmentation error. here is the basic example of *examples/ip_reassembly/main.c* Assuming that we do not forward the packets and just free the packets ourselves, would it be possible to know the correct location to free the packets? Because I think the packets that I have freed are referenced some where else, and causing the segmentation fault. Locations that I have tried to free the assembled packets ----------- for (i = 0; i < qconf->n_rx_queue; ++i) { portid = qconf->rx_queue_list[i].portid; nb_rx = rte_eth_rx_burst(portid, 0, pkts_burst, MAX_PKT_BURST); /* Prefetch first packets */ for (j = 0; j < PREFETCH_OFFSET && j < nb_rx; j++) { rte_prefetch0(rte_pktmbuf_mtod( pkts_burst[j], void *)); } /* Prefetch and forward already prefetched packets */ for (j = 0; j < (nb_rx - PREFETCH_OFFSET); j++) { rte_prefetch0(rte_pktmbuf_mtod(pkts_burst[ j + PREFETCH_OFFSET], void *)); reassemble(pkts_burst[j], portid, i, qconf, cur_tsc); * // attempted to free from here but failed * } /* Forward remaining prefetched packets */ for (; j < nb_rx; j++) { reassemble(pkts_burst[j], portid, i, qconf, cur_tsc); * // attempted to free from here ** but failed * } *// attempted to free from here ** but failed * rte_ip_frag_free_death_row(&qconf->death_row, PREFETCH_OFFSET); } *// attempted to free from here ** but failed * ----- Any insight on this issue would be greatly appreciated. Best Sungho Hong