From mboxrd@z Thu Jan 1 00:00:00 1970 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 E16405A1F for ; Fri, 12 Aug 2016 23:01:51 +0200 (CEST) Received: by mail-wm0-f44.google.com with SMTP id q128so48230051wma.1 for ; Fri, 12 Aug 2016 14:01:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4jU2iZZq3UHqJmbveXAkBJjzYiJgHexlX7feRDBp6Jk=; b=E8Bipc8l2YehHUb28T/j8J7XG5EKHOO7+tBfvLFdy81z9tdq00JkeygT4Kk7+C0/ux YP8QLFx+vORnqgrbSUIf9b+KKTPegnOGW/aYZCY57zRa9rgMXoC1K7pG8+iats3j4fNI pMalA5WwNPbvjyWd+dKR1Fgfd/GM+bxpP+OcUQ4ib1BM6YqpkNbRYC59mtzLjnI9SEia l+nzO66onoV+kqU88D1ANZRTE2zADRNGJQ4vEw1yrYTT7FjrMQJcdNkTJLh60dsBHidV Omzmg5kjGvKNaKaHZGZPAMhZe0XRmaTEGNLKysdcJTvm1xz4DFhGg2Ncds5150xFM62X UWBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4jU2iZZq3UHqJmbveXAkBJjzYiJgHexlX7feRDBp6Jk=; b=N0bvVEUb+qVYgBvQvTHWhP5GjunxC3IwtlCiuM6/SriNbzhoN/Z/PYEW+dssfgukZj 6SXYjUK9MRN1gOMDTudis2Yn5coK5KWT1jq895l1+/zf4N0Xtq0mBGAMAb79yadZ0jNr 2LKdIUvMYhOSQqgH9XMK/Lxfbu5ArF4l51LnVidpuY18DtNzD5RuL5mUrkaV/Ip2p95s Clj3Q/9dbeZncBo2v6Jgw7M7iYYQjRh3TQTtQrjsEwERWofo7C8DX/OZCCTWHiCRyfAt Q5IiNmsyl+7b2xxkE13RPPCyywGHVHd4o9OQGLSl36Tpnif1rF3lVCvLPaFGSWYoJmhn 2g+Q== X-Gm-Message-State: AEkoouuWpWYgd02SEDDRp52bJDJUwilnW4WAULv5ACUfiKy5wk6bOCiFqWJNYeO//NaXmwaJFL7VgK1zThurJg== X-Received: by 10.194.73.136 with SMTP id l8mr16999272wjv.153.1471035711667; Fri, 12 Aug 2016 14:01:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.72.11 with HTTP; Fri, 12 Aug 2016 14:01:50 -0700 (PDT) In-Reply-To: <20160812124209.387a4c2f@xeon-e3> References: <20160812124209.387a4c2f@xeon-e3> From: =?UTF-8?B?0JDQu9C10LrRgdCw0L3QtNGAINCa0LjRgdC10LvQtdCy?= Date: Sat, 13 Aug 2016 00:01:50 +0300 Message-ID: To: Stephen Hemminger Cc: Matt Laswell , users Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] ipv4 fragmentation X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2016 21:01:52 -0000 2016-08-12 22:42 GMT+03:00 Stephen Hemminger : > > >> Fragment function gets a packet, successfuly splits it to the two > packets, > > >> then I add an L2 header to the each of resulting fragments > > >> and send the fragments using rte_eth_tx_burst() to the wire. All > steps of > > >> the above process are succesfully completed without any error, but I > don't > > >> see the fragments on the wire and PMD stat function also reports that > no > > >> packets were transmitted. > > Did you account for the fact that some of these might be indirect mbuf's > where refcount > 1? If refcount is not 1 then mbuf is shared, and you can > not safely write your L2 header directly. > No, I was following the ip_reassembly example. Since rte_ipv4_fragment_packet() function requires as input parameter an mbuf without L2 header, it produces fragments without L2 too, so L2 header should be added. That is exactly what the example application does. And I've just checked the mbufs that are created by the rte_ipv4_fragment_packet(). The are direct mbuf. They have non zero buf_len size. Also I checked the sources of rte_ipv4_fragment_packet() function. For each fragment it creates direct mbuf, then reserves space for the IP header in it and then adds one or more indirect mbuf to it. Therefore it should be safe to prepend L2 header to each resulting fragment, shouldn't be? -- -- Kiselev Alexander