From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2BB7B41CFC; Tue, 21 Feb 2023 11:39:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18009431BD; Tue, 21 Feb 2023 11:39:43 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 62598406A2 for ; Tue, 21 Feb 2023 11:39:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676975981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3n02q3sKoT6WkiBYwd5K81KH1ugK4q/QsJFEIV/p16M=; b=GMx5a3OPbltsgkIqHQXS4BYW8HsyyXPVzrKF/p/CEhl+t5YcLujjXtbMA+HHF1m42+li75 gToobL3aEg/aSF9W5WJBMGm3kh4n6X5U9oODpdmDXX6s93VPWri9qP+UudQWkHDS61w5iu u4U2eEePySYGhht1l0qJ11lbam40SXk= Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-584-D-2XUmhjOgSCN2lPtBqMKQ-1; Tue, 21 Feb 2023 05:39:40 -0500 X-MC-Unique: D-2XUmhjOgSCN2lPtBqMKQ-1 Received: by mail-pj1-f69.google.com with SMTP id i6-20020a17090a650600b002372da4819eso129848pjj.0 for ; Tue, 21 Feb 2023 02:39:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1676975979; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3n02q3sKoT6WkiBYwd5K81KH1ugK4q/QsJFEIV/p16M=; b=BR59ObVX7bSdVPm601HcIuNZ+BFqNMITrcAJCiq3BQM/wFibDjjYhaqJy5q1t5Pg61 g2EkocPtFlFd0j6W+KFXMVZF3cbBUjoyYBSAtC16JB6shSDLztUaG20Dc5Mokh/rzVR8 2xZv3OJdLq3u/QkRuHOSwfQne37r5hpECqwgZnkreFbMvymMXeoWNkv62amW/Tm6/+Nc 0crxaixcG/Xxq1+cmCjVLiMZKBn8Jaf+9zWkMhmtjDZ6ZYXVyz4JF/NO+t+3wNLoCOsm 3zgOQ8V0Zs2tZnmT4JPOLnYru5pHQf6ObbPfDwCly0dnNP/sST/OY7o48bCxwIMn3NNh ZsvQ== X-Gm-Message-State: AO0yUKU3x1o90jq8HYNTz75wUxoFcMn5JioqpE2NXjA9Tkq7kNFf/+6o 3ywv7I373QexaW7bKV9hbN3LGwfyh6jDHKy5z8xNd4W2kfpHM0JD8wmoWk0HJqsggSweYVkuOi9 /X5TDlEMi28GOGMlHW1E= X-Received: by 2002:aa7:9416:0:b0:5a8:bd3d:3274 with SMTP id x22-20020aa79416000000b005a8bd3d3274mr420814pfo.55.1676975979489; Tue, 21 Feb 2023 02:39:39 -0800 (PST) X-Google-Smtp-Source: AK7set8Ds3FmfpCcjcHd6DRxv052v8ycEnAcih8ev2RLuSUD9wcJYMMVML8SJ/zvdA/YrQbp6c7wm/BVae2AXsftCDo= X-Received: by 2002:aa7:9416:0:b0:5a8:bd3d:3274 with SMTP id x22-20020aa79416000000b005a8bd3d3274mr420811pfo.55.1676975979086; Tue, 21 Feb 2023 02:39:39 -0800 (PST) MIME-Version: 1.0 References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230220185001.50714-1-stephen@networkplumber.org> <20230220185001.50714-5-stephen@networkplumber.org> In-Reply-To: <20230220185001.50714-5-stephen@networkplumber.org> From: David Marchand Date: Tue, 21 Feb 2023 11:39:27 +0100 Message-ID: Subject: Re: [PATCH v6 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 To: Stephen Hemminger Cc: dev@dpdk.org, Chenbo Xia , Maxime Coquelin X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 On Mon, Feb 20, 2023 at 7:50 PM Stephen Hemminger wrote: > > 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 Oh, I did not follow the previous revisions, but now that I see this, nice hack. > > #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", \ However, there is something missing here. Existing code was directly using RTE_LOGTYPE_USER1. We still need to update: diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c index ad420ea012..d2b4af1d1c 100644 --- a/lib/vhost/vhost_crypto.c +++ b/lib/vhost/vhost_crypto.c @@ -22,20 +22,20 @@ RTE_LOG_REGISTER_SUFFIX(vhost_crypto_logtype, crypto, INFO); #ifdef RTE_LIBRTE_VHOST_DEBUG #define VC_LOG_ERR(fmt, args...) \ - RTE_LOG(ERR, USER1, "[%s] %s() line %u: " fmt "\n", \ + RTE_LOG(ERR, VHOST_CRYPTO, "[%s] %s() line %u: " fmt "\n", \ "Vhost-Crypto", __func__, __LINE__, ## args) #define VC_LOG_INFO(fmt, args...) \ - RTE_LOG(INFO, USER1, "[%s] %s() line %u: " fmt "\n", \ + RTE_LOG(INFO, VHOST_CRYPTO, "[%s] %s() line %u: " fmt "\n", \ "Vhost-Crypto", __func__, __LINE__, ## args) #define VC_LOG_DBG(fmt, args...) \ - RTE_LOG(DEBUG, USER1, "[%s] %s() line %u: " fmt "\n", \ + RTE_LOG(DEBUG, VHOST_CRYPTO, "[%s] %s() line %u: " fmt "\n", \ "Vhost-Crypto", __func__, __LINE__, ## args) #else #define VC_LOG_ERR(fmt, args...) \ - RTE_LOG(ERR, USER1, "[VHOST-Crypto]: " fmt "\n", ## args) + RTE_LOG(ERR, VHOST_CRYPTO, "[VHOST-Crypto]: " fmt "\n", ## args) #define VC_LOG_INFO(fmt, args...) \ - RTE_LOG(INFO, USER1, "[VHOST-Crypto]: " fmt "\n", ## args) + RTE_LOG(INFO, VHOST_CRYPTO, "[VHOST-Crypto]: " fmt "\n", ## args) #define VC_LOG_DBG(fmt, args...) #endif -- David Marchand