get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/138009/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 138009,
    "url": "http://patches.dpdk.org/api/patches/138009/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240306085948.185299-1-aomeryamac@gmail.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": "<20240306085948.185299-1-aomeryamac@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240306085948.185299-1-aomeryamac@gmail.com",
    "date": "2024-03-06T08:59:48",
    "name": "[v3] lib/hash: add defer queue reclaim API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3e2268df8e810361ab74570fa55d4669304f688f",
    "submitter": {
        "id": 3080,
        "url": "http://patches.dpdk.org/api/people/3080/?format=api",
        "name": "Abdullah Ömer Yamaç",
        "email": "aomeryamac@gmail.com"
    },
    "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/20240306085948.185299-1-aomeryamac@gmail.com/mbox/",
    "series": [
        {
            "id": 31392,
            "url": "http://patches.dpdk.org/api/series/31392/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31392",
            "date": "2024-03-06T08:59:48",
            "name": "[v3] lib/hash: add defer queue reclaim API",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/31392/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/138009/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/138009/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 706A443C56;\n\tWed,  6 Mar 2024 09:59:54 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5973640275;\n\tWed,  6 Mar 2024 09:59:54 +0100 (CET)",
            "from mail-ej1-f41.google.com (mail-ej1-f41.google.com\n [209.85.218.41]) by mails.dpdk.org (Postfix) with ESMTP id F270C40156\n for <dev@dpdk.org>; Wed,  6 Mar 2024 09:59:52 +0100 (CET)",
            "by mail-ej1-f41.google.com with SMTP id\n a640c23a62f3a-a45b6fcd5e8so61513066b.1\n for <dev@dpdk.org>; Wed, 06 Mar 2024 00:59:52 -0800 (PST)",
            "from dcu.otaknetworks.com ([212.156.37.190])\n by smtp.gmail.com with ESMTPSA id\n l18-20020a1709060e1200b00a459094cf61sm2037379eji.115.2024.03.06.00.59.51\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 06 Mar 2024 00:59:51 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1709715592; x=1710320392; darn=dpdk.org;\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=u+xQ76eKztir5mSRjFQW8dRoWkJnp+Uwr0tk3d0e9QU=;\n b=dCDdwMvSrHz11HvOZiJm/ZYS7M/4eVAofUmQiByxhaJ0pLL2jvgnhRUsoqSyW5vhJf\n wFI6wXELfjp8dgNZw4l1mXyy4sVNI0b89ixX2IBE7o0xP42g1ZiYMiGlOmczBmJ2hD/H\n sKYFAANURT8dQwggb8ajtjsK6CdjfcKZ01UoXY6I9GvwjFsMYbtbAZMOc3tGHmleuVHp\n JA8Y8IszyJ7WcpBBm1ySw4hszMR24QGctp0Ci+X1Qopg1GkVaweUE5RJY2e/KfTCvjsF\n ZbObDx5cq/d9q5bWOg4777xbdOGVXHJKIQ+eLW7XdGQVUe4Knbp/2/IRAQjBmBJvNnE3\n 3Iig==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1709715592; x=1710320392;\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=u+xQ76eKztir5mSRjFQW8dRoWkJnp+Uwr0tk3d0e9QU=;\n b=LnjZYjPaRAc4efFyaanhQO5iclgo2Keg+91TKrXQVW75qOdhFC22HBq1WgfWPmAiBu\n RSTwP31oB78N7naFo8b3uqW1vFVVKmhL0t9+hRFfHHLXrD0YhulU6pHlOD2677MmSWmH\n AMoVlU2Pep2zNsTknskjeqb6QP3ZjVxNzyfKVjhXleZiSz3LhgJYJ9vvIJqNVAbAcmcJ\n N57iBTC6H1Lp1/RkNihOcrc7kQoHyIKpu6Fd1e6RoTGkcIi2zEpE5qknNoDys62XfDoF\n jvC1x0mdFEKJ/ZOG9Kem2p5GIwW/vd0kUc0pD9YKRqFndInBFziWk8sdoSu0Krp2hbnb\n glZQ==",
        "X-Gm-Message-State": "AOJu0Yz8Q82ShHFc06b9VM6d5RLth9r4UvG6UJqhiGel74zchiDyBdGt\n BrCnZYOThbTUaGzH3nTBpGTX0cvuKXfVQUsIVO+G2BaGDRSDPCBVfr4Jk9QfAQc=",
        "X-Google-Smtp-Source": "\n AGHT+IGzIa1lzYGUNNmHtolUGeImWh9O3/vot2iaqpCEaRJ2fnjymyB4WjAY/ld2H2BOZD5rn6DxqQ==",
        "X-Received": "by 2002:a17:906:cd03:b0:a3d:ce2c:b06a with SMTP id\n oz3-20020a170906cd0300b00a3dce2cb06amr8883367ejb.22.1709715591936;\n Wed, 06 Mar 2024 00:59:51 -0800 (PST)",
        "From": "=?utf-8?b?QWJkdWxsYWggw5ZtZXIgWWFtYcOn?= <aomeryamac@gmail.com>",
        "To": "dev@dpdk.org",
        "Cc": "=?utf-8?b?QWJkdWxsYWggw5ZtZXIgWWFtYcOn?= <aomeryamac@gmail.com>",
        "Subject": "[PATCH v3] lib/hash: add defer queue reclaim API",
        "Date": "Wed,  6 Mar 2024 08:59:48 +0000",
        "Message-Id": "<20240306085948.185299-1-aomeryamac@gmail.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<2EAE263E-7275-432B-B06A-C50CCFD78DE4@arm.com>",
        "References": "<2EAE263E-7275-432B-B06A-C50CCFD78DE4@arm.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "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": "This patch adds a new feature to the hash library to allow the user to\nreclaim the defer queue. This is useful when the user wants to force\nreclaim resources that are not being used. This API is only available\nif the RCU is enabled.\n\nSigned-off-by: Abdullah Ömer Yamaç <aomeryamac@gmail.com>\n---\n lib/hash/rte_cuckoo_hash.c | 23 +++++++++++++++++++++++\n lib/hash/rte_hash.h        | 28 +++++++++++++++++++++++++++-\n lib/hash/version.map       |  6 ++++++\n 3 files changed, 56 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c\nindex 9cf94645f6..ecc124f1fc 100644\n--- a/lib/hash/rte_cuckoo_hash.c\n+++ b/lib/hash/rte_cuckoo_hash.c\n@@ -1588,6 +1588,29 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)\n \treturn 0;\n }\n \n+int\n+rte_hash_rcu_qsbr_dq_reclaim(struct rte_hash *h, unsigned int *freed,\n+\t\tunsigned int *pending, unsigned int *available)\n+{\n+\tint ret;\n+\n+\tif (h->hash_rcu_cfg == NULL) {\n+\t\trte_errno = EINVAL;\n+\t\treturn -1;\n+\t}\n+\n+\tret = rte_rcu_qsbr_dq_reclaim(h->dq, h->hash_rcu_cfg->max_reclaim_size,\n+\t\t\t\t\t\t\tfreed, pending, available);\n+\tif (ret != 0) {\n+\t\tHASH_LOG(ERR,\n+\t\t\t\"%s: could not reclaim the defer queue in hash table\",\n+\t\t\t\t__func__);\n+\t\treturn -1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n static inline void\n remove_entry(const struct rte_hash *h, struct rte_hash_bucket *bkt,\n \t\tunsigned int i)\ndiff --git a/lib/hash/rte_hash.h b/lib/hash/rte_hash.h\nindex 7ecc021111..ad13792dbb 100644\n--- a/lib/hash/rte_hash.h\n+++ b/lib/hash/rte_hash.h\n@@ -674,6 +674,32 @@ rte_hash_iterate(const struct rte_hash *h, const void **key, void **data, uint32\n  */\n int rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg);\n \n+/**\n+ * Reclaim resources from the defer queue.\n+ * This API reclaim the resources from the defer queue if rcu is enabled.\n+ *\n+ * @param h\n+ *   The hash object to reclaim resources.\n+ * @param n\n+ *   Maximum number of resources to free.\n+ * @param freed\n+ *   Number of resources that were freed.\n+ * @param pending\n+ *   Number of resources pending on the defer queue.\n+ *   This number might not be accurate if multi-thread safety is configured.\n+ * @param available\n+ *   Number of resources that can be added to the defer queue.\n+ *   This number might not be accurate if multi-thread safety is configured.\n+ * @return\n+ *   On success - 0\n+ *   On error - 1 with error code set in rte_errno.\n+ *   Possible rte_errno codes are:\n+ *   - EINVAL - invalid pointer\n+ */\n+__rte_experimental\n+int rte_hash_rcu_qsbr_dq_reclaim(struct rte_hash *h, unsigned int *freed,\n+\t\tunsigned int *pending, unsigned int *available);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/hash/version.map b/lib/hash/version.map\nindex 6b2afebf6b..fac7f81e6f 100644\n--- a/lib/hash/version.map\n+++ b/lib/hash/version.map\n@@ -48,3 +48,9 @@ DPDK_24 {\n \n \tlocal: *;\n };\n+\n+EXPERIMENTAL {\n+\tglobal:\n+\n+\trte_hash_rcu_qsbr_dq_reclaim;\n+};\n\\ No newline at end of file\n",
    "prefixes": [
        "v3"
    ]
}