List patch comments

GET /api/patches/74632/comments/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Link: 
<https://patches.dpdk.org/api/patches/74632/comments/?format=api&page=1>; rel="first",
<https://patches.dpdk.org/api/patches/74632/comments/?format=api&page=1>; rel="last"
Vary: Accept
[ { "id": 116558, "web_url": "https://patches.dpdk.org/comment/116558/", "msgid": "<20200723084715.1f055aff@hermes.lan>", "list_archive_url": "https://inbox.dpdk.org/dev/20200723084715.1f055aff@hermes.lan", "date": "2020-07-23T15:47:15", "subject": "Re: [dpdk-dev] [PATCH] mbuf: replace c memcpy() code semantics with\n optimized rte_memcpy()", "submitter": { "id": 27, "url": "https://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "content": "On Thu, 23 Jul 2020 12:02:40 +0500\nSarosh Arif <sarosh.arif@emumba.com> wrote:\n\n> Since rte_memcpy is more optimized it should be used instead of memcpy\n> \n> Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>\n\nReally did you measure this.\nFor fixed size structures, compiler can inline memcpy small set of instructions.", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2340AA0521;\n\tThu, 23 Jul 2020 17:47:27 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9E9821BF7B;\n\tThu, 23 Jul 2020 17:47:25 +0200 (CEST)", "from mail-pj1-f66.google.com (mail-pj1-f66.google.com\n [209.85.216.66]) by dpdk.org (Postfix) with ESMTP id CE43D2C6E\n for <dev@dpdk.org>; Thu, 23 Jul 2020 17:47:24 +0200 (CEST)", "by mail-pj1-f66.google.com with SMTP id f16so3261030pjt.0\n for <dev@dpdk.org>; Thu, 23 Jul 2020 08:47:24 -0700 (PDT)", "from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n by smtp.gmail.com with ESMTPSA id b185sm2837437pfa.148.2020.07.23.08.47.23\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 23 Jul 2020 08:47:23 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n h=date:from:to:cc:subject:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=mTZoq0K+mFgOTequVRory9VR6CjiJnE9rqPKdUjuQcg=;\n b=P0Wgz1l3zBttp+0BMQgeITMXWgH7mxqMn8eHnk0YZ30IGqjlZ+DhbDjo7XhMMTbNYc\n u2enYAi9mhOL9vHRULHhYutERBx0ImdJb5eXc9ru/soTQcbKnYkTb0gAfk2/8GGxETyj\n jLTeHDLJBeazZ+fCkXJz4DZxsIwGld8b8GvIAEH4cB+yiOQmJ4tFeIBFlgDlefGHeyJR\n +dsfhdr5KmGxugoGefk8oTynelKRGccrw895bhQwjnmqtuwsOQs5JmGdJdTv+u4N1E5n\n ZAZsUCsqzw20ytINXuJvkYhQNOvvrsSOX3th71bIz4xoNAk7CE0h18ZhMlo23HdJ0fb+\n Tjmw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=mTZoq0K+mFgOTequVRory9VR6CjiJnE9rqPKdUjuQcg=;\n b=pC07Uypob+hWm0RJ7V6rNAs90V2+2fgYFaTbCvxFaMJLovo197h9nOj/KyClghH8Dg\n wqiOlQ4wKUpvwwSxfohdwxMc2f1X9RpBc0Z7jgYGVR7Rbnfz/bd9GLObzTqINMSl2024\n eEmMS4sy+XJ8VDjpMnJHrYNfdNzHeZXGpqqxR08kGvytzMvMF6DGzNHPFddupMhUPjwt\n JlltTTz7j5ggkisW8Ut2WzGk9fvEAxi2ZofkFH3dtZMELOEgYq+irL4mhAJdS7xzgiPk\n yOPgX/AXBCE7AWy8HOV4rSTjBxhz3dQrMyd4hfZ921SxkJvsWSdjRXsQI71XeVwuck4N\n scAg==", "X-Gm-Message-State": "AOAM533454R9BxvXkTYYtcVJ7WQWMKy4IcCY7FL0Y4rAAKt6DxnzlvQv\n dgYd/MD4fHvZN0BjOJAEgTO+Ow==", "X-Google-Smtp-Source": "\n ABdhPJw55uqVFhWRqY2pDZqEOAzy2tgrvGBEEEh5ZDUrwgGv1KdsKK+MC4XzQYHXJOe5aUUjDemWGA==", "X-Received": "by 2002:a17:902:fe04:: with SMTP id\n g4mr4330646plj.66.1595519243664;\n Thu, 23 Jul 2020 08:47:23 -0700 (PDT)", "Date": "Thu, 23 Jul 2020 08:47:15 -0700", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "Sarosh Arif <sarosh.arif@emumba.com>", "Cc": "olivier.matz@6wind.com, dev@dpdk.org", "Message-ID": "<20200723084715.1f055aff@hermes.lan>", "In-Reply-To": "<20200723070240.14749-1-sarosh.arif@emumba.com>", "References": "<20200723070240.14749-1-sarosh.arif@emumba.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=US-ASCII", "Content-Transfer-Encoding": "7bit", "Subject": "Re: [dpdk-dev] [PATCH] mbuf: replace c memcpy() code semantics with\n optimized rte_memcpy()", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 116772, "web_url": "https://patches.dpdk.org/comment/116772/", "msgid": "<CABoZmYNfz0oTwMw3CE3whsERUMhU9i4krsSo3O7C76u_TRDbDw@mail.gmail.com>", "list_archive_url": "https://inbox.dpdk.org/dev/CABoZmYNfz0oTwMw3CE3whsERUMhU9i4krsSo3O7C76u_TRDbDw@mail.gmail.com", "date": "2020-07-28T13:30:46", "subject": "Re: [dpdk-dev] [PATCH] mbuf: replace c memcpy() code semantics with\n optimized rte_memcpy()", "submitter": { "id": 1638, "url": "https://patches.dpdk.org/api/people/1638/?format=api", "name": "Sarosh Arif", "email": "sarosh.arif@emumba.com" }, "content": "Hello,\nThe following things made me think that rte_memcpy() is more optimized\nthan memcpy():\n1. dpdk documentation recommends to use rte_memcpy() instead of memcpy():\n https://doc.dpdk.org/guides/prog_guide/writing_efficient_code.html\n2. Here some benchmarks are available:\n https://software.intel.com/content/www/us/en/develop/articles/performance-optimization-of-memcpy-in-dpdk.html\n3. rte_memcpy() has __attribute__((always_inline)) associated with it,\nso compiler also tries to inline it.\n\nUsing rte_memcpy() everywhere ensures consistency in code-base.\nHere are the results of the performance number measurement using \"perf\":\n\nrte_memcpy()\n\n Performance counter stats\n 1.573864 task-clock (msec) # 0.898 CPUs\nutilized\n 0 context-switches # 0.000 K/sec\n 0 cpu-migrations # 0.000 K/sec\n 342 page-faults # 0.217 M/sec\n 5,483,016 cycles # 3.484 GHz\n 5,554,017 instructions # 1.01 insn per\ncycle\n 1,114,593 branches # 708.189 M/sec\n 33,796 branch-misses # 3.03% of all\nbranches\n 1,369,247 L1-dcache-loads # 869.991 M/sec\n <not counted> L1-dcache-load-misses\n (0.00%)\n <not counted> LLC-loads\n (0.00%)\n <not counted> LLC-load-misses\n (0.00%)\n\n 0.001753373 seconds time elapsed\n\n\n\nmemcpy()\n\n Performance counter stats\n 1.631135 task-clock (msec) # 0.902 CPUs\nutilized\n 0 context-switches # 0.000 K/sec\n 0 cpu-migrations # 0.000 K/sec\n 342 page-faults # 0.210 M/sec\n 5,676,549 cycles # 3.480 GHz\n (73.99%)\n 5,739,593 instructions # 1.01 insn per\ncycle\n 1,141,121 branches # 699.587 M/sec\n 34,553 branch-misses # 3.03% of all\nbranches\n 1,417,494 L1-dcache-loads # 869.023 M/sec\n 67,312 L1-dcache-load-misses # 4.75% of all\nL1-dcache hits (26.01%)\n <not counted> LLC-loads\n (0.00%)\n <not counted> LLC-load-misses\n (0.00%)\n\n 0.001808500 seconds time elapsed\n\n\n\nOn Thu, Jul 23, 2020 at 8:47 PM Stephen Hemminger\n<stephen@networkplumber.org> wrote:\n>\n> On Thu, 23 Jul 2020 12:02:40 +0500\n> Sarosh Arif <sarosh.arif@emumba.com> wrote:\n>\n> > Since rte_memcpy is more optimized it should be used instead of memcpy\n> >\n> > Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>\n>\n> Really did you measure this.\n> For fixed size structures, compiler can inline memcpy small set of instructions.", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 3AD8AA052B;\n\tTue, 28 Jul 2020 15:31:26 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F39C41BFF5;\n\tTue, 28 Jul 2020 15:31:24 +0200 (CEST)", "from mail-io1-f67.google.com (mail-io1-f67.google.com\n [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id 0170B1BFF4\n for <dev@dpdk.org>; Tue, 28 Jul 2020 15:31:23 +0200 (CEST)", "by mail-io1-f67.google.com with SMTP id v6so5477555iow.11\n for <dev@dpdk.org>; Tue, 28 Jul 2020 06:31:23 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=emumba-com.20150623.gappssmtp.com; s=20150623;\n h=mime-version:references:in-reply-to:from:date:message-id:subject:to\n :cc; bh=r5SQ8jiVNK3ZQCd2B2HgBBN3c7dYEwyRohjVxVIL4aw=;\n b=ZEbaoFNyVvX9oB89LxsjGy9NQjarG27eJnvXE1tJ4hp5dQAS3lB3+GGrI0bKxjCdER\n 4hsGJABbCdnr3LQYBMBgJljwqeFEISGEn4z4d0hE8zH1JlRNKL0moWM8hCRE7Tp3y+do\n KCRFe84gWdfnrUyb920YGTrXM+0IiY+24EfJN8bHjQPrlKgqgnchKRhel9EE5x7kQdrO\n 6kYIYB/dsNFTeDItYRS0/gKiGdHbK9zjyAeBWHJt+Gbz+Oahy4X2jcw7GU/Sij1K3sGs\n K2Rre/q1dKoIM6sGtdOvx5SKYxq6/rLM7JRg4e7fAZlbadPjpP9i2K06PcYeiz/V/Gge\n 229w==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:mime-version:references:in-reply-to:from:date\n :message-id:subject:to:cc;\n bh=r5SQ8jiVNK3ZQCd2B2HgBBN3c7dYEwyRohjVxVIL4aw=;\n b=pvFt97DNLZwHDOEzJcZKfbiWKGzla5r4ijayQKrSKgfzcVrPmiYU03J8EhErcsndul\n N6ILs8KH0+k82nblsxOO8G4gAU1NJIC/HImgjIBQe22qnz9yr8fRW4TDZoPuQZgauwgK\n tPRa/e3Dg2qbBP8y8eTwFvYnF6tV0tr+DGSlN53umgU8VNmZ2gZ2s59d+17+EZ68QGHk\n IvphluhvFMfuSEpf41FSgP40IeOqGla1b1kiXBwtQyGXvGkEn+euIv2zGuF1QKfDXUs3\n /K4Al3QsIYEYs8Q+Xtk5wy0T+/wM5bk+XDeocC2Azb6LiUJkiuQmoh1nD9JR4YIjcvtQ\n 0cZg==", "X-Gm-Message-State": "AOAM531UAJKlgZ2wDjbH3Hp5/nrQ4+t64TAiHnRBTH5i5zGEeFGYHhf0\n bfwCgVKP73mBrDNdKt6i75gOXRQodtf4AhXQ8RPSwiCayIM=", "X-Google-Smtp-Source": "\n ABdhPJyaMoLdp5SW5YqcZmF5mMnHtyOgq0/QDlhHbgd0c6UfnNxUIg9L/BGGydTxAtzzJ6gcNF3SXVqRCuUT2rKLf7E=", "X-Received": "by 2002:a5e:9507:: with SMTP id r7mr14556004ioj.151.1595943083159;\n Tue, 28 Jul 2020 06:31:23 -0700 (PDT)", "MIME-Version": "1.0", "References": "<20200723070240.14749-1-sarosh.arif@emumba.com>\n <20200723084715.1f055aff@hermes.lan>", "In-Reply-To": "<20200723084715.1f055aff@hermes.lan>", "From": "Sarosh Arif <sarosh.arif@emumba.com>", "Date": "Tue, 28 Jul 2020 18:30:46 +0500", "Message-ID": "\n <CABoZmYNfz0oTwMw3CE3whsERUMhU9i4krsSo3O7C76u_TRDbDw@mail.gmail.com>", "To": "Stephen Hemminger <stephen@networkplumber.org>", "Cc": "Olivier Matz <olivier.matz@6wind.com>, dev@dpdk.org", "Content-Type": "text/plain; charset=\"UTF-8\"", "Subject": "Re: [dpdk-dev] [PATCH] mbuf: replace c memcpy() code semantics with\n optimized rte_memcpy()", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 116778, "web_url": "https://patches.dpdk.org/comment/116778/", "msgid": "<20200728135031.GX5869@platinum>", "list_archive_url": "https://inbox.dpdk.org/dev/20200728135031.GX5869@platinum", "date": "2020-07-28T13:50:31", "subject": "Re: [dpdk-dev] [PATCH] mbuf: replace c memcpy() code semantics with\n optimized rte_memcpy()", "submitter": { "id": 8, "url": "https://patches.dpdk.org/api/people/8/?format=api", "name": "Olivier Matz", "email": "olivier.matz@6wind.com" }, "content": "Hi Sarosh,\n\nOn Tue, Jul 28, 2020 at 06:30:46PM +0500, Sarosh Arif wrote:\n> Hello,\n> The following things made me think that rte_memcpy() is more optimized\n> than memcpy():\n> 1. dpdk documentation recommends to use rte_memcpy() instead of memcpy():\n> https://doc.dpdk.org/guides/prog_guide/writing_efficient_code.html\n> 2. Here some benchmarks are available:\n> https://software.intel.com/content/www/us/en/develop/articles/performance-optimization-of-memcpy-in-dpdk.html\n> 3. rte_memcpy() has __attribute__((always_inline)) associated with it,\n> so compiler also tries to inline it.\n> \n> Using rte_memcpy() everywhere ensures consistency in code-base.\n> Here are the results of the performance number measurement using \"perf\":\n> \n> rte_memcpy()\n> \n> Performance counter stats\n> 1.573864 task-clock (msec) # 0.898 CPUs\n> utilized\n> 0 context-switches # 0.000 K/sec\n> 0 cpu-migrations # 0.000 K/sec\n> 342 page-faults # 0.217 M/sec\n> 5,483,016 cycles # 3.484 GHz\n> 5,554,017 instructions # 1.01 insn per\n> cycle\n> 1,114,593 branches # 708.189 M/sec\n> 33,796 branch-misses # 3.03% of all\n> branches\n> 1,369,247 L1-dcache-loads # 869.991 M/sec\n> <not counted> L1-dcache-load-misses\n> (0.00%)\n> <not counted> LLC-loads\n> (0.00%)\n> <not counted> LLC-load-misses\n> (0.00%)\n> \n> 0.001753373 seconds time elapsed\n> \n> \n> \n> memcpy()\n> \n> Performance counter stats\n> 1.631135 task-clock (msec) # 0.902 CPUs\n> utilized\n> 0 context-switches # 0.000 K/sec\n> 0 cpu-migrations # 0.000 K/sec\n> 342 page-faults # 0.210 M/sec\n> 5,676,549 cycles # 3.480 GHz\n> (73.99%)\n> 5,739,593 instructions # 1.01 insn per\n> cycle\n> 1,141,121 branches # 699.587 M/sec\n> 34,553 branch-misses # 3.03% of all\n> branches\n> 1,417,494 L1-dcache-loads # 869.023 M/sec\n> 67,312 L1-dcache-load-misses # 4.75% of all\n> L1-dcache hits (26.01%)\n> <not counted> LLC-loads\n> (0.00%)\n> <not counted> LLC-load-misses\n> (0.00%)\n> \n> 0.001808500 seconds time elapsed\n> \n\nCan you give more details about your use-case? I mean what code\nare you running for this benchmark.\n\nI'll tend to agree with Stephen: memcpy() with a constant (small) size\nshould directly be replaced by the optimal code for this architecture.\n\nrte_memcpy() uses vector instructions, and is probably better than\nlibc's memcpy for larger copies.\n\nThanks,\nOlivier\n\n\n> \n> \n> On Thu, Jul 23, 2020 at 8:47 PM Stephen Hemminger\n> <stephen@networkplumber.org> wrote:\n> >\n> > On Thu, 23 Jul 2020 12:02:40 +0500\n> > Sarosh Arif <sarosh.arif@emumba.com> wrote:\n> >\n> > > Since rte_memcpy is more optimized it should be used instead of memcpy\n> > >\n> > > Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>\n> >\n> > Really did you measure this.\n> > For fixed size structures, compiler can inline memcpy small set of instructions.", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id DF35AA052B;\n\tTue, 28 Jul 2020 15:50:36 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 7DE9F1BFF3;\n\tTue, 28 Jul 2020 15:50:35 +0200 (CEST)", "from mail-wm1-f68.google.com (mail-wm1-f68.google.com\n [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id 4F8251BFF2\n for <dev@dpdk.org>; Tue, 28 Jul 2020 15:50:33 +0200 (CEST)", "by mail-wm1-f68.google.com with SMTP id k20so10617100wmi.5\n for <dev@dpdk.org>; Tue, 28 Jul 2020 06:50:33 -0700 (PDT)", "from 6wind.com\n (2a01cb0c0005a600345636f7e65ed1a0.ipv6.abo.wanadoo.fr.\n [2a01:cb0c:5:a600:3456:36f7:e65e:d1a0])\n by smtp.gmail.com with ESMTPSA id t189sm4527971wmf.47.2020.07.28.06.50.32\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 28 Jul 2020 06:50:32 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google;\n h=date:from:to:cc:subject:message-id:references:mime-version\n :content-disposition:in-reply-to:user-agent;\n bh=xnGIhLFvylbhpi+tWFDSqMPS68AL7rgSxBaiO4FgAzo=;\n b=GvYLjAWnAom1dzfLXBjjlbV2pLZm8wInlpHYwzuGMfsvCvPnM9M0nWyMr0b6SIuCyW\n DhiL0UqIbJEaPTFNj+d+u7rE0sf/WcATV5WYomfl72e4AEK7fehYgtuhVcXMviA/SKTL\n E8Jy+ZNVKqYwjw8hA3m1RXBjerIiFW1HaU0kepHzh7i9pvnxC99Auai7ugBE8PagHTLj\n R+60D1vWck0ZRF6Q1MyHsVZI95sNslyKGlz3PqbcclTqb2mt6PfJDArDKSQMNT2wy1Pt\n VOsWLkNV8pt3rCW1xc0kIR8X2HH38MzD/znnQ/K9E3D9Wq7MsQpXsF6BgNuULEdCNrCz\n oRBA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:date:from:to:cc:subject:message-id:references\n :mime-version:content-disposition:in-reply-to:user-agent;\n bh=xnGIhLFvylbhpi+tWFDSqMPS68AL7rgSxBaiO4FgAzo=;\n b=ngcLi5SQeDwSAlP0P77nS8uIBTPt9EVap5eswRUZOqMpG9YMIKifRQwElTOgjLX/Ng\n ga1APEcj3rHfzHlltBfqbus1NaRuZwTDXDaQHlbwRecyo7F0rRAT1buuphCAhG6M1AFN\n eAr5/QeDEdT8IUl2SrNW2jBNRXofnedqPMWKyBInpl9pdmnvBsVRjIlI6/cZqEVtnFFL\n ROF6pNImGFB9MBmch1l2uocerIMJ5jjZ2UT3o3ltEH+fnMuurA/DEcBk5jXsSoshZ4Tl\n MXGQxgMzJ2VUDAqWAY7KM6cDYo/KalOWE6eaBHqvO20YTDRDH77zoDz3MHWb/lgsLAD7\n 5vEQ==", "X-Gm-Message-State": "AOAM533hHY6fVP1lznDFKaFxbMVi+q68qa20UqerLIBDMX1HHtqKlo3C\n xbUyIHJbN6UK4bRlwz2nIxtosQ==", "X-Google-Smtp-Source": "\n ABdhPJz/8VcrzjY9J8kmg974ZVAUwzwShChYV0bttPtmVDj9fi5ArDjdm6yO4/GU18GK78RXPD/BiQ==", "X-Received": "by 2002:a1c:3c82:: with SMTP id\n j124mr3996777wma.145.1595944232904;\n Tue, 28 Jul 2020 06:50:32 -0700 (PDT)", "Date": "Tue, 28 Jul 2020 15:50:31 +0200", "From": "Olivier Matz <olivier.matz@6wind.com>", "To": "Sarosh Arif <sarosh.arif@emumba.com>", "Cc": "Stephen Hemminger <stephen@networkplumber.org>, dev@dpdk.org", "Message-ID": "<20200728135031.GX5869@platinum>", "References": "<20200723070240.14749-1-sarosh.arif@emumba.com>\n <20200723084715.1f055aff@hermes.lan>\n <CABoZmYNfz0oTwMw3CE3whsERUMhU9i4krsSo3O7C76u_TRDbDw@mail.gmail.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=us-ascii", "Content-Disposition": "inline", "In-Reply-To": "\n <CABoZmYNfz0oTwMw3CE3whsERUMhU9i4krsSo3O7C76u_TRDbDw@mail.gmail.com>", "User-Agent": "Mutt/1.10.1 (2018-07-13)", "Subject": "Re: [dpdk-dev] [PATCH] mbuf: replace c memcpy() code semantics with\n optimized rte_memcpy()", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 116807, "web_url": "https://patches.dpdk.org/comment/116807/", "msgid": "<20200728104624.3541fba8@hermes.lan>", "list_archive_url": "https://inbox.dpdk.org/dev/20200728104624.3541fba8@hermes.lan", "date": "2020-07-28T17:46:24", "subject": "Re: [dpdk-dev] [PATCH] mbuf: replace c memcpy() code semantics with\n optimized rte_memcpy()", "submitter": { "id": 27, "url": "https://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "content": "On Thu, 23 Jul 2020 12:02:40 +0500\nSarosh Arif <sarosh.arif@emumba.com> wrote:\n\n> Since rte_memcpy is more optimized it should be used instead of memcpy\n> \n> Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>\n\nThe part in pkmbuf_pool_init is not performance critical.\n\nThe layout of rte_mbuf_dynfield is sub optimal.\n\nstruct rte_mbuf_dynfield {\n\tchar name[64]; /* 0 64 */\n\t/* --- cacheline 1 boundary (64 bytes) --- */\n\tsize_t size; /* 64 8 */\n\tsize_t align; /* 72 8 */\n\tunsigned int flags; /* 80 4 */\n\n\t/* size: 88, cachelines: 2, members: 4 */\n\t/* padding: 4 */\n\t/* last cacheline: 24 bytes */\n};\n\n1. It should have been sized so that overall it was 64 bytes.\n\n2. Use 8 bytes for size and align is wasteful.\n\n3. Hold 4 bytes for future flags is also wasteful. YAGNI\n\nIf you look at assembly output on x86 the copy of params becomes a sequence\nof vmovups instructions with Gcc.\n\nFor 20.11 maybe:\n\ndiff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h\nindex 8407230ecfdc..eb1d01f97f40 100644\n--- a/lib/librte_mbuf/rte_mbuf_dyn.h\n+++ b/lib/librte_mbuf/rte_mbuf_dyn.h\n@@ -70,16 +70,16 @@\n /**\n * Maximum length of the dynamic field or flag string.\n */\n-#define RTE_MBUF_DYN_NAMESIZE 64\n+#define RTE_MBUF_DYN_NAMESIZE 60\n \n /**\n * Structure describing the parameters of a mbuf dynamic field.\n */\n struct rte_mbuf_dynfield {\n char name[RTE_MBUF_DYN_NAMESIZE]; /**< Name of the field. */\n- size_t size; /**< The number of bytes to reserve. */\n- size_t align; /**< The alignment constraint (power of 2). */\n- unsigned int flags; /**< Reserved for future use, must be 0. */\n+ uint8_t size; /**< The number of bytes to reserve. */\n+ uint8_t align; /**< The alignment constraint (power of 2). */\n+ uint16_t flags; /**< Reserved for future use, must be 0. */\n };\n \n /**\n\nOr make the dynamic field dynamic size to avoid wasting space?", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 9205EA052B;\n\tTue, 28 Jul 2020 19:46:43 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 23C11A69;\n\tTue, 28 Jul 2020 19:46:42 +0200 (CEST)", "from mail-pj1-f65.google.com (mail-pj1-f65.google.com\n [209.85.216.65]) by dpdk.org (Postfix) with ESMTP id 7C2F72AB\n for <dev@dpdk.org>; Tue, 28 Jul 2020 19:46:40 +0200 (CEST)", "by mail-pj1-f65.google.com with SMTP id f9so229703pju.4\n for <dev@dpdk.org>; Tue, 28 Jul 2020 10:46:40 -0700 (PDT)", "from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n by smtp.gmail.com with ESMTPSA id u14sm18759808pgf.51.2020.07.28.10.46.38\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 28 Jul 2020 10:46:39 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n h=date:from:to:cc:subject:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=rSZlq3L2dHYSyOesoYCBNVUnYGnAukSkTRrTD1Kc1AU=;\n b=XsLdeDNpAjagHS+zoVs1582Mv9TlF1Ebb22wtMLqXnYBp8H0vgRgd2LGcDlBS9Y7qr\n 7K+EF2rQYdJJnJnN9pnrE21LJ+y+3wgn/5EXFBV/5m0zay5SLIr75jRCr4VyryMDF6XI\n 4CEa5NZz2ABgPpSD4sU4CGlj16BpypMVhHWa90Mu3ilinIOoVCLMkFLqoiTZPY47ae2P\n u4gw/Ma3NgFxVJTZxiuaXbfncg7sFCMYyrPACqAzQXasXP3gEIB4bD6vj0gKO2L/Vrnj\n JB7CruvffLdHt6tnhj8W728iTziOzT0jQb2tWXSdqMfJW80khmaMs5OuZsbxTMOj72YI\n 1heA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=rSZlq3L2dHYSyOesoYCBNVUnYGnAukSkTRrTD1Kc1AU=;\n b=WVC0Q2kxCuv/69ZXebrBa/OXxoEJTPb4QzV3p+y0oAqygRLsOckOVdMxKMZ6h9FO4S\n gTp1bEOFDAlRfn7o/oOTtXm1zqhRPK+chZKUMOx1wvj218dAUk2tFERvIOl1Rn9HMQHv\n KD7s0n66T+CJo+U+2Fg1MeJ9rCIltvDcw0QhugRx4DHWvhesi7lIbhAe3HvNdt+ClT+y\n ntbjWQ+6hofESN3noqrBKn6ziJuxOhFyHEswe18AkRhkb9ZgHylGy8Wi7hlJW3DY8gX/\n VBD1HUoI/SxMMv8fygKisVuk709EQhD/9DuY9vQ72gWFDznnFjnBr6qvB4NkHvkcbusM\n oI5A==", "X-Gm-Message-State": "AOAM532c+jvEQZ2g/q8QreC6YOhTAzx7VXc6YTbj9TmmA5r23OCk4EY5\n JgbqEQTtey8v45G4xwaMzOmYvA==", "X-Google-Smtp-Source": "\n ABdhPJwYNUknuc8yQrDLNTR2SRe5MR6qio5XOwYrsJ3jD7t4gFWMq9wjS1GyypH1RKxWgl4dxyi8Bg==", "X-Received": "by 2002:a17:90a:764c:: with SMTP id\n s12mr5543492pjl.201.1595958399290;\n Tue, 28 Jul 2020 10:46:39 -0700 (PDT)", "Date": "Tue, 28 Jul 2020 10:46:24 -0700", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "Sarosh Arif <sarosh.arif@emumba.com>", "Cc": "olivier.matz@6wind.com, dev@dpdk.org", "Message-ID": "<20200728104624.3541fba8@hermes.lan>", "In-Reply-To": "<20200723070240.14749-1-sarosh.arif@emumba.com>", "References": "<20200723070240.14749-1-sarosh.arif@emumba.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=US-ASCII", "Content-Transfer-Encoding": "7bit", "Subject": "Re: [dpdk-dev] [PATCH] mbuf: replace c memcpy() code semantics with\n optimized rte_memcpy()", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null } ]