Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/133331/?format=api
http://patches.dpdk.org/api/patches/133331/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1698280314-25861-11-git-send-email-roretzla@linux.microsoft.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1698280314-25861-11-git-send-email-roretzla@linux.microsoft.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1698280314-25861-11-git-send-email-roretzla@linux.microsoft.com", "date": "2023-10-26T00:31:45", "name": "[v3,10/19] pdump: use rte optional stdatomic API", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "fa66f012f2f6f81ee28e2cd3a4e7b85a4edc682b", "submitter": { "id": 2077, "url": "http://patches.dpdk.org/api/people/2077/?format=api", "name": "Tyler Retzlaff", "email": "roretzla@linux.microsoft.com" }, "delegate": { "id": 24651, "url": "http://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1698280314-25861-11-git-send-email-roretzla@linux.microsoft.com/mbox/", "series": [ { "id": 29989, "url": "http://patches.dpdk.org/api/series/29989/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29989", "date": "2023-10-26T00:31:35", "name": "use rte optional stdatomic API", "version": 3, "mbox": "http://patches.dpdk.org/series/29989/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/133331/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/133331/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 64FD543200;\n\tThu, 26 Oct 2023 02:33:17 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B807642DF7;\n\tThu, 26 Oct 2023 02:32:15 +0200 (CEST)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id 77E3C402E9\n for <dev@dpdk.org>; Thu, 26 Oct 2023 02:32:01 +0200 (CEST)", "by linux.microsoft.com (Postfix, from userid 1086)\n id D792B20B74CA; Wed, 25 Oct 2023 17:31:59 -0700 (PDT)" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com D792B20B74CA", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1698280319;\n bh=B8S12jXNlNv9DUxq4FZKJX37lWdv8Q4e6Zcg7165yRE=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=M9A5JevFXivygxJ4OfqKZhj10khRsYVgTnyi/Ph9g7W1myvOSQqD+qKJpHPVzv8PH\n ZyB7wImk7te13TMotLwO0PbOVkQcld7PPu0aXJ7mtFw3y+kh5hLM05syTYuGEVAsqT\n B+5S4zMVpHj3wWNW52zHsCfWCgch8g33IrLTBBTU=", "From": "Tyler Retzlaff <roretzla@linux.microsoft.com>", "To": "dev@dpdk.org", "Cc": "Akhil Goyal <gakhil@marvell.com>,\n Anatoly Burakov <anatoly.burakov@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Bruce Richardson <bruce.richardson@intel.com>,\n Chenbo Xia <chenbo.xia@intel.com>, Ciara Power <ciara.power@intel.com>,\n David Christensen <drc@linux.vnet.ibm.com>,\n David Hunt <david.hunt@intel.com>,\n Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,\n Dmitry Malloy <dmitrym@microsoft.com>,\n Elena Agostini <eagostini@nvidia.com>,\n Erik Gabriel Carrillo <erik.g.carrillo@intel.com>,\n Fan Zhang <fanzhang.oss@gmail.com>, Ferruh Yigit <ferruh.yigit@amd.com>,\n Harman Kalra <hkalra@marvell.com>,\n Harry van Haaren <harry.van.haaren@intel.com>,\n Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,\n Jerin Jacob <jerinj@marvell.com>,\n Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,\n Matan Azrad <matan@nvidia.com>,\n Maxime Coquelin <maxime.coquelin@redhat.com>,\n Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,\n Nicolas Chautru <nicolas.chautru@intel.com>,\n Olivier Matz <olivier.matz@6wind.com>, Ori Kam <orika@nvidia.com>,\n Pallavi Kadam <pallavi.kadam@intel.com>,\n Pavan Nikhilesh <pbhagavatula@marvell.com>,\n Reshma Pattan <reshma.pattan@intel.com>,\n Sameh Gobriel <sameh.gobriel@intel.com>,\n Shijith Thotton <sthotton@marvell.com>,\n Sivaprasad Tummala <sivaprasad.tummala@amd.com>,\n Stephen Hemminger <stephen@networkplumber.org>,\n Suanming Mou <suanmingm@nvidia.com>, Sunil Kumar Kori <skori@marvell.com>,\n Thomas Monjalon <thomas@monjalon.net>,\n Viacheslav Ovsiienko <viacheslavo@nvidia.com>,\n Vladimir Medvedkin <vladimir.medvedkin@intel.com>,\n Yipeng Wang <yipeng1.wang@intel.com>,\n Tyler Retzlaff <roretzla@linux.microsoft.com>", "Subject": "[PATCH v3 10/19] pdump: use rte optional stdatomic API", "Date": "Wed, 25 Oct 2023 17:31:45 -0700", "Message-Id": "<1698280314-25861-11-git-send-email-roretzla@linux.microsoft.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1698280314-25861-1-git-send-email-roretzla@linux.microsoft.com>", "References": "<1697497745-20664-1-git-send-email-roretzla@linux.microsoft.com>\n <1698280314-25861-1-git-send-email-roretzla@linux.microsoft.com>", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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" }, "content": "Replace the use of gcc builtin __atomic_xxx intrinsics with\ncorresponding rte_atomic_xxx optional stdatomic API\n\nSigned-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>\n---\n lib/pdump/rte_pdump.c | 14 +++++++-------\n lib/pdump/rte_pdump.h | 8 ++++----\n 2 files changed, 11 insertions(+), 11 deletions(-)", "diff": "diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c\nindex 53cca10..80b90c6 100644\n--- a/lib/pdump/rte_pdump.c\n+++ b/lib/pdump/rte_pdump.c\n@@ -110,8 +110,8 @@ struct pdump_response {\n \t\t * then packet doesn't match the filter (will be ignored).\n \t\t */\n \t\tif (cbs->filter && rcs[i] == 0) {\n-\t\t\t__atomic_fetch_add(&stats->filtered,\n-\t\t\t\t\t 1, __ATOMIC_RELAXED);\n+\t\t\trte_atomic_fetch_add_explicit(&stats->filtered,\n+\t\t\t\t\t 1, rte_memory_order_relaxed);\n \t\t\tcontinue;\n \t\t}\n \n@@ -127,18 +127,18 @@ struct pdump_response {\n \t\t\tp = rte_pktmbuf_copy(pkts[i], mp, 0, cbs->snaplen);\n \n \t\tif (unlikely(p == NULL))\n-\t\t\t__atomic_fetch_add(&stats->nombuf, 1, __ATOMIC_RELAXED);\n+\t\t\trte_atomic_fetch_add_explicit(&stats->nombuf, 1, rte_memory_order_relaxed);\n \t\telse\n \t\t\tdup_bufs[d_pkts++] = p;\n \t}\n \n-\t__atomic_fetch_add(&stats->accepted, d_pkts, __ATOMIC_RELAXED);\n+\trte_atomic_fetch_add_explicit(&stats->accepted, d_pkts, rte_memory_order_relaxed);\n \n \tring_enq = rte_ring_enqueue_burst(ring, (void *)&dup_bufs[0], d_pkts, NULL);\n \tif (unlikely(ring_enq < d_pkts)) {\n \t\tunsigned int drops = d_pkts - ring_enq;\n \n-\t\t__atomic_fetch_add(&stats->ringfull, drops, __ATOMIC_RELAXED);\n+\t\trte_atomic_fetch_add_explicit(&stats->ringfull, drops, rte_memory_order_relaxed);\n \t\trte_pktmbuf_free_bulk(&dup_bufs[ring_enq], drops);\n \t}\n }\n@@ -720,10 +720,10 @@ struct pdump_response {\n \tuint16_t qid;\n \n \tfor (qid = 0; qid < nq; qid++) {\n-\t\tconst uint64_t *perq = (const uint64_t *)&stats[port][qid];\n+\t\tconst RTE_ATOMIC(uint64_t) *perq = (const uint64_t __rte_atomic *)&stats[port][qid];\n \n \t\tfor (i = 0; i < sizeof(*total) / sizeof(uint64_t); i++) {\n-\t\t\tval = __atomic_load_n(&perq[i], __ATOMIC_RELAXED);\n+\t\t\tval = rte_atomic_load_explicit(&perq[i], rte_memory_order_relaxed);\n \t\t\tsum[i] += val;\n \t\t}\n \t}\ndiff --git a/lib/pdump/rte_pdump.h b/lib/pdump/rte_pdump.h\nindex b1a3918..7feb2b6 100644\n--- a/lib/pdump/rte_pdump.h\n+++ b/lib/pdump/rte_pdump.h\n@@ -233,10 +233,10 @@ enum {\n * The statistics are sum of both receive and transmit queues.\n */\n struct rte_pdump_stats {\n-\tuint64_t accepted; /**< Number of packets accepted by filter. */\n-\tuint64_t filtered; /**< Number of packets rejected by filter. */\n-\tuint64_t nombuf; /**< Number of mbuf allocation failures. */\n-\tuint64_t ringfull; /**< Number of missed packets due to ring full. */\n+\tRTE_ATOMIC(uint64_t) accepted; /**< Number of packets accepted by filter. */\n+\tRTE_ATOMIC(uint64_t) filtered; /**< Number of packets rejected by filter. */\n+\tRTE_ATOMIC(uint64_t) nombuf; /**< Number of mbuf allocation failures. */\n+\tRTE_ATOMIC(uint64_t) ringfull; /**< Number of missed packets due to ring full. */\n \n \tuint64_t reserved[4]; /**< Reserved and pad to cache line */\n };\n", "prefixes": [ "v3", "10/19" ] }{ "id": 133331, "url": "