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 6E136436D9; Wed, 13 Dec 2023 05:21:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5019342F13; Wed, 13 Dec 2023 05:19:44 +0100 (CET) Received: from mail-il1-f181.google.com (mail-il1-f181.google.com [209.85.166.181]) by mails.dpdk.org (Postfix) with ESMTP id 001AC42EFC for ; Wed, 13 Dec 2023 05:19:39 +0100 (CET) Received: by mail-il1-f181.google.com with SMTP id e9e14a558f8ab-35da160de2bso27733235ab.1 for ; Tue, 12 Dec 2023 20:19:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1702441179; x=1703045979; darn=dpdk.org; 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=ZuhXcvHq53sKp2zK23T/THWnQxSWE05PvyXsYLi5Rnc=; b=Xdok72ltGLvuDdpxdxc4QuqRwVae3MWSMZdZ2F75LaPVq4uMKF8gmaXvmA6ta4Lvim HsNBOowlxIolX0FYLPweyx6kJy+lMglhDNrvpaPc98StKv1KdGb5D+2kkNEVKIJ4r1Yl sdt9RiavZuvPV6SKcwHmlLKNWoPL99ZSMw4wjs0uuthUA8MGtjCCHSLlhQBEgDnG6IhZ Y1jJCNlg1Loym+jPCfOMkC6H2sy30j8FXoPQMK47seoWuONkpG/A/3Z02GwrdFKfFpY9 26AX5AvTLC2SUmDXfW824VQ7Ir1cHAKT00igjQ3kclNVFeXChEHHVy7w2W/qTfb/i5Fl LsQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702441179; x=1703045979; 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=ZuhXcvHq53sKp2zK23T/THWnQxSWE05PvyXsYLi5Rnc=; b=W+ivVdwYX/ozf7Q53G/7aVTdKD5HH6rjPxgwzlCdc/as82xXCxW8bx5tGVFY5cmqpJ qwsKDnWSZIbE7ZJh+5BoqxCtLbe6JPzXvz1+8Hh8BxgkELR/aOKc4JwOOahxBnmarWCo UO8Nl4kWAHoGdHuo3KXON0afoHgSFuKeSrmog0+N3Rg5EfcJCko5ZHcxhpkh3CvjR2o1 BHfXxAGovBuHHYDNGfSTo8m4zIlypNN4QkAJbk6Vtbxyj+u7ABFjIitbQEzGK7yIys7s apC32ODzsSGdhzEzo01lo117ymoE5R3ofkYwgf883dDgbi/mkEDNsfK9Fu3sV4y7PSUy ux5w== X-Gm-Message-State: AOJu0YysqqhyJFPaXn5kCIOzf2eVWmsoDs7h2DRBTgUyaq/FgFagmA5f ZBHWcxg4DylMko1IObtPB+637KDsx2qPK1zkdzE= X-Google-Smtp-Source: AGHT+IGlG5nCOVfftAfuXqL8E7YmeU5f6GxnmhLJTfs37oOWOk6PghytMnxQgYwFbWQ+RvN9EXjfoQ== X-Received: by 2002:a05:6e02:1d0f:b0:35d:6ac4:a430 with SMTP id i15-20020a056e021d0f00b0035d6ac4a430mr11852940ila.50.1702441179402; Tue, 12 Dec 2023 20:19:39 -0800 (PST) Received: from hermes.lan (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id p12-20020a170902e74c00b001d077da4ac4sm9340888plf.212.2023.12.12.20.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 20:19:39 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao Subject: [PATCH v2 17/25] common/cnxk: replace RTE_LOG_DP with rte_log_dp Date: Tue, 12 Dec 2023 20:16:44 -0800 Message-ID: <20231213041920.729403-18-stephen@networkplumber.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231213041920.729403-1-stephen@networkplumber.org> References: <20231213014408.612051-1-stephen@networkplumber.org> <20231213041920.729403-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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Want datapath logs to use own logtype. Signed-off-by: Stephen Hemminger --- drivers/common/cnxk/roc_platform.h | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/drivers/common/cnxk/roc_platform.h b/drivers/common/cnxk/roc_platform.h index ba23b2e0d79e..9461f6e93304 100644 --- a/drivers/common/cnxk/roc_platform.h +++ b/drivers/common/cnxk/roc_platform.h @@ -265,11 +265,13 @@ extern int cnxk_logtype_tm; extern int cnxk_logtype_ree; extern int cnxk_logtype_dpi; -#define plt_err(fmt, args...) \ - RTE_LOG(ERR, PMD, "%s():%u " fmt "\n", __func__, __LINE__, ##args) -#define plt_info(fmt, args...) RTE_LOG(INFO, PMD, fmt "\n", ##args) -#define plt_warn(fmt, args...) RTE_LOG(WARNING, PMD, fmt "\n", ##args) -#define plt_print(fmt, args...) RTE_LOG(INFO, PMD, fmt "\n", ##args) +#define plt_log(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, cnxk_logtype_base, \ + "%s():%u " fmt "\n", __func__, __LINE__, ##args) +#define plt_err(fmt, ...) plt_log(ERR, fmt, ##__VA_ARGS__) +#define plt_info(fmt, ...) plt_log(INFO, fmt, ##__VA_ARGS__) +#define plt_warn(fmt, ...) plt_log(WARNING, fmt, ##__VA_ARGS__) +#define plt_print(fmt, ...) plt_log(INFO, fmt, ##__VA_ARGS__) #define plt_dump(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__) #define plt_dump_no_nl(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__) @@ -278,8 +280,7 @@ extern int cnxk_logtype_dpi; */ #define plt_dbg(subsystem, fmt, args...) \ rte_log(RTE_LOG_DEBUG, cnxk_logtype_##subsystem, \ - "[%s] %s():%u " fmt "\n", #subsystem, __func__, __LINE__, \ -##args) + "[%s] %s():%u " fmt "\n", #subsystem, __func__, __LINE__, ##args) #define plt_base_dbg(fmt, ...) plt_dbg(base, fmt, ##__VA_ARGS__) #define plt_cpt_dbg(fmt, ...) plt_dbg(cpt, fmt, ##__VA_ARGS__) @@ -295,12 +296,13 @@ extern int cnxk_logtype_dpi; #define plt_dpi_dbg(fmt, ...) plt_dbg(dpi, fmt, ##__VA_ARGS__) /* Datapath logs */ -#define plt_dp_err(fmt, args...) \ - RTE_LOG_DP(ERR, PMD, "%s():%u " fmt "\n", __func__, __LINE__, ##args) -#define plt_dp_info(fmt, args...) \ - RTE_LOG_DP(INFO, PMD, "%s():%u " fmt "\n", __func__, __LINE__, ##args) -#define plt_dp_dbg(fmt, args...) \ - RTE_LOG_DP(DEBUG, PMD, "%s():%u " fmt "\n", __func__, __LINE__, ##args) +#define plt_dp_log(level, fmt, args...) \ + rte_log_dp(RTE_LOG_ ## level, cnxk_logtype_base, \ + "%s():%u " fmt "\n", __func__, __LINE__, ## args) + +#define plt_dp_err(fmt, ...) plt_dp_log(ERR, fmt, ##__VA_ARGS__) +#define plt_dp_info(fmt, ...) plt_dp_log(INFO, fmt, ##__VA_ARGS__) +#define plt_dp_dbg(fmt, ...) plt_dp_log(DEBUG, fmt, ##__VA_ARGS__) #ifdef __cplusplus #define CNXK_PCI_ID(subsystem_dev, dev) \ -- 2.42.0