From patchwork Mon Feb 20 18:49:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 124212 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id 6F4C941CEE; Mon, 20 Feb 2023 19:50:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D118430CE; Mon, 20 Feb 2023 19:50:08 +0100 (CET) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mails.dpdk.org (Postfix) with ESMTP id 1F0A6430C6 for ; Mon, 20 Feb 2023 19:50:05 +0100 (CET) Received: by mail-pj1-f49.google.com with SMTP id qi12-20020a17090b274c00b002341621377cso2209020pjb.2 for ; Mon, 20 Feb 2023 10:50:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FhY2/8JKip9jE5AnJD2e45pWIw7FlQwNHfxGqa7xcIY=; b=NGu/QXa/sHMgHu+dJlNhNxl3XMEbD0YCpLsezJWV0cOAHWt+1ORK7UbwfjXqUYayCi iHxIhoqEHX5qjV9Zh9QK3mLDBtSDEKqBJS+x8xyslhNqOPjOc9lMy22YgTkyTLpfXZT3 stl73JGt4psyn37EGObIkF1Rnqx3p7WhS7CSMCik/ubWm1LGCwzpr8/aAMvWsEMQ7az3 w29mxMoB6+CpQnIkiHP+QVVRc07/AnY0cgEftwjoJPCOlkXvR2z0H8yUP+Jcn+gIN31e ofoT2uSfGzPcCSYex/aN5H8uSXr/qoJiVcCZdjV8yIkzwW5DM/azkVXDwJZxMJWZpVWP q5Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FhY2/8JKip9jE5AnJD2e45pWIw7FlQwNHfxGqa7xcIY=; b=TCOql2o53r+jXIO0wItuAIrNea7p9i1/sTdFpOe2Lu9tgEhmQpfF9804ys6fo8mrsG aP1PJEPpNexAeU8zs3Jvy7XoONmqFlV7Bpfpbeyr7qNQXyhpqVE136J8krEUwuUjGebQ vN7CVVVlRlVMAVzgtE3G0F9TNDexzwEAQQ9l16DNkW/c9qlt5ukS8F6GdRfanDFelGZv tpu6i1AZPciONltyNtQ/1GLTFlzpW6YUGgFg7qDlXPrvB86OH/BDP6Cri7+RzoZtZm/S HLiVjhCDA71kJAcQAoLtntAK/aO/BXn3LOQMyh7g67vmitQ/cGx9mYc7UF/pO41rpcJg 5QMA== X-Gm-Message-State: AO0yUKX2yZ1opbUeV0cqxFBHsNyysHK0LNjLihVnSVWNSLi86QaADaj6 adDYDxVf8oDgZvkl0guQBOEVJNzO00TA3HIeE2Y= X-Google-Smtp-Source: AK7set+RdILqK1hptZC2ymqDqx/R2JrvJlpZpqr0PKKwagerDFmTnWszgCq94ijYGWGMy1x9CaJK8Q== X-Received: by 2002:a17:903:687:b0:19a:7548:da22 with SMTP id ki7-20020a170903068700b0019a7548da22mr1774426plb.50.1676919003985; Mon, 20 Feb 2023 10:50:03 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id n21-20020a170902969500b0019607547f29sm2020798plp.304.2023.02.20.10.50.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 10:50:03 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Konstantin Ananyev Subject: [PATCH v6 1/5] ip_frag: use a dynamic logtype Date: Mon, 20 Feb 2023 10:49:57 -0800 Message-Id: <20230220185001.50714-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230220185001.50714-1-stephen@networkplumber.org> References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230220185001.50714-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org DPDK libraries should not be reusing RTE_LOGTYPE_USER1 in lieu of doing proper logtype registration. Acked-by: Konstantin Ananyev Fixes: 416707812c03 ("ip_frag: refactor reassembly code into a proper library") Signed-off-by: Stephen Hemminger --- lib/ip_frag/ip_frag_common.h | 5 ++++- lib/ip_frag/rte_ip_frag_common.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ip_frag/ip_frag_common.h b/lib/ip_frag/ip_frag_common.h index 9c0dbdeb6eb9..95f1689d476d 100644 --- a/lib/ip_frag/ip_frag_common.h +++ b/lib/ip_frag/ip_frag_common.h @@ -8,9 +8,12 @@ #include "rte_ip_frag.h" #include "ip_reassembly.h" +extern int ipfrag_logtype; +#define RTE_LOGTYPE_IPFRAG ipfrag_logtype + /* logging macros. */ #ifdef RTE_LIBRTE_IP_FRAG_DEBUG -#define IP_FRAG_LOG(lvl, fmt, args...) RTE_LOG(lvl, USER1, fmt, ##args) +#define IP_FRAG_LOG(lvl, fmt, args...) RTE_LOG(lvl, IPFRAG, fmt, ##args) #else #define IP_FRAG_LOG(lvl, fmt, args...) do {} while(0) #endif /* IP_FRAG_DEBUG */ diff --git a/lib/ip_frag/rte_ip_frag_common.c b/lib/ip_frag/rte_ip_frag_common.c index c1de2e81b6d0..e4af8d23ad10 100644 --- a/lib/ip_frag/rte_ip_frag_common.c +++ b/lib/ip_frag/rte_ip_frag_common.c @@ -7,6 +7,8 @@ #include +RTE_LOG_REGISTER_DEFAULT(ipfrag_logtype, INFO); + #include "ip_frag_common.h" #define IP_FRAG_HASH_FNUM 2 From patchwork Mon Feb 20 18:49:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 124213 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id 422A741CEE; Mon, 20 Feb 2023 19:50:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 58582430D8; Mon, 20 Feb 2023 19:50:09 +0100 (CET) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id 1AA93430CE for ; Mon, 20 Feb 2023 19:50:06 +0100 (CET) Received: by mail-pl1-f181.google.com with SMTP id p1so490312plg.7 for ; Mon, 20 Feb 2023 10:50:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GAlRbq3o7ovDqkKTT41WAN/GYRy/jddESUXIeIkPiqg=; b=S1yEWCnQ78HOlWugoN+t4ZPZBq0lpxNOsC26e2XOptTUgeAfk4AWIJHcPiZ2aq43gV CGhIhR2JdOVFAqwLGluxye+HFHHNGuiBospum4W0J93OttuE4P9ovA6mikgsygc8YyjJ qgo3pFgyaGNJdWwxWgcFeW5e1Ue2REFfURNvyrZ7h11qZ88V00MzEDGr/D+OhHXmJAqQ rj8RPfiz8ldAJL8rhcfPsGurrHWx1ejPSY1oOvphweG/tu7AgXahyRFTYtPOBrNxtf7p gGeSd6iUvZqzdsi3d/3D/7fgLFnyHRbi/PM8vcCZL8NLoInDWdQaqJ7jABvYfQqztRFP cVhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GAlRbq3o7ovDqkKTT41WAN/GYRy/jddESUXIeIkPiqg=; b=ayN7SfSIhIMdBBFIWVND6Ru0Ms18UvfcGyMtgELu/PALQmHrm2DUsy38wcG0MuAGJQ gCcgSKTXaMiPjGGBFPDQtXTy5mr6eTK0TuyLZhlZEGkfWjt4MCnYDt/Yz9Fo8T2AreQL mF+56yxymGD1tglvOsY1OX56jgjeFnlPKYRPyyCnVxwycIpJHfgihf/uYScHSo7nmNi4 cSv9hMbBILt9mHQ3aYD+G8kJgjexdHq2//amJKEhGoT42u7mQTPxuV6mtAe8LAVbNYNI oedLyA9mtvL9q9J7pou6ymciPbLwyE3L90WGImgqG3hSOYVFRuZMvxBkF8GtqPovFZSt Drog== X-Gm-Message-State: AO0yUKW987d83Qp7aFRqUGN/Qe/qlcJp0biYk5k7KLKwgQQlAhUW4EM8 1mpKtZpQ2GmpCnlRyIfrnJN2wcljL0XVdS1c8GQ= X-Google-Smtp-Source: AK7set8XTaCEbOtT/pludszSHUGPkb2POP+Rlp2Z2mJH/uwxoLFnxx1ynsA36gX9zukajQqnJ7UGPQ== X-Received: by 2002:a17:903:24f:b0:19a:906a:e052 with SMTP id j15-20020a170903024f00b0019a906ae052mr1847392plh.64.1676919004934; Mon, 20 Feb 2023 10:50:04 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id n21-20020a170902969500b0019607547f29sm2020798plp.304.2023.02.20.10.50.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 10:50:04 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , sergio.gonzalez.monroy@intel.com Subject: [PATCH v6 2/5] reorder: use a dynamic logtype Date: Mon, 20 Feb 2023 10:49:58 -0800 Message-Id: <20230220185001.50714-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230220185001.50714-1-stephen@networkplumber.org> References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230220185001.50714-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Libraries should not be reusing RTE_LOGTYPE_USER1 instead of doing proper logtype registration. Fixes: b70b56032bff ("reorder: new library") Cc: sergio.gonzalez.monroy@intel.com Signed-off-by: Stephen Hemminger --- lib/reorder/rte_reorder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/reorder/rte_reorder.c b/lib/reorder/rte_reorder.c index 6e029c9e02fd..7a3a97972cb7 100644 --- a/lib/reorder/rte_reorder.c +++ b/lib/reorder/rte_reorder.c @@ -15,6 +15,9 @@ #include "rte_reorder.h" +RTE_LOG_REGISTER_DEFAULT(reorder_logtype, INFO); +#define RTE_LOGTYPE_REORDER reorder_logtype + TAILQ_HEAD(rte_reorder_list, rte_tailq_entry); static struct rte_tailq_elem rte_reorder_tailq = { @@ -26,9 +29,6 @@ EAL_REGISTER_TAILQ(rte_reorder_tailq) #define RTE_REORDER_PREFIX "RO_" #define RTE_REORDER_NAMESIZE 32 -/* Macros for printing using RTE_LOG */ -#define RTE_LOGTYPE_REORDER RTE_LOGTYPE_USER1 - #define RTE_REORDER_SEQN_DYNFIELD_NAME "rte_reorder_seqn_dynfield" int rte_reorder_seqn_dynfield_offset = -1; From patchwork Mon Feb 20 18:49:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 124214 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id F367441CEE; Mon, 20 Feb 2023 19:50:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6952B430C7; Mon, 20 Feb 2023 19:50:10 +0100 (CET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id 0686F430CE for ; Mon, 20 Feb 2023 19:50:07 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id q5so2527295plh.9 for ; Mon, 20 Feb 2023 10:50:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=R9wIe9qMWy4gg4mMTnDLAbpI5lNgUox8Qod56/q4hzk=; b=POQh+xWuqpUXbMcPrJ/1iAbi7UhfAQsjm018q36mDC8mL/c4xJ5dX8eqdalV7/1jyg HbbvwAR/34HBRtb/ik6ZwjW26lc7FyKsqyOsekcb/+X5J+lZWwVrOwg1PdE85iOF+zUM SvrdF7dUBCCn2uMZKW2oE2rmoSm/v+S54tVHvhObEEC7Q8bKZzw0tNfSeGuFy1cWICzs q7/VQYgbCjRr57fF3O94qeBHAFYxrEubWvBL/1+Xv0AOtfH1ZUm5IzzN3c4AZERUil/R VgJxJpcc/bIs8jog/m8k1efhFT0DA6RxSl9OSW8WCcDADPX3i9t9CSJuoScfNYpXl9B2 UVaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R9wIe9qMWy4gg4mMTnDLAbpI5lNgUox8Qod56/q4hzk=; b=f4Zi+p5ElJGT/MZusYpoNuLPOBkJT3dLMvBkjxpf9ZhCCaUmlGaor28XbqmL3PTxQM VyAjZ8dZFB2RpcnKToA78eWVfwEX2ZEFtn/DcCzdW0URk56fnGTo9yGjh/H5JJQJmFqH ShWMYZEvJtij6VOwvl4QRrfwpCYswMFVXClfiy7oIa3ejMm613UsGXaBljgklWzl0o7q GuhdwTDLEAwRk9R07+2dNsfOVAh4xrxaXywrzrv6lJxuqR2gjjghtFqKxHgvq2qqCYPi uA2PNedNiS2iXzlONDpwYu3u0QYAzmDl+P+wdGimMsW0rmXCqHEacHwJlFSfff3P67cu hZvw== X-Gm-Message-State: AO0yUKVHY9pv3K67quA8lx8husNZNcwaKawyCpAArZClgTMVnNKegTP4 bVkJk55v94NWU5BiVZfSfXf9mMW7JKZFKO2fQLg= X-Google-Smtp-Source: AK7set/oAs6GSaL3qiqE9Z+7YYtsSiPZoRU91O+9+anBf9Ov4NgpUyzjFhPcVpDAztbgBdcqg5me0A== X-Received: by 2002:a17:902:ea11:b0:19a:b6b1:ca82 with SMTP id s17-20020a170902ea1100b0019ab6b1ca82mr2914322plg.10.1676919005853; Mon, 20 Feb 2023 10:50:05 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id n21-20020a170902969500b0019607547f29sm2020798plp.304.2023.02.20.10.50.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 10:50:05 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , reshma.pattan@intel.com Subject: [PATCH v6 3/5] latencystats: use dynamic logtype Date: Mon, 20 Feb 2023 10:49:59 -0800 Message-Id: <20230220185001.50714-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230220185001.50714-1-stephen@networkplumber.org> References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230220185001.50714-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Libraries should not reuse RTE_LOGTYPE_USER1 for their logging. Instead they should register their own type. Fixes: 5cd3cac9ed22 ("latency: added new library for latency stats") Cc: reshma.pattan@intel.com Signed-off-by: Stephen Hemminger --- lib/latencystats/rte_latencystats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/latencystats/rte_latencystats.c b/lib/latencystats/rte_latencystats.c index 8985a377db4e..f3c1746cca00 100644 --- a/lib/latencystats/rte_latencystats.c +++ b/lib/latencystats/rte_latencystats.c @@ -26,7 +26,8 @@ latencystat_cycles_per_ns(void) } /* Macros for printing using RTE_LOG */ -#define RTE_LOGTYPE_LATENCY_STATS RTE_LOGTYPE_USER1 +RTE_LOG_REGISTER_DEFAULT(latencystat_logtype, INFO); +#define RTE_LOGTYPE_LATENCY_STATS latencystat_logtype static uint64_t timestamp_dynflag; static int timestamp_dynfield_offset = -1; From patchwork Mon Feb 20 18:50:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 124215 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id 8266E41CEE; Mon, 20 Feb 2023 19:50:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F245430EC; Mon, 20 Feb 2023 19:50:14 +0100 (CET) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id 9FEBD430CE for ; Mon, 20 Feb 2023 19:50:07 +0100 (CET) Received: by mail-pl1-f181.google.com with SMTP id p1so490406plg.7 for ; Mon, 20 Feb 2023 10:50:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0XJ+g0kD2Qe+7BJbKO63/uCY6D20Y6WQZhAQwgT+Y2U=; b=rN5gMJIdJBbMNb362T7LqknMbxbC2pzDqU7AnIbhycMxmIDOB+EDnW/F5KfYUEl8Eb tmmVthdWl+A2RwB+my++tzTGF6H30WrOu+bZQiTSq+1w0I82eChBts3H8Qd9kalua2MG MyW7Ao6eev5iWAQNSUratrVYfMaca/m3GdKfKh4PzCOvY0609EUUVXVRjOuYdk5WHn55 J62LQqb1D6RkA7rBkyUHSBO5pEOUDgi4MHhRbGJVrPFkquYNzcsehiBXQ0FtYivbaIv+ rXwBiNEFyIKiFKPnbzdjM/YxWawh1iUI9RRqckKqKtHSJ4sAl9jshXW6cZ1951CscjR9 bxyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0XJ+g0kD2Qe+7BJbKO63/uCY6D20Y6WQZhAQwgT+Y2U=; b=LmcPEf4Z/NDOHAuc8Q8uhpjHxOu1Bc0Qn0xv0FMcn5RGO1fLMDgUWQnJf9BaIR4OCn HT3VXlHuwvK1KlA34LzWvYJXRLMHYwyMeFmVqw4hWc8Fak8ieQGQSxGVJFMwsl5SW4Lw t7XkLxH5sSvdla5H/yijN4EE3IFslaIrgu7loMvScTdtN0JGog7IOWX2p40giBTxTLyI fEzTOavJyA7eaQyu36jqcn65J0datyyg3lX96w+C+jI2QXCc+oetFsdM/0/cpslWa5r1 WYowqCX45Q2uKya5Jp7ACkM58zk0s83b17nc/SCosXjsMjThnV6Uhr2WLkZnIlJ662OY XKiA== X-Gm-Message-State: AO0yUKXbbTukkvfSgtQjfc+jt9uO5o0e7C/ZRrODpwH2wXPAFrorlwrC dAEXVkqzKBdMjhfb67fVydv8W13peZoPr/bAeKs= X-Google-Smtp-Source: AK7set8sS5LfJcOwockCvrmFk15V9yKOJEikOUMTUoh7lEu8tJ+RbjE9PtQ0iPL6gyxIPFhT3tbizg== X-Received: by 2002:a17:902:ebcf:b0:19b:98ce:48e6 with SMTP id p15-20020a170902ebcf00b0019b98ce48e6mr934707plg.6.1676919006830; Mon, 20 Feb 2023 10:50:06 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id n21-20020a170902969500b0019607547f29sm2020798plp.304.2023.02.20.10.50.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 10:50:06 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Chenbo Xia , Maxime Coquelin Subject: [PATCH v6 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Date: Mon, 20 Feb 2023 10:50:00 -0800 Message-Id: <20230220185001.50714-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230220185001.50714-1-stephen@networkplumber.org> References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230220185001.50714-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Fix instances of USER1 logtype in fdset and crypto sections. Acked-by: Chenbo Xia Reviewed-by: Maxime Coquelin Signed-off-by: Stephen Hemminger --- lib/vhost/fd_man.c | 4 ++-- lib/vhost/vhost_crypto.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/vhost/fd_man.c b/lib/vhost/fd_man.c index 1876fada3354..46037d02784e 100644 --- a/lib/vhost/fd_man.c +++ b/lib/vhost/fd_man.c @@ -10,8 +10,8 @@ #include "fd_man.h" - -#define RTE_LOGTYPE_VHOST_FDMAN RTE_LOGTYPE_USER1 +RTE_LOG_REGISTER_SUFFIX(vhost_fdset_logtype, fdset, INFO); +#define RTE_LOGTYPE_VHOST_FDMAN vhost_fdset_logtype #define FDPOLLERR (POLLERR | POLLHUP | POLLNVAL) diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c index f02bf865c349..ad420ea012d0 100644 --- a/lib/vhost/vhost_crypto.c +++ b/lib/vhost/vhost_crypto.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -16,6 +17,9 @@ #define IV_OFFSET (sizeof(struct rte_crypto_op) + \ sizeof(struct rte_crypto_sym_op)) +RTE_LOG_REGISTER_SUFFIX(vhost_crypto_logtype, crypto, INFO); +#define RTE_LOGTYPE_VHOST_CRYPTO vhost_crypto_logtype + #ifdef RTE_LIBRTE_VHOST_DEBUG #define VC_LOG_ERR(fmt, args...) \ RTE_LOG(ERR, USER1, "[%s] %s() line %u: " fmt "\n", \ From patchwork Mon Feb 20 18:50:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 124216 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id EE8CB41CEE; Mon, 20 Feb 2023 19:50:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF331430F2; Mon, 20 Feb 2023 19:50:15 +0100 (CET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id A55A3430D1 for ; Mon, 20 Feb 2023 19:50:08 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id l15so3679268pls.1 for ; Mon, 20 Feb 2023 10:50:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XQmC9K3TeXMgFqeLevvNO7XT0CzfA3gO5d2+9bnbNsc=; b=S5WJgS6vrMMGRBRz4YlJWYJNASL4A+wTkKw5jpON+1sAp5PMwii+wIXeO2+tjjUf7B rLAYqYNgya420DHiJA3sZBk1jV5Zc0wMBtRvz6t11xWADnV07EIIRrhd5JEpJb/4pNJ7 Ai6/Yc4xBuGSitouPeID9GmBzVOBq7IVA7TCRuYUd1tHwmLZcjtQKkQnWUXHs1r6wTgG lqahwLL68hUKnX2wMT7O+0UngxMt7Bcv4avrFoEAmtMlSjeues9Fhl9qEtRWXeJKbraG O+ZIR421DzmNbMdfmf8a2+sQ3j8Wo/1Qz7LsjSYsiVhW0AOSeFhwtrdFtToFwc47pAAa bWUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XQmC9K3TeXMgFqeLevvNO7XT0CzfA3gO5d2+9bnbNsc=; b=EVq37asNlMDpLpk2MWcMOaqY4L5SO38ejtmk+gLCkw5/ONzI5b72xLitZAAxwZeULG I73AJMDOHsFB6K3dKP210rZfK1A7IHGA/IE5cTVROJCRhGW0WDRMHFC93Smy3v01VXX8 ADpsTMQa/QrxEBmGv+n/jBkGQN9ndNg5Mj1ewrSWST9andpwVxDORyq3qeg0EZ3ZO2V9 v9eczmrQVk/ABLMleosvQbmRseLGo+9dx5/DI8hNeQFwUEuljdGRiWvQi2ZXouHA6n6C aWOSyrL2LXRQeSz9O5XcrcQlgEZPoAJAO3l1v4sANDLtxZAPucCbOPI9bcjyGXExOo7a UqrQ== X-Gm-Message-State: AO0yUKU2TLhpOexuRHWt9CZPr87q95ymaLUBYQaKg3QRoTW2r2ZQVuay KPzM/e3e4WtISBjkeeqirtcWGCa8ThHd8dB03Qc= X-Google-Smtp-Source: AK7set/TDtRHh6e6WB+ZXSwBlKswdOASfDb67EY/9jLutXytXi5UbZldWSfN/0RHKcxAIlSHa2iTiA== X-Received: by 2002:a17:903:24f:b0:19a:906a:e052 with SMTP id j15-20020a170903024f00b0019a906ae052mr1847531plh.64.1676919007646; Mon, 20 Feb 2023 10:50:07 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id n21-20020a170902969500b0019607547f29sm2020798plp.304.2023.02.20.10.50.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 10:50:07 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , kai.ji@intel.com Subject: [PATCH v6 5/5] ipsec: fix usage of RTE_LOGTYPE_USER1 Date: Mon, 20 Feb 2023 10:50:01 -0800 Message-Id: <20230220185001.50714-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230220185001.50714-1-stephen@networkplumber.org> References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230220185001.50714-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org There already is a logtype in this driver, use it! Fixes: b35848bc01f6 ("crypto/ipsec_mb: add multi-process IPC request handler") Cc: kai.ji@intel.com Signed-off-by: Stephen Hemminger --- drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c index 3e52f9567401..e9eb0d15b794 100644 --- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c +++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c @@ -7,6 +7,7 @@ #include #include +#include #include "ipsec_mb_private.h" @@ -125,7 +126,7 @@ ipsec_mb_secondary_qp_op(int dev_id, int qp_id, qp_req_msg.num_fds = 0; ret = rte_mp_request_sync(&qp_req_msg, &qp_resp, &ts); if (ret) { - RTE_LOG(ERR, USER1, "Create MR request to primary process failed."); + IPSEC_MB_LOG(ERR, "Create MR request to primary process failed."); return -1; } qp_resp_msg = &qp_resp.msgs[0];