Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/125609/?format=api
http://patches.dpdk.org/api/patches/125609/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230329234049.11071-18-stephen@networkplumber.org/", "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": "<20230329234049.11071-18-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20230329234049.11071-18-stephen@networkplumber.org", "date": "2023-03-29T23:40:44", "name": "[v12,17/22] hash: move rte_thash_gfni stubs out of header file", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "6c6193e61ecfee5f4e1ebcb19bd9fe2d9e6a36da", "submitter": { "id": 27, "url": "http://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230329234049.11071-18-stephen@networkplumber.org/mbox/", "series": [ { "id": 27577, "url": "http://patches.dpdk.org/api/series/27577/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27577", "date": "2023-03-29T23:40:27", "name": "Covert static log types in libraries to dynamic", "version": 12, "mbox": "http://patches.dpdk.org/series/27577/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/125609/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/125609/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 6138042868;\n\tThu, 30 Mar 2023 01:42:38 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8958C42D3D;\n\tThu, 30 Mar 2023 01:41:25 +0200 (CEST)", "from mail-pj1-f52.google.com (mail-pj1-f52.google.com\n [209.85.216.52]) by mails.dpdk.org (Postfix) with ESMTP id ABB9142D69\n for <dev@dpdk.org>; Thu, 30 Mar 2023 01:41:17 +0200 (CEST)", "by mail-pj1-f52.google.com with SMTP id x15so15632131pjk.2\n for <dev@dpdk.org>; Wed, 29 Mar 2023 16:41:17 -0700 (PDT)", "from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218])\n by smtp.gmail.com with ESMTPSA id\n f10-20020a17090274ca00b0019c2b1c4db1sm23360095plt.239.2023.03.29.16.41.15\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 29 Mar 2023 16:41:15 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20210112.gappssmtp.com; s=20210112; t=1680133276;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=KG1l4G35s0adQWHb2a8klPUSGEkiLy1z+c3HlBssSyQ=;\n b=ZTtSJYswPqMLwH/bNWSNFUd/D4k5f86oNEwpAh09jXATL0KLsnB1+5Aou/u8scAuUs\n fz1v/77rv26T99zSaEeeio8/F0f9odrFZNkf1sqPiTOIrCqRHN5WW3SM02YtBId/yseH\n LsxwSFXaJYqxxtj3i3r1qi+BOZ3f9ppKeEcAycZHq1y3iwb12FpSjjtyY2Wnvc0UgoSU\n PQfkOBuuw1T9Mz6RBUj+ZAMMulCoZkozRHbadVEjlidVrKxtC6OT1JcrJbGWr9Ul+cza\n 0xI43weLWxHpRBtXK1ayBmA2mHTD5KZ7zCgeDcSVJ7Vfu4QoU4AEQqMAgWxO0zVieytc\n SF8A==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112; t=1680133276;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=KG1l4G35s0adQWHb2a8klPUSGEkiLy1z+c3HlBssSyQ=;\n b=c1yx+tYYaQny3WGPSYZJBCLrvB2Tq8lYRubchaQSafupDfvm7wCDkM8BKgyA60JRqZ\n eRLV6i3Sswmfcx0KuXJNC2MYm75eaPNErehHQH2kGnLkfP+9ZvkEdIbxy7IdmJIzFeyc\n tO7eTdXbfbPEHnS1xFBJUZL42fgZW+ARfetIw8CEjvMznJQ11HYNgo+JwiSA1g6L0+sd\n 1M1qJ1EOrhAL+6usz+8IHIY1YW+DPIlpikMDYsO4r2dXvJI+biTMZGO3KTB2HtvODnUI\n mKbjavW4sm+M1Ul0obFVkY6XmgkUHUH/GWRgtlAp6g9lGLu56UCtlwzDPwpVUyjoTQF+\n nYxA==", "X-Gm-Message-State": "AAQBX9eFvXVdm+C3GzGVRo04MeBDiowDUd/6juxBdQUlHrWtrxpVen6Y\n bM1w/2/jy5Xyn6WsgOwGzWGkcf3QrrNCz25EtLgjBw==", "X-Google-Smtp-Source": "\n AKy350bjrBb+Mt9Z7SWN7W38c2rHuL1/7TDmC9wydCjHvwLgE2XE/J2JgKIYY+CWXcCB1mFz3vo7WQ==", "X-Received": "by 2002:a17:903:24d:b0:1a2:4efa:fcc0 with SMTP id\n j13-20020a170903024d00b001a24efafcc0mr13323078plh.1.1680133276537;\n Wed, 29 Mar 2023 16:41:16 -0700 (PDT)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "dev@dpdk.org", "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Yipeng Wang <yipeng1.wang@intel.com>,\n Sameh Gobriel <sameh.gobriel@intel.com>,\n Bruce Richardson <bruce.richardson@intel.com>,\n Vladimir Medvedkin <vladimir.medvedkin@intel.com>", "Subject": "[PATCH v12 17/22] hash: move rte_thash_gfni stubs out of header file", "Date": "Wed, 29 Mar 2023 16:40:44 -0700", "Message-Id": "<20230329234049.11071-18-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.39.2", "In-Reply-To": "<20230329234049.11071-1-stephen@networkplumber.org>", "References": "<20230329234049.11071-1-stephen@networkplumber.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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": "Having stubs in header file makes it harder to update\nRTE_LOG(). Also modify to only print warning once.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/hash/meson.build | 8 ++++++-\n lib/hash/rte_thash_gfni.c | 47 +++++++++++++++++++++++++++++++++++++++\n lib/hash/rte_thash_gfni.h | 30 ++++++++-----------------\n lib/hash/version.map | 4 ++++\n 4 files changed, 67 insertions(+), 22 deletions(-)\n create mode 100644 lib/hash/rte_thash_gfni.c", "diff": "diff --git a/lib/hash/meson.build b/lib/hash/meson.build\nindex 2f757d45f9bc..e56ee8572564 100644\n--- a/lib/hash/meson.build\n+++ b/lib/hash/meson.build\n@@ -17,7 +17,13 @@ indirect_headers += files(\n 'rte_thash_x86_gfni.h',\n )\n \n-sources = files('rte_cuckoo_hash.c', 'rte_fbk_hash.c', 'rte_thash.c')\n+sources = files(\n+ 'rte_cuckoo_hash.c',\n+ 'rte_fbk_hash.c',\n+ 'rte_thash.c',\n+ 'rte_thash_gfni.c'\n+)\n+\n deps += ['net']\n deps += ['ring']\n deps += ['rcu']\ndiff --git a/lib/hash/rte_thash_gfni.c b/lib/hash/rte_thash_gfni.c\nnew file mode 100644\nindex 000000000000..eb334185725c\n--- /dev/null\n+++ b/lib/hash/rte_thash_gfni.c\n@@ -0,0 +1,47 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2021 Intel Corporation\n+ */\n+\n+#include <stdbool.h>\n+\n+#include <rte_compat.h>\n+#include <rte_log.h>\n+#include <rte_thash_gfni.h>\n+\n+#ifndef RTE_THASH_GFNI_DEFINED\n+\n+uint32_t\n+rte_thash_gfni(const uint64_t *mtrx __rte_unused,\n+\t const uint8_t *key __rte_unused, int len __rte_unused)\n+{\n+\tstatic bool warned;\n+\n+\tif (!warned) {\n+\t\twarned = true;\n+\t\tRTE_LOG(ERR, HASH,\n+\t\t\t\"%s is undefined under given arch\\n\", __func__);\n+\t}\n+\n+\treturn 0;\n+}\n+\n+void\n+rte_thash_gfni_bulk(const uint64_t *mtrx __rte_unused,\n+\t\t int len __rte_unused, uint8_t *tuple[] __rte_unused,\n+\t\t uint32_t val[], uint32_t num)\n+{\n+\tunsigned int i;\n+\n+\tstatic bool warned;\n+\n+\tif (!warned) {\n+\t\twarned = true;\n+\t\tRTE_LOG(ERR, HASH,\n+\t\t\t\"%s is undefined under given arch\\n\", __func__);\n+\t}\n+\n+\tfor (i = 0; i < num; i++)\n+\t\tval[i] = 0;\n+}\n+\n+#endif\ndiff --git a/lib/hash/rte_thash_gfni.h b/lib/hash/rte_thash_gfni.h\nindex ef90faa302d1..4fc92984077e 100644\n--- a/lib/hash/rte_thash_gfni.h\n+++ b/lib/hash/rte_thash_gfni.h\n@@ -9,13 +9,14 @@\n extern \"C\" {\n #endif\n \n+#include <stdint.h>\n+\n #include <rte_compat.h>\n-#include <rte_log.h>\n+#include <rte_common.h>\n+#include <rte_config.h>\n \n #ifdef RTE_ARCH_X86\n-\n #include <rte_thash_x86_gfni.h>\n-\n #endif\n \n #ifndef RTE_THASH_GFNI_DEFINED\n@@ -38,13 +39,8 @@ extern \"C\" {\n * Calculated Toeplitz hash value.\n */\n __rte_experimental\n-static inline uint32_t\n-rte_thash_gfni(const uint64_t *mtrx __rte_unused,\n-\tconst uint8_t *key __rte_unused, int len __rte_unused)\n-{\n-\tRTE_LOG(ERR, HASH, \"%s is undefined under given arch\\n\", __func__);\n-\treturn 0;\n-}\n+uint32_t\n+rte_thash_gfni(const uint64_t *mtrx, const uint8_t *key, int len);\n \n /**\n * Bulk implementation for Toeplitz hash.\n@@ -67,17 +63,9 @@ rte_thash_gfni(const uint64_t *mtrx __rte_unused,\n * Number of tuples to hash.\n */\n __rte_experimental\n-static inline void\n-rte_thash_gfni_bulk(const uint64_t *mtrx __rte_unused,\n-\tint len __rte_unused, uint8_t *tuple[] __rte_unused,\n-\tuint32_t val[], uint32_t num)\n-{\n-\tunsigned int i;\n-\n-\tRTE_LOG(ERR, HASH, \"%s is undefined under given arch\\n\", __func__);\n-\tfor (i = 0; i < num; i++)\n-\t\tval[i] = 0;\n-}\n+void\n+rte_thash_gfni_bulk(const uint64_t *mtrx, int len, uint8_t *tuple[],\n+\t\t uint32_t val[], uint32_t num);\n \n #endif /* RTE_THASH_GFNI_DEFINED */\n \ndiff --git a/lib/hash/version.map b/lib/hash/version.map\nindex bdcebd19c29b..f03b047b2eec 100644\n--- a/lib/hash/version.map\n+++ b/lib/hash/version.map\n@@ -51,4 +51,8 @@ EXPERIMENTAL {\n \trte_thash_complete_matrix;\n \trte_thash_get_gfni_matrices;\n \trte_thash_gfni_supported;\n+\n+\t# added in 22.07\n+\trte_thash_gfni;\n+\trte_thash_gfni_bulk;\n };\n", "prefixes": [ "v12", "17/22" ] }{ "id": 125609, "url": "