Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/130701/?format=api
http://patchwork.dpdk.org/api/patches/130701/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230824073718.718872-1-jhascoet@kalray.eu/", "project": { "id": 1, "url": "http://patchwork.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": "<20230824073718.718872-1-jhascoet@kalray.eu>", "list_archive_url": "https://inbox.dpdk.org/dev/20230824073718.718872-1-jhascoet@kalray.eu", "date": "2023-08-24T07:37:18", "name": "app: enhance error check if enqueue fail in test_mbuf test_refcnt_iter", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "5a13dfc0188610047769f386e7a4de3a418fa565", "submitter": { "id": 3147, "url": "http://patchwork.dpdk.org/api/people/3147/?format=api", "name": "jhascoet", "email": "ju.hascoet@gmail.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230824073718.718872-1-jhascoet@kalray.eu/mbox/", "series": [ { "id": 29330, "url": "http://patchwork.dpdk.org/api/series/29330/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29330", "date": "2023-08-24T07:37:18", "name": "app: enhance error check if enqueue fail in test_mbuf test_refcnt_iter", "version": 1, "mbox": "http://patchwork.dpdk.org/series/29330/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/130701/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/130701/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 23313430EE;\n\tThu, 24 Aug 2023 10:53:01 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8473743067;\n\tThu, 24 Aug 2023 10:52:58 +0200 (CEST)", "from mail-ed1-f53.google.com (mail-ed1-f53.google.com\n [209.85.208.53]) by mails.dpdk.org (Postfix) with ESMTP id D664F42B8B\n for <dev@dpdk.org>; Thu, 24 Aug 2023 09:37:22 +0200 (CEST)", "by mail-ed1-f53.google.com with SMTP id\n 4fb4d7f45d1cf-52a250aa012so2174197a12.3\n for <dev@dpdk.org>; Thu, 24 Aug 2023 00:37:22 -0700 (PDT)", "from coolup54.lin.mbt.kalray.eu ([217.181.231.53])\n by smtp.gmail.com with ESMTPSA id\n n12-20020a170906688c00b00982be08a9besm10836815ejr.172.2023.08.24.00.37.21\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 24 Aug 2023 00:37:21 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20221208; t=1692862642; x=1693467442;\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=v49c25UX8/DVYZO76RR0+8rxzqI4pCyo6aURY+U7HuE=;\n b=jKUsqt7hcv+Lg+k1OXBXdp2A1Z5W9MkZ6JaxDDw8YsJOw1l3OiZVwwPxitGD8oLiaa\n EJGzyBIwOY5ac33z3ScrTMlgze5sdCQ332LQBVo/Ox3NpCX8ftjwB9YnJV/rX67/iF+n\n iH/bzehEs+jBXvDUocaXw8zapmzUDHiFMHVakssTzV4dtdgEUfbNspGufUw9rrSXJwcc\n 9buN4cN1CgwScuH/aJWSC/aD3kxyyTPsCTJUVzURiXvJLJHSP5ZIXW6Ee7KPSUR/HXUA\n aCdUrp4sr3E+bTRizu8t64jASOVf6BizzuVGlTQ+WJ6gEwf/jk9OhX8G3balLwDmyBBs\n VJzg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20221208; t=1692862642; x=1693467442;\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=v49c25UX8/DVYZO76RR0+8rxzqI4pCyo6aURY+U7HuE=;\n b=klI/1B+LJoimvbNA19xWeFRoGIh26Rr4OLpPnMJ7o+PDuQ04WzLMnK1MGOflE34he6\n B/Z+xLtyznytMm/O7P/ou2vFLmBsg302TrC0PSBMkUli4B1nxOxOU1Glvff791pOH1in\n ZXBzqQ47i+zbLRAt6pIxIo92URAGX41a5i56FKxey0EPIacsLeNP/tU8diOWaB2Uu+lq\n jRjaxncr9frJjsOi9SHN0Vu5vJdOkzVDLwRQL7WP1RwNGgNE4evuTuTDNLqNs9+wc/Fg\n oHV6g3zoYdMAR9gF7gjjuzDtfgTxJGcZR6xz7jKmAc0caQJEIlhPoe98k8vUQ/wUjakl\n cVJw==", "X-Gm-Message-State": "AOJu0YzIJG25BwXPnVLtpz1O+639eWj0qGaDIzlBmFjtpxc8ACKH1Owy\n Cj2UIIspzyVvCkCGth685Sc=", "X-Google-Smtp-Source": "\n AGHT+IFCfEF1OcJVXC91v9wTngSEZysjZQZy9YGFIIEy71p9RiCH8h/bm+ZKHozDwnlvl4EjDEm4PA==", "X-Received": "by 2002:a17:906:1090:b0:99b:c8db:d92f with SMTP id\n u16-20020a170906109000b0099bc8dbd92fmr12220359eju.69.1692862641992;\n Thu, 24 Aug 2023 00:37:21 -0700 (PDT)", "From": "jhascoet <ju.hascoet@gmail.com>", "X-Google-Original-From": "jhascoet <jhascoet@kalray.eu>", "To": "olivier.matz@6wind.com", "Cc": "dev@dpdk.org,\n\tJulien Hascoet <ju.hascoet@gmail.com>", "Subject": "[PATCH] app: enhance error check if enqueue fail in test_mbuf\n test_refcnt_iter", "Date": "Thu, 24 Aug 2023 09:37:18 +0200", "Message-Id": "<20230824073718.718872-1-jhascoet@kalray.eu>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20230810160941.3895855-1-jhascoet@kalray.eu>", "References": "<20230810160941.3895855-1-jhascoet@kalray.eu>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Mailman-Approved-At": "Thu, 24 Aug 2023 10:52:56 +0200", "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": "From: Julien Hascoet <ju.hascoet@gmail.com>\n\nAs the ring is big enough by construction, the ring\nenqueue ops cannot fail; therefore, we check and panic\non it as soon as it is detected.\n\nSigned-off-by: Julien Hascoet <ju.hascoet@gmail.com>\n---\n app/test/test_mbuf.c | 13 ++++++++++---\n 1 file changed, 10 insertions(+), 3 deletions(-)", "diff": "diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c\nindex d7393df7eb..c94dd3749e 100644\n--- a/app/test/test_mbuf.c\n+++ b/app/test/test_mbuf.c\n@@ -1033,12 +1033,15 @@ test_refcnt_iter(unsigned int lcore, unsigned int iter,\n \t\ttref += ref;\n \t\tif ((ref & 1) != 0) {\n \t\t\trte_pktmbuf_refcnt_update(m, ref);\n-\t\t\twhile (ref-- != 0)\n-\t\t\t\trte_ring_enqueue(refcnt_mbuf_ring, m);\n+\t\t\twhile (ref-- != 0) {\n+\t\t\t\tif (rte_ring_enqueue(refcnt_mbuf_ring, m) != 0)\n+\t\t\t\t\tgoto fail_enqueue;\n+\t\t\t}\n \t\t} else {\n \t\t\twhile (ref-- != 0) {\n \t\t\t\trte_pktmbuf_refcnt_update(m, 1);\n-\t\t\t\trte_ring_enqueue(refcnt_mbuf_ring, m);\n+\t\t\t\tif (rte_ring_enqueue(refcnt_mbuf_ring, m) != 0)\n+\t\t\t\t\tgoto fail_enqueue;\n \t\t\t}\n \t\t}\n \t\trte_pktmbuf_free(m);\n@@ -1066,6 +1069,10 @@ test_refcnt_iter(unsigned int lcore, unsigned int iter,\n \n \trte_panic(\"(lcore=%u, iter=%u): after %us only \"\n \t \"%u of %u mbufs left free\\n\", lcore, iter, wn, i, n);\n+\n+fail_enqueue:\n+\trte_panic(\"(lcore=%u, iter=%u): enqueue mbuf %u cannot \"\n+\t\t\"fail since ring is big enough\\n\", lcore, iter, i);\n }\n \n static int\n", "prefixes": [] }{ "id": 130701, "url": "