get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 137810,
    "url": "https://patches.dpdk.org/api/patches/137810/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240302210822.202270-1-aomeryamac@gmail.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20240302210822.202270-1-aomeryamac@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240302210822.202270-1-aomeryamac@gmail.com",
    "date": "2024-03-02T21:08:22",
    "name": "[v2] lib/hash: feature reclaim defer queue",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e6e3951c2eb818100110129e5aefdd9e0cccbca5",
    "submitter": {
        "id": 3080,
        "url": "https://patches.dpdk.org/api/people/3080/?format=api",
        "name": "Abdullah Ömer Yamaç",
        "email": "aomeryamac@gmail.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20240302210822.202270-1-aomeryamac@gmail.com/mbox/",
    "series": [
        {
            "id": 31348,
            "url": "https://patches.dpdk.org/api/series/31348/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=31348",
            "date": "2024-03-02T21:08:22",
            "name": "[v2] lib/hash: feature reclaim defer queue",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/31348/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/137810/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/137810/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 175BD43BD1;\n\tSat,  2 Mar 2024 22:08:30 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 968CD4338E;\n\tSat,  2 Mar 2024 22:08:29 +0100 (CET)",
            "from mail-wm1-f45.google.com (mail-wm1-f45.google.com\n [209.85.128.45]) by mails.dpdk.org (Postfix) with ESMTP id 128A84338A\n for <dev@dpdk.org>; Sat,  2 Mar 2024 22:08:28 +0100 (CET)",
            "by mail-wm1-f45.google.com with SMTP id\n 5b1f17b1804b1-412cbf58fdeso8641595e9.3\n for <dev@dpdk.org>; Sat, 02 Mar 2024 13:08:28 -0800 (PST)",
            "from dcu.otaknetworks.com ([212.156.37.190])\n by smtp.gmail.com with ESMTPSA id\n az23-20020adfe197000000b0033d97bd5ddasm8241816wrb.85.2024.03.02.13.08.26\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 02 Mar 2024 13:08:26 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1709413707; x=1710018507; 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=HmULtWOVRyCd+BfVKZxL/qzuf9VUrOedF1wVHZGIKPg=;\n b=aFR1mQ590VZqaV9Hk9MZ/ftfuLDZTQa1Bz6zYaiEo6AaSHxbv3uhmzuXhnxopImHqL\n Su1Mn7pRFCEdEwcasAQR2tdBBYwGobi5ehwNpMN968cOjVYUnUWSLsadR/4hyGz547BZ\n ztlUPCVHvvAwQbRIU7xnUwhfBFVrpO6KjX78X9mf7D0dNRljJ+vwRrMWMvN5X4EpUavw\n dFql8E2wB/e91YolpT2FSs2PUljBLf326gwNSOgfH1uB4Hr1ZSuSEZgDo52bDjPconiW\n OkUbN0rntrSp9027Ra+CLkAasmAKYq0zwsFLGgzl7KawEJ+ra7ECNNPMpiKKOwOUmxKF\n c9Iw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1709413707; x=1710018507;\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=HmULtWOVRyCd+BfVKZxL/qzuf9VUrOedF1wVHZGIKPg=;\n b=uZJSZB5AoFn2d9ooRMGlB3uXaZuahKvYAAv8TMDyMxjb+31PsXxxuaKymTkfZpwIbP\n WpL9ktL9Jkx1/v+RTypiHcdBUwTNPh58F93oVLWPTn/Trz14Ge0UEtpib9TvL6bgm7cp\n aU8VUnknpuZhDaR3EiUAgAcRRFAecezP4voFFCVZ4d/k0AAhPMooeVxtWAKEmgbcfkCT\n 3rSwiDr8EAVXBfFc/+gLUWpqWbXTbKkzJIiND05J7ACo9uiik/01xI7SIpUzmXUD814j\n Iv04NVvRoguCnoeiCbgUlYIuw7EULvph0JZtvWydggRqb/3Pww02gzMMJJ/WNf/rVYgE\n besw==",
        "X-Gm-Message-State": "AOJu0YzLt+eq6higU9sthb8CPgyiO8B/GBS7OiznHyKmMFvzUqRA4L9G\n r+vf1LP9BJWVGXGcJqMcGVTbAy8GKvBlQRKdR8MkKap8dxOXtWok4IMMgH8u3Lk=",
        "X-Google-Smtp-Source": "\n AGHT+IH8HJNsjtfjK9xhUs7lSEFBhjiHmvagYgN869cizDWUl3SKvZOk2ucokeYm5YThyCznlLOoUg==",
        "X-Received": "by 2002:a05:600c:4746:b0:412:64a5:a21 with SMTP id\n w6-20020a05600c474600b0041264a50a21mr3612680wmo.40.1709413707139;\n Sat, 02 Mar 2024 13:08:27 -0800 (PST)",
        "From": "=?utf-8?b?QWJkdWxsYWggw5ZtZXIgWWFtYcOn?= <aomeryamac@gmail.com>",
        "To": "dev@dpdk.org",
        "Cc": "=?utf-8?b?QWJkdWxsYWggw5ZtZXIgWWFtYcOn?= <aomeryamac@gmail.com>,\n Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>",
        "Subject": "[PATCH v2] lib/hash: feature reclaim defer queue",
        "Date": "Sat,  2 Mar 2024 21:08:22 +0000",
        "Message-Id": "<20240302210822.202270-1-aomeryamac@gmail.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "\n <CA+sj1i8+ZccEPfXgG-W8xbVxBq3Pq9tZpg3D5Ntifx33FCFs8g@mail.gmail.com>",
        "References": "\n <CA+sj1i8+ZccEPfXgG-W8xbVxBq3Pq9tZpg3D5Ntifx33FCFs8g@mail.gmail.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>\nAcked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\n---\n lib/hash/rte_cuckoo_hash.c | 23 +++++++++++++++++++++++\n lib/hash/rte_hash.h        | 14 ++++++++++++++\n lib/hash/version.map       |  7 +++++++\n 3 files changed, 44 insertions(+)",
    "diff": "diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c\nindex 9cf94645f6..254fa80cc5 100644\n--- a/lib/hash/rte_cuckoo_hash.c\n+++ b/lib/hash/rte_cuckoo_hash.c\n@@ -1588,6 +1588,27 @@ 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)\n+{\n+\tint ret;\n+\n+\tif (h->hash_rcu_cfg == NULL || h->dq == 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, NULL, NULL, NULL);\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..c119477d50 100644\n--- a/lib/hash/rte_hash.h\n+++ b/lib/hash/rte_hash.h\n@@ -674,6 +674,21 @@ 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+ * @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 or invalid rcu mode\n+ */\n+__rte_experimental\n+int rte_hash_rcu_qsbr_dq_reclaim(struct rte_hash *h);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/hash/version.map b/lib/hash/version.map\nindex 6b2afebf6b..cec0e8fc67 100644\n--- a/lib/hash/version.map\n+++ b/lib/hash/version.map\n@@ -48,3 +48,10 @@ DPDK_24 {\n \n \tlocal: *;\n };\n+\n+EXPERIMENTAL {\n+\tglobal:\n+\n+\t#added in 24.1\n+\trte_hash_rcu_qsbr_dq_reclaim;\n+}\n\\ No newline at end of file\n",
    "prefixes": [
        "v2"
    ]
}