Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/118067/?format=api
http://patches.dpdk.org/api/patches/118067/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20221012123112.2951802-9-david.marchand@redhat.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": "<20221012123112.2951802-9-david.marchand@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20221012123112.2951802-9-david.marchand@redhat.com", "date": "2022-10-12T12:31:11", "name": "[v3,8/9] trace: remove limitation on trace point name", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "072ea328179c9e0d09ff68239719b2acc546bcd0", "submitter": { "id": 1173, "url": "http://patches.dpdk.org/api/people/1173/?format=api", "name": "David Marchand", "email": "david.marchand@redhat.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/20221012123112.2951802-9-david.marchand@redhat.com/mbox/", "series": [ { "id": 25183, "url": "http://patches.dpdk.org/api/series/25183/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=25183", "date": "2022-10-12T12:31:03", "name": "Trace subsystem fixes", "version": 3, "mbox": "http://patches.dpdk.org/series/25183/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/118067/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/118067/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 AA5DDA00C4;\n\tWed, 12 Oct 2022 14:32:27 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EC06A43093;\n\tWed, 12 Oct 2022 14:32:07 +0200 (CEST)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id B2D884308B\n for <dev@dpdk.org>; Wed, 12 Oct 2022 14:32:06 +0200 (CEST)", "from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com\n [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-389-r2663gr8PBKYsiA2ohNIAw-1; Wed, 12 Oct 2022 08:31:52 -0400", "from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com\n [10.11.54.1])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4E8F53C11048;\n Wed, 12 Oct 2022 12:31:52 +0000 (UTC)", "from localhost.localdomain (ovpn-193-115.brq.redhat.com\n [10.40.193.115])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 7EE3C40C206B;\n Wed, 12 Oct 2022 12:31:51 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1665577926;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=pHG1F4tApwHwoNoWmHSx8adeLcq4BMh6DkIW7dJ/E2Q=;\n b=I0Rey2UwOiZ2Wau8+c4n0Ilj0ANsRVZDMtYBqJOTDNWoOpEub4MeidcIsHSj6pi+Ax/BD8\n W509gf3jwjo40dGJYq2wmJMHDdsMyyUmoGhjorOMO5nFa5f8d6dvixi2j+eIptmad1AmBy\n +zvYTMUrY1dB0dl2TiSTFVUI9mIyG64=", "X-MC-Unique": "r2663gr8PBKYsiA2ohNIAw-1", "From": "David Marchand <david.marchand@redhat.com>", "To": "dev@dpdk.org", "Cc": "jerinj@marvell.com,\n\tskori@marvell.com", "Subject": "[PATCH v3 8/9] trace: remove limitation on trace point name", "Date": "Wed, 12 Oct 2022 14:31:11 +0200", "Message-Id": "<20221012123112.2951802-9-david.marchand@redhat.com>", "In-Reply-To": "<20221012123112.2951802-1-david.marchand@redhat.com>", "References": "<20220921120359.2201131-1-david.marchand@redhat.com>\n <20221012123112.2951802-1-david.marchand@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.1 on 10.11.54.1", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true", "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": "The name of a trace point is provided as a constant string via the\nRTE_TRACE_POINT_REGISTER macro.\nWe can rely on an explicit constant string in the binary and simply point\nat it.\nThere is then no need for a (fixed size) copy.\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\nChanges since v2:\n- stored trace point name in a static variable to make sure the string\n is put in .data,\n\n---\n lib/eal/common/eal_common_trace.c | 10 +++-------\n lib/eal/common/eal_common_trace_utils.c | 2 +-\n lib/eal/common/eal_trace.h | 3 +--\n lib/eal/include/rte_trace_point_register.h | 3 ++-\n 4 files changed, 7 insertions(+), 11 deletions(-)", "diff": "diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c\nindex ec168e37b3..5caaac8e59 100644\n--- a/lib/eal/common/eal_common_trace.c\n+++ b/lib/eal/common/eal_common_trace.c\n@@ -235,7 +235,7 @@ rte_trace_point_lookup(const char *name)\n \t\treturn NULL;\n \n \tSTAILQ_FOREACH(tp, &tp_list, next)\n-\t\tif (strncmp(tp->name, name, TRACE_POINT_NAME_SIZE) == 0)\n+\t\tif (strcmp(tp->name, name) == 0)\n \t\t\treturn tp->handle;\n \n \treturn NULL;\n@@ -492,10 +492,7 @@ __rte_trace_point_register(rte_trace_point_t *handle, const char *name,\n \t}\n \n \t/* Initialize the trace point */\n-\tif (rte_strscpy(tp->name, name, TRACE_POINT_NAME_SIZE) < 0) {\n-\t\ttrace_err(\"name is too long\");\n-\t\tgoto free;\n-\t}\n+\ttp->name = name;\n \n \t/* Copy the accumulated fields description and clear it for the next\n \t * trace point.\n@@ -517,8 +514,7 @@ __rte_trace_point_register(rte_trace_point_t *handle, const char *name,\n \n \t/* All Good !!! */\n \treturn 0;\n-free:\n-\tfree(tp);\n+\n fail:\n \tif (trace.register_errno == 0)\n \t\ttrace.register_errno = rte_errno;\ndiff --git a/lib/eal/common/eal_common_trace_utils.c b/lib/eal/common/eal_common_trace_utils.c\nindex 7bf1c05e12..72108d36a6 100644\n--- a/lib/eal/common/eal_common_trace_utils.c\n+++ b/lib/eal/common/eal_common_trace_utils.c\n@@ -42,7 +42,7 @@ trace_entry_compare(const char *name)\n \tint count = 0;\n \n \tSTAILQ_FOREACH(tp, tp_list, next) {\n-\t\tif (strncmp(tp->name, name, TRACE_POINT_NAME_SIZE) == 0)\n+\t\tif (strcmp(tp->name, name) == 0)\n \t\t\tcount++;\n \t\tif (count > 1) {\n \t\t\ttrace_err(\"found duplicate entry %s\", name);\ndiff --git a/lib/eal/common/eal_trace.h b/lib/eal/common/eal_trace.h\nindex 72a5a461ae..26a18a2c48 100644\n--- a/lib/eal/common/eal_trace.h\n+++ b/lib/eal/common/eal_trace.h\n@@ -24,14 +24,13 @@\n \n #define TRACE_PREFIX_LEN 12\n #define TRACE_DIR_STR_LEN (sizeof(\"YYYY-mm-dd-AM-HH-MM-SS\") + TRACE_PREFIX_LEN)\n-#define TRACE_POINT_NAME_SIZE 64\n #define TRACE_CTF_MAGIC 0xC1FC1FC1\n #define TRACE_MAX_ARGS\t32\n \n struct trace_point {\n \tSTAILQ_ENTRY(trace_point) next;\n \trte_trace_point_t *handle;\n-\tchar name[TRACE_POINT_NAME_SIZE];\n+\tconst char *name;\n \tchar *ctf_field;\n };\n \ndiff --git a/lib/eal/include/rte_trace_point_register.h b/lib/eal/include/rte_trace_point_register.h\nindex 2e61439940..a32f4d731b 100644\n--- a/lib/eal/include/rte_trace_point_register.h\n+++ b/lib/eal/include/rte_trace_point_register.h\n@@ -20,9 +20,10 @@ RTE_DECLARE_PER_LCORE(volatile int, trace_point_sz);\n \n #define RTE_TRACE_POINT_REGISTER(trace, name) \\\n rte_trace_point_t __attribute__((section(\"__rte_trace_point\"))) __##trace; \\\n+static const char __##trace##_name[] = RTE_STR(name); \\\n RTE_INIT(trace##_init) \\\n { \\\n-\t__rte_trace_point_register(&__##trace, RTE_STR(name), \\\n+\t__rte_trace_point_register(&__##trace, __##trace##_name, \\\n \t\t(void (*)(void)) trace); \\\n }\n \n", "prefixes": [ "v3", "8/9" ] }{ "id": 118067, "url": "