Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/136838/?format=api
http://patches.dpdk.org/api/patches/136838/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240216033743.150800-2-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": "<20240216033743.150800-2-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20240216033743.150800-2-stephen@networkplumber.org", "date": "2024-02-16T03:36:17", "name": "[v2,1/3] examples/l2fwd-keepalive: don't use EAL logtype", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "364b1a6ed690533edfdd100467093f0b863ed937", "submitter": { "id": 27, "url": "http://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "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/20240216033743.150800-2-stephen@networkplumber.org/mbox/", "series": [ { "id": 31123, "url": "http://patches.dpdk.org/api/series/31123/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31123", "date": "2024-02-16T03:36:16", "name": "replace use of EAL logtype in applications", "version": 2, "mbox": "http://patches.dpdk.org/series/31123/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/136838/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/136838/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 7083843B24;\n\tFri, 16 Feb 2024 04:38:02 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id BC52142E02;\n\tFri, 16 Feb 2024 04:37:57 +0100 (CET)", "from mail-pl1-f174.google.com (mail-pl1-f174.google.com\n [209.85.214.174])\n by mails.dpdk.org (Postfix) with ESMTP id 178CD4027C\n for <dev@dpdk.org>; Fri, 16 Feb 2024 04:37:55 +0100 (CET)", "by mail-pl1-f174.google.com with SMTP id\n d9443c01a7336-1d780a392fdso2640695ad.3\n for <dev@dpdk.org>; Thu, 15 Feb 2024 19:37:55 -0800 (PST)", "from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141])\n by smtp.gmail.com with ESMTPSA id\n x9-20020a170902e04900b001db561fa164sm1967871plx.25.2024.02.15.19.37.53\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 15 Feb 2024 19:37:53 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1708054674;\n x=1708659474; 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=yEyFCFdHHlQZ/CKt1fbFi+8lYhpJpVF6Z0sukUpRvLk=;\n b=BciVHt/MYEbA3fg312YBOP5UKk6pUvY+FGRO9jrfF3VeLCbvvb4yPeB3W53IezmQLM\n XgGrbqhHKVzAHXyNqqwCn7ai3S9oq7/Fh9saoRbJkDjHJsYvKPRON1bUAEC0MkyUcH2a\n ok+U/s0C+qYFjcPRkTBj8LyfXKzwm9EnZnCqjGxinSrPkm9RXKPbMhiefb9cUQLRSaRD\n FewGuSQwPVmAwoyOTBcefeCC1buAvM5JRcZoeAZWa2H6vUjF/nzVosLvUyozuFcrpjAC\n gsE+qWMW91l0YvCy4GQXcbalaue1W7EUD3wv3Lkbcgfs85Ndsp+fBemugaO0k4BDXVh5\n fS3Q==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1708054674; x=1708659474;\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=yEyFCFdHHlQZ/CKt1fbFi+8lYhpJpVF6Z0sukUpRvLk=;\n b=NxEAvorTuhQmTKoJjO43CMKaFoLL5Z2NH3JNBUn1fE0/HnWWnlRDUXmWH6S+mDqPqr\n eVj3DB//2TE8MYKQwyr5pUNMQW09BS6V4z42k6SHLaaX3bTN1+EJu+JU8NliMIVjYm+O\n rHFG7G9U1cBKz7JqAxvy+LwqnBi2fDQtW5h1tKL1kxgVlakQFSWVh6ZV8h+8CtC9ZuJn\n h8LZbJG7CIEEPZifY1XRpvDWHBwdq8mlaQ74q3hQF+jO/7Fe7tv/iTybj+ZxKTxxnGTH\n fsM0Jqkprk7fRJRQTMmuVKwioh0pXd/m9jL+YDSsnFTwXWjDH2oo5hzB/Xb8FD8IjGVv\n wsxA==", "X-Gm-Message-State": "AOJu0YyykNIe3MazzsjXm6D2+4blBX182rrju3Uv2Ruv0hAGYasaLbFs\n DohQI3OflV4c0TrIvDSFLzZJD2sWKv0+Sl/U6EHkQsZAM+1tXckllCp2D7/4mWHGkmCTYjpHEF9\n O", "X-Google-Smtp-Source": "\n AGHT+IEinZZaEeJFL9qIimU6Y3Jh79QbPKt6nVp+2ImRP+eZnLV1p1a1OyMLuB5aO1oJARqo239sIw==", "X-Received": "by 2002:a17:903:2352:b0:1d9:bf90:2f1b with SMTP id\n c18-20020a170903235200b001d9bf902f1bmr4384390plh.53.1708054674218;\n Thu, 15 Feb 2024 19:37:54 -0800 (PST)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "dev@dpdk.org", "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Huisong Li <lihuisong@huawei.com>", "Subject": "[PATCH v2 1/3] examples/l2fwd-keepalive: don't use EAL logtype", "Date": "Thu, 15 Feb 2024 19:36:17 -0800", "Message-ID": "<20240216033743.150800-2-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20240216033743.150800-1-stephen@networkplumber.org>", "References": "<20231211172437.61958-1-stephen@networkplumber.org>\n <20240216033743.150800-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": "EAL logtype should be reserved for EAL library.\nThis example is already using printf() so just print\nerrors to stderr.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\nAcked-by: Huisong Li <lihuisong@huawei.com>\n---\n examples/l2fwd-keepalive/shm.c | 21 +++++++--------------\n 1 file changed, 7 insertions(+), 14 deletions(-)", "diff": "diff --git a/examples/l2fwd-keepalive/shm.c b/examples/l2fwd-keepalive/shm.c\nindex 7c7a9ea8ea3c..cbeeb511ef07 100644\n--- a/examples/l2fwd-keepalive/shm.c\n+++ b/examples/l2fwd-keepalive/shm.c\n@@ -5,7 +5,6 @@\n #include <time.h>\n \n #include <rte_common.h>\n-#include <rte_log.h>\n #include <rte_keepalive.h>\n \n #include \"shm.h\"\n@@ -28,28 +27,23 @@ struct rte_keepalive_shm *rte_keepalive_shm_create(void)\n \tfd = shm_open(RTE_KEEPALIVE_SHM_NAME,\n \t\tO_CREAT | O_TRUNC | O_RDWR, 0666);\n \tif (fd < 0)\n-\t\tRTE_LOG(INFO, EAL,\n-\t\t\t\"Failed to open %s as SHM (%s)\\n\",\n-\t\t\tRTE_KEEPALIVE_SHM_NAME,\n-\t\t\tstrerror(errno));\n+\t\tfprintf(stderr, \"Failed to open %s as SHM (%s)\\n\",\n+\t\t\tRTE_KEEPALIVE_SHM_NAME, strerror(errno));\n \telse if (ftruncate(fd, sizeof(struct rte_keepalive_shm)) != 0)\n-\t\tRTE_LOG(INFO, EAL,\n-\t\t\t\"Failed to resize SHM (%s)\\n\", strerror(errno));\n+\t\tfprintf(stderr, \"Failed to resize SHM (%s)\\n\", strerror(errno));\n \telse {\n \t\tka_shm = (struct rte_keepalive_shm *) mmap(\n \t\t\t0, sizeof(struct rte_keepalive_shm),\n \t\t\tPROT_READ | PROT_WRITE,\tMAP_SHARED, fd, 0);\n \t\tclose(fd);\n \t\tif (ka_shm == MAP_FAILED)\n-\t\t\tRTE_LOG(INFO, EAL,\n-\t\t\t\t\"Failed to mmap SHM (%s)\\n\", strerror(errno));\n+\t\t\tfprintf(stderr, \"Failed to mmap SHM (%s)\\n\", strerror(errno));\n \t\telse {\n \t\t\tmemset(ka_shm, 0, sizeof(struct rte_keepalive_shm));\n \n \t\t\t/* Initialize the semaphores for IPC/SHM use */\n \t\t\tif (sem_init(&ka_shm->core_died, 1, 0) != 0) {\n-\t\t\t\tRTE_LOG(INFO, EAL,\n-\t\t\t\t\t\"Failed to setup SHM semaphore (%s)\\n\",\n+\t\t\t\tfprintf(stderr, \"Failed to setup SHM semaphore (%s)\\n\",\n \t\t\t\t\tstrerror(errno));\n \t\t\t\tmunmap(ka_shm,\n \t\t\t\t\tsizeof(struct rte_keepalive_shm));\n@@ -87,7 +81,7 @@ void rte_keepalive_relayed_state(struct rte_keepalive_shm *shm,\n \t\t * ka_agent is not active.\n \t\t */\n \t\tif (sem_getvalue(&shm->core_died, &count) == -1) {\n-\t\t\tRTE_LOG(INFO, EAL, \"Semaphore check failed(%s)\\n\",\n+\t\t\tfprintf(stderr, \"Semaphore check failed(%s)\\n\",\n \t\t\t\tstrerror(errno));\n \t\t\treturn;\n \t\t}\n@@ -95,8 +89,7 @@ void rte_keepalive_relayed_state(struct rte_keepalive_shm *shm,\n \t\t\treturn;\n \n \t\tif (sem_post(&shm->core_died) != 0)\n-\t\t\tRTE_LOG(INFO, EAL,\n-\t\t\t\t\"Failed to increment semaphore (%s)\\n\",\n+\t\t\tfprintf(stderr, \"Failed to increment semaphore (%s)\\n\",\n \t\t\t\tstrerror(errno));\n \t}\n }\n", "prefixes": [ "v2", "1/3" ] }{ "id": 136838, "url": "