From patchwork Mon Aug 14 16:31:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 130285 X-Patchwork-Delegate: david.marchand@redhat.com 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 5C91143066; Mon, 14 Aug 2023 18:31:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED292432A9; Mon, 14 Aug 2023 18:31:39 +0200 (CEST) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id F04A840A7F for ; Mon, 14 Aug 2023 18:31:37 +0200 (CEST) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1bddac1b7bfso8626835ad.0 for ; Mon, 14 Aug 2023 09:31:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692030697; x=1692635497; 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=39oi0XMZ/bSiInQ/m2Fwrvucyi+D0Ge2Q9c8CWxrhRc=; b=sUxWaezaz5phh1U5tbdcdx4xFG+pSdOaFbGo/LkXNQio1EjnevgPCITvA5w9NzAzza 07mT1IJlK7hLZtwS8LH+aIbJuOaRPHZ9VZOQL5zhm0uKgbqTengwjqy00k7R6IgQYhlr y07ZzjX/CJOC4X4E2UR6WcV6ZG8hyVWDn63hZ8tlUusM6n/2jjdC6LYSu86bZl4/1xta AeC5MRqmwcpBdwM6gCekQgae8d32edDhWqIFs6FYErCMzSSoVc/eZYHlCwXR4RQuZ1VW jMWagOnNqODb7S9ijnFAZGq4OLMkUEt6m2mqLJ/BYwyd/yl+7992+G30hu2D1UxbdL9c 8oyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692030697; x=1692635497; 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=39oi0XMZ/bSiInQ/m2Fwrvucyi+D0Ge2Q9c8CWxrhRc=; b=N5R4c/7FwdLsp+VDHLlOwPqZRoEcSmFbSj5ul7S+otaGrXIfrWAovjpR2NOhuA1Tf7 tYyKiofzhuWwxCf91CnYcYteAq60FnQ52mUDxsDq+KHbcVuV61x1XwMgTzAySF5NK0So bNeM1FTZZCK9lcUj4zfpLCIPVYmnOETA/Qao+KJxUT752NLfEnkhjBpxTLl46oFJP3cO POOfQBkRwpxzHQh/KrnWx9kOaAdHAfcNP3z6MMxZ32UPoAbPPsi0jnz8F+wAGgxGKoyj N/vKvGbrvKy6UOZnXEiWlA+LitsyRVuTSSIJUvJzCPYnUmjcJYiuOlE/UScTzkVrdkRq 24BA== X-Gm-Message-State: AOJu0YyyF74hAaYCRbBuqQvpEl7hHfkRbLYChfNFwjqxI3CMg09JAZf1 96AaR8qdS6m+QaFJBG0xf3hf9y9QKOJuogm+bm6ttTwPyw0= X-Google-Smtp-Source: AGHT+IFofbekXXZ7g8DtpiuSqvKl+hi6Pv0Pjzw/Ld45OP/fU28b8cME2Z0mEJ8BQaBTjbJcFzqjVQ== X-Received: by 2002:a17:902:d50c:b0:1bb:55be:e198 with SMTP id b12-20020a170902d50c00b001bb55bee198mr10856976plg.0.1692030696850; Mon, 14 Aug 2023 09:31:36 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id t10-20020a170902bc4a00b001bdd51748f8sm3892743plz.271.2023.08.14.09.31.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 09:31:36 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Konstantin Ananyev , Anatoly Burakov , Thomas Monjalon Subject: [PATCH v8 1/6] ip_frag: use a dynamic logtype Date: Mon, 14 Aug 2023 09:31:20 -0700 Message-Id: <20230814163125.63033-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230814163125.63033-1-stephen@networkplumber.org> References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230814163125.63033-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 | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/ip_frag/ip_frag_common.h b/lib/ip_frag/ip_frag_common.h index 7d6c1aa98d98..537bce7c3b62 100644 --- a/lib/ip_frag/ip_frag_common.h +++ b/lib/ip_frag/ip_frag_common.h @@ -18,9 +18,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..eed399da6bc5 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 @@ -52,20 +54,20 @@ rte_ip_frag_table_create(uint32_t bucket_num, uint32_t bucket_entries, if (rte_is_power_of_2(bucket_entries) == 0 || nb_entries > UINT32_MAX || nb_entries == 0 || nb_entries < max_entries) { - RTE_LOG(ERR, USER1, "%s: invalid input parameter\n", __func__); + RTE_LOG(ERR, IPFRAG, "%s: invalid input parameter\n", __func__); return NULL; } sz = sizeof (*tbl) + nb_entries * sizeof (tbl->pkt[0]); if ((tbl = rte_zmalloc_socket(__func__, sz, RTE_CACHE_LINE_SIZE, socket_id)) == NULL) { - RTE_LOG(ERR, USER1, + RTE_LOG(ERR, IPFRAG, "%s: allocation of %zu bytes at socket %d failed do\n", __func__, sz, socket_id); return NULL; } - RTE_LOG(INFO, USER1, "%s: allocated of %zu bytes at socket %d\n", + RTE_LOG(INFO, IPFRAG, "%s: allocated of %zu bytes at socket %d\n", __func__, sz, socket_id); tbl->max_cycles = max_cycles; From patchwork Mon Aug 14 16:31:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 130286 X-Patchwork-Delegate: david.marchand@redhat.com 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 88CE243066; Mon, 14 Aug 2023 18:31:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EC48F432B1; Mon, 14 Aug 2023 18:31:40 +0200 (CEST) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 18CA843270 for ; Mon, 14 Aug 2023 18:31:39 +0200 (CEST) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1bdef6f5449so4760055ad.3 for ; Mon, 14 Aug 2023 09:31:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692030698; x=1692635498; 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=zIjbnS0VA7c/0TNibr+87iA48OVWwN8D8hQ1p/gnmpk=; b=Naq/NRkzy1JzWyIWuP4W+fHA4EjPEdFn8dnbJuBrG4ZkFzsZ/BTX8euLXDOGe2ja+g NLj7J8OzFK/Uy3K6NINL464L86QYe9gonvrQETmpSCxeHbIN/fIheG1MhQ5GDed/j6Cx EB5nvAqny0mEUu3XS4zHT04wz1VlTubZG/rOGpsX+UdTmDw1xw7AjDGwjvUZC+2m8oKd eTZbzHwdPVH2RFMT8XgJLWu8cOTR31vB7UjgI2WwFp+2hWFjJb1ThMXw/AqsVzzn0YYI CdoCWY490hxeR08xiXtNodCEDwFtJG5cSWNCqLD3rx+bJqAWJRSUQcpnYIWYigCVN+tn JLNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692030698; x=1692635498; 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=zIjbnS0VA7c/0TNibr+87iA48OVWwN8D8hQ1p/gnmpk=; b=SYE4y363gxSOVuY1H31T4UA31ChweO9Q3UaKJQVPM5bmqpBnmljVAL6TX4fJlCG6HV LB2HkOEwEpgiXYFSR8U4qwvPLECU240c0uwZpK1E+MIO/uysMpkq+Eh5BKQLEI5TW8H8 9OYw0IlxO8bQhkMHvBgnP6hymLqVhrVZu4g1gmxau4zyh6iCayw7oLPy1bY9gwgACoN8 ZNguwJ7WEwkJJTnLtj+xEoITuycDvsrFH78/wCA/TeOZrkKDcg8ey2YY/lWnsQ6jI/F5 VuRiItAPWTe/xs9X9B+HpZFFE6mMPelcwk4CNaBrusj0O4Ssshgz4ww8DYXM8o2svOHx B7sA== X-Gm-Message-State: AOJu0YwlFAzsoiNb9q6qBKZ/MC1mPP9b/WGzaIvnal4gQuqdVtrdnt1L LZwt2eDf7zrtaBDUVtiHFuQsa1zOd7qZ0+Y6Dv2miL8EtvM= X-Google-Smtp-Source: AGHT+IHuMT39b5AurogduqnVR99aFDzkNVbn8/0P/owYu3LPyfme/ijzytWkO7L37X8RsZdXSYVzrQ== X-Received: by 2002:a17:902:7241:b0:1bb:961e:dfbc with SMTP id c1-20020a170902724100b001bb961edfbcmr9254558pll.20.1692030698043; Mon, 14 Aug 2023 09:31:38 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id t10-20020a170902bc4a00b001bdd51748f8sm3892743plz.271.2023.08.14.09.31.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 09:31:37 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , sergio.gonzalez.monroy@intel.com, Volodymyr Fialko , Reshma Pattan , Neil Horman , Richardson Bruce , Declan Doherty Subject: [PATCH v8 2/6] reorder: use a dynamic logtype Date: Mon, 14 Aug 2023 09:31:21 -0700 Message-Id: <20230814163125.63033-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230814163125.63033-1-stephen@networkplumber.org> References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230814163125.63033-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 Acked-by: Volodymyr Fialko --- 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 b5428d1f7bfa..640719c3ecf9 100644 --- a/lib/reorder/rte_reorder.c +++ b/lib/reorder/rte_reorder.c @@ -16,6 +16,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 = { @@ -27,9 +30,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 Aug 14 16:31:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 130287 X-Patchwork-Delegate: david.marchand@redhat.com 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 EF1A543066; Mon, 14 Aug 2023 18:31:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3ACA9432B6; Mon, 14 Aug 2023 18:31:42 +0200 (CEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id 01C75432AA for ; Mon, 14 Aug 2023 18:31:40 +0200 (CEST) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1bdc510e981so15547325ad.2 for ; Mon, 14 Aug 2023 09:31:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692030699; x=1692635499; 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=fNcvR3d+Xah/IBDLdHt1mxywfKv6Ei+qxoixbMYWsIU=; b=oK4ex43b/pmg90Mj9kTB/1PNteYuBwaMM1C7BmqDtjcl/Z5Kyk8X+qIAUlTm+TvXpj 52bDt6ZgbGlj9/yfot2fgS2EgzfRo+BNPpZJ2qHdkPHPGOYSmIuVCKcJREvaOXoxBCvV aSooMpxPbcf6RZhlYiqN7UOn9RUW4GBx65VtP1od3H/54kakCxcUN2afJ+LrbqkJNZiV 4Go17w5QndHMmzTBb2RWKXKcZG1PPoZVeXhtG2sHh/EJR5XWixuDMqzT3+RZ3AsobuOq vVz2QXvrGiNXCninZ7qKXTgtv+5YsV5PngZ79TI4rkZn2Mcm8O7qc1xTG4HgpS0/CqHQ tV8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692030699; x=1692635499; 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=fNcvR3d+Xah/IBDLdHt1mxywfKv6Ei+qxoixbMYWsIU=; b=SXD/cYJOm5wknL0wy/WgYrHPGZTerHPt+19cxFTvHHjfEQCr3B1g17tJHgFQF2b7+3 lM0kHU6rM6KvNgTVg8SvRdL+egYhDU5lbTEhTpnmKP99iWhdDlGm3b7XRn2s9nPbAFtd xyn6wVO2nATn29d9seEep1G2wOWIRBRLzBAV9u5cxO8F1V0jFSf7ad1K9AoeQR4LpIks 1fnxx5DArlbG1WAeA9uVnOAqOMIJodkaKjZ9ntpZnKGzXkEz3CiPOerc1pihH93gkdLJ /FalBGPFNXWMjT1bg6Q3dKCERL9zltlhlVaGD7zVOLP8FGl6ZOS0VqKJsNjMhcgGrNaj 7zcg== X-Gm-Message-State: AOJu0YwjFL0S9NvdKiP+LKOeqrf1JKVlx5xBDb7YiheV6W3ZFWvbfJhg XWZXUM1QvDII5EnbgkP2fKxJ0xndLHYcPuwEmMIiinnw600= X-Google-Smtp-Source: AGHT+IHogT5ZUJXjuNoIoQhcfQnw4lEnO5coRaY2xUX0K/VJx/ou+o+q9ib8HSCn3yDYwHVPXIlCOw== X-Received: by 2002:a17:903:18c:b0:1bb:a7bc:37a4 with SMTP id z12-20020a170903018c00b001bba7bc37a4mr12065365plg.24.1692030698963; Mon, 14 Aug 2023 09:31:38 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id t10-20020a170902bc4a00b001bdd51748f8sm3892743plz.271.2023.08.14.09.31.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 09:31:38 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , reshma.pattan@intel.com, Harry van Haaren , Remy Horton Subject: [PATCH v8 3/6] latencystats: use dynamic logtype Date: Mon, 14 Aug 2023 09:31:22 -0700 Message-Id: <20230814163125.63033-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230814163125.63033-1-stephen@networkplumber.org> References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230814163125.63033-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 Aug 14 16:31:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 130288 X-Patchwork-Delegate: david.marchand@redhat.com 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 6A24243066; Mon, 14 Aug 2023 18:32:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C1905432C2; Mon, 14 Aug 2023 18:31:43 +0200 (CEST) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 0ADBA432B3 for ; Mon, 14 Aug 2023 18:31:41 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1bdef6f5449so4760325ad.3 for ; Mon, 14 Aug 2023 09:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692030700; x=1692635500; 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=r4IBdO8mPpieUT+GGcwBMGKGXQaP8S3fRp5Hn0gKuIE=; b=ixvFQ1u4lzSyYIYrO6fe+A4KFVaOGwNkxVpmyfJsDvuQwK4dQEtemEksQNDMJH5SoD Amw0k4EyvVvF1750X3wRnrc0C//oIZfLk6QDJcO9TL6WdR+aGb13vg5oR4WjkAGhNc5H tigfSdwf3iZ5sSuIbbXtCFSlwz35vlNCg/WFUlGpFB2RxNSqKx80MJIbI6RF9UDjskSK C3YCJrddlYB1qd12DJllCd2YpibUbvNKSUMK6HgDZbdkANaV97X9xgEi3n/i3+BCvtaY 7GzdWGIZTNkxnv3u6kDo/FcagRNyRmlhZbP1inHLd2xFSqnXMyyEaeB6tfGTdyMmBOXz 9JrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692030700; x=1692635500; 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=r4IBdO8mPpieUT+GGcwBMGKGXQaP8S3fRp5Hn0gKuIE=; b=is6UaJ3Vcy1WxsyrzeWCl7h8WsMGIcYqbEIT7zOfua2gN0Stz5fUFcxLQmqAx9g1RK CfhgtQ558YGllaqWqmEaG5uVLJkkMxlzgi9aeJQ8myxK0zBldfWtbmDOOAmR8aeHBf1u 0ZWTe+I+Q9W+88g8elcCxA9tT8OIX3vXHHF1XkNKYc8iCSu4ysGnQ+R8eRVeAMk+drqb QfxxSEFLpHlxgS69Aa0fqfZ45na/vArxSSxZlZfpc8BDteuNOnXoNIHXeIO7oA6UufKJ Ry6dHE+7IlRM0LtJiVM5BAvVT3bhwlYlv3zcFcy+T2D3sK+WI73mqK42PTKk4cpyhy7O pwEQ== X-Gm-Message-State: AOJu0Yxk5qnkNPXMSK85Fgof+m/+JO+8iYKorkJgryqFtcCu3MP3NnuQ AU0mz5zjfimFaUXx6OzVonvsolB3QjHSgmZ0hizg4ObNKSY= X-Google-Smtp-Source: AGHT+IGaQ12TWP9gRj87dOR6PQjvAONSYF2Xjnpt7qT3LY8D5VnOnpPyJdQED+aSJBp4qtFDvej81g== X-Received: by 2002:a17:902:7798:b0:1b8:94f4:3e0 with SMTP id o24-20020a170902779800b001b894f403e0mr10907193pll.14.1692030699975; Mon, 14 Aug 2023 09:31:39 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id t10-20020a170902bc4a00b001bdd51748f8sm3892743plz.271.2023.08.14.09.31.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 09:31:39 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Chenbo Xia , Maxime Coquelin Subject: [PATCH v8 4/6] vhost: use logtype instead of RTE_LOGTYPE_USER1 Date: Mon, 14 Aug 2023 09:31:23 -0700 Message-Id: <20230814163125.63033-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230814163125.63033-1-stephen@networkplumber.org> References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230814163125.63033-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 | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 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 9bf5ef67b9ad..3e1ef1ac25eb 100644 --- a/lib/vhost/vhost_crypto.c +++ b/lib/vhost/vhost_crypto.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -16,22 +17,21 @@ #define IV_OFFSET (sizeof(struct rte_crypto_op) + \ sizeof(struct rte_crypto_sym_op)) -#ifdef RTE_LIBRTE_VHOST_DEBUG +RTE_LOG_REGISTER_SUFFIX(vhost_crypto_logtype, crypto, INFO); +#define RTE_LOGTYPE_VHOST_CRYPTO vhost_crypto_logtype + #define VC_LOG_ERR(fmt, args...) \ - RTE_LOG(ERR, USER1, "[%s] %s() line %u: " fmt "\n", \ - "Vhost-Crypto", __func__, __LINE__, ## args) + RTE_LOG(ERR, VHOST_CRYPTO, "%s() line %u: " fmt "\n", \ + __func__, __LINE__, ## args) #define VC_LOG_INFO(fmt, args...) \ - RTE_LOG(INFO, USER1, "[%s] %s() line %u: " fmt "\n", \ - "Vhost-Crypto", __func__, __LINE__, ## args) + RTE_LOG(INFO, VHOST_CRYPTO, "%s() line %u: " fmt "\n", \ + __func__, __LINE__, ## args) +#ifdef RTE_LIBRTE_VHOST_DEBUG #define VC_LOG_DBG(fmt, args...) \ - RTE_LOG(DEBUG, USER1, "[%s] %s() line %u: " fmt "\n", \ - "Vhost-Crypto", __func__, __LINE__, ## args) + RTE_LOG(DEBUG, VHOST_CRYPTO, "%s() line %u: " fmt "\n", \ + __func__, __LINE__, ## args) #else -#define VC_LOG_ERR(fmt, args...) \ - RTE_LOG(ERR, USER1, "[VHOST-Crypto]: " fmt "\n", ## args) -#define VC_LOG_INFO(fmt, args...) \ - RTE_LOG(INFO, USER1, "[VHOST-Crypto]: " fmt "\n", ## args) #define VC_LOG_DBG(fmt, args...) #endif From patchwork Mon Aug 14 16:31:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 130289 X-Patchwork-Delegate: david.marchand@redhat.com 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 0FD5E43066; Mon, 14 Aug 2023 18:32:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF0F1432C7; Mon, 14 Aug 2023 18:31:44 +0200 (CEST) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id 38972432B5 for ; Mon, 14 Aug 2023 18:31:42 +0200 (CEST) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1bdeb022738so5096845ad.0 for ; Mon, 14 Aug 2023 09:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692030701; x=1692635501; 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=jd6wlmQ/u8B0n1N70K7R+XkXxk14zqKnQXO/3kTE+i8=; b=FML1Xr53YLWIuxEjPjpp4k/rFCGPTvd9X4IlB+gfZ/2O2e+acu7/NpC+g7xH7WgBTg WTfOKd69BCyStF4tAgO37xwZap/vlVJNSRZlJ0eW6MUXFy7DX1JIQJqnIhwMr5liofi8 iCVdPlGp9AeYKNunsbxPxfaikau+LS2lF6BtBHP4TxGMUP0I7y6vENaQrdthy64nc59s JGfOL7asCqK/1lL9vTX4HXFaSjuboQ8rXZLcUmtGjhESdrWP6p6ijikTf/hrIep6iP+H 5OmU/jF0xo+F4X9Vk6W+S/5I0jUZtKA6OQCDJ2TxcbRvPPsbl7j99OJS56dJxpCeGlkT 064g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692030701; x=1692635501; 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=jd6wlmQ/u8B0n1N70K7R+XkXxk14zqKnQXO/3kTE+i8=; b=PJVkCzsRfXcUj8ApxXv7/dfK16PBAilEoavILwrxzABZfD4iveuhfgkh15hZ3ZUCDO bK6aWZX9vs8YyMrCaxrRaPaE1GIx8jv9VPpJeVdYOSLFUStnfx80Ln+tfKQhwi+a7tNl 1WOdPYz4YN6XfoinYR3gNnGqG23Y4y+FBl36aIWJFOMC37OlIrRylJL9BNVroo9lT+14 VT165aRmc7SuBeCbVFZGPHQ8wYk7w4J7UrV7tQ/5s/MLmwmTiCyWIa5MDKQ2/Jc1uHJ8 g783GYW+ZrGAB8XwBdJXpUheJkNI83x0l4WdNe1LWG3cBaixY3xEFcyUIU9lWtn7vhyv o+5g== X-Gm-Message-State: AOJu0YxkT0UBf99wxksahvUoL3QoS3BJa/Nbm0tLSIyK703DRRiDFDbr ODXOYOLOelJ+sJsNN2qmQLGv0iGlYHS/+DRMSKOMLHqlge4= X-Google-Smtp-Source: AGHT+IGlYWav+v32wE3er045Ic3+iVxIZ2bfi5mC+/NAqJ91rGMna+nfOWMBimIen0xvTPg6KjJJFw== X-Received: by 2002:a17:902:da89:b0:1bb:c9e3:6d4f with SMTP id j9-20020a170902da8900b001bbc9e36d4fmr13260961plx.10.1692030701163; Mon, 14 Aug 2023 09:31:41 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id t10-20020a170902bc4a00b001bdd51748f8sm3892743plz.271.2023.08.14.09.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 09:31:40 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , kai.ji@intel.com, Pablo de Lara , Arkadiusz Kusztal Subject: [PATCH v8 5/6] ipsec: fix usage of RTE_LOGTYPE_USER1 Date: Mon, 14 Aug 2023 09:31:24 -0700 Message-Id: <20230814163125.63033-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230814163125.63033-1-stephen@networkplumber.org> References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230814163125.63033-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 30f919cd402d..52d6d010c788 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]; From patchwork Mon Aug 14 16:31:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 130290 X-Patchwork-Delegate: david.marchand@redhat.com 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 1418E43066; Mon, 14 Aug 2023 18:32:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D9919432B3; Mon, 14 Aug 2023 18:31:45 +0200 (CEST) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id 20697432B8 for ; Mon, 14 Aug 2023 18:31:43 +0200 (CEST) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1bc83a96067so27330375ad.0 for ; Mon, 14 Aug 2023 09:31:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692030702; x=1692635502; 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=cXiZn8u9cebhXEgLucvXyQz1KDgBC05ZySJTpwfrLZ4=; b=wb2KVsu0KzZuDupA404y3rNKp9aHteH/SDN6DlrsLdwukJoeC4NDqWEtAbvfEQdCXe 39eDXuErGjUv58+tvc06tq8eFjISGGTSwRsht9YDbGx+KWVUfMHTtLMjfCdr57ZTpzDt Tt+cA7njS3Q+UUwBL+6HWz2umDozWvytGY4yFsQ0t1NBsM3tm0j4dFsqBivwPUD+Xv86 UfpxPXq4zVEDI8gKT0rGiPZ9bvPYWhOeTHlCgqGE4PDShf/BrLS6wMzjz301Mtxl15Mz vwyEOAd/scx0rCEr3PnVsAVlQk5cyoyXMCKGfUQNxBzfe9x1jxF3nDbG5sSzW4/KCWeY Uu5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692030702; x=1692635502; 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=cXiZn8u9cebhXEgLucvXyQz1KDgBC05ZySJTpwfrLZ4=; b=QfP6sMY7qFxttHoRgveWOeOE6abaSlw2hkS5Wm+9VzcspALwmSPrn7MOOGzcVICya3 8f9iId0s3cPhFsgeVdwTEmgKoq8DJv3wSMHcfrNfy1VdzsRbbYCNGatoOWVjvdAetnyJ F6/9CwUp/JxX68TtZF+UizX5MP5cqQVJvHBRbtRuN+E94dqL8EsAxwneNP9TwMd9u0gC KMwW4tt7V1n0nrN2yS2wvcyL+CGBXPi1TwemoITOOF7GnVqi4d9k3jqdQJkQ2AN9uNHx SxMc21Gfr3FmehNB2F0UZ188xYbjzLXNjVP5zC5kiDwelyu9DprYdxPjVrm6j0E1snp3 YUpQ== X-Gm-Message-State: AOJu0YwePdX159f34RgCdNuPFUwpyKlQU3IegbTfya3AGy9/9ndA47oZ iBsMzugGVyJWTFq0nppbrt+QSPuAKKHOiZTjcYcr+rZlrPs= X-Google-Smtp-Source: AGHT+IFRXg9Ua6edUZzcNiAhBW8QqFm9xN1YLCcSnR3vT6lFmS0BeAwOT5LnBEfXhlgqNzNyGoR3rg== X-Received: by 2002:a17:902:f803:b0:1bd:ecb4:5a2d with SMTP id ix3-20020a170902f80300b001bdecb45a2dmr1555092plb.42.1692030702092; Mon, 14 Aug 2023 09:31:42 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id t10-20020a170902bc4a00b001bdd51748f8sm3892743plz.271.2023.08.14.09.31.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 09:31:41 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anatoly Burakov , David Hunt , Alan Carew , Pablo de Lara Subject: [PATCH v8 6/6] power: use a dynamic logtype for guest channel Date: Mon, 14 Aug 2023 09:31:25 -0700 Message-Id: <20230814163125.63033-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230814163125.63033-1-stephen@networkplumber.org> References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230814163125.63033-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. Fixes: cd0d5547e873 ("power: vm communication channels in guest") Signed-off-by: Stephen Hemminger --- lib/power/guest_channel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/power/guest_channel.c b/lib/power/guest_channel.c index 7b2ae0b6506f..cc05347425da 100644 --- a/lib/power/guest_channel.c +++ b/lib/power/guest_channel.c @@ -17,7 +17,8 @@ #include "guest_channel.h" -#define RTE_LOGTYPE_GUEST_CHANNEL RTE_LOGTYPE_USER1 +RTE_LOG_REGISTER_SUFFIX(guest_channel_logtype, guest_channel, INFO); +#define RTE_LOGTYPE_GUEST_CHANNEL guest_channel_logtype /* Timeout for incoming message in milliseconds. */ #define TIMEOUT 10