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 82358436D8; Wed, 13 Dec 2023 02:47:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4360442EAB; Wed, 13 Dec 2023 02:47:01 +0100 (CET) Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) by mails.dpdk.org (Postfix) with ESMTP id CF9CA42E8C for ; Wed, 13 Dec 2023 02:46:56 +0100 (CET) Received: by mail-ot1-f41.google.com with SMTP id 46e09a7af769-6d9f7af8918so3474227a34.0 for ; Tue, 12 Dec 2023 17:46:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1702432016; x=1703036816; 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=1EutKak0K3yZ0KuxYdnXr4d6T/GNRZZfPq1SrgpNXtfwkykEumdALYNZHGlwof/ow1 EfKyXs5l22ZMS0zQjjCjUKmDbbeT6hzk16fNdKNwMDMA1ktRp0Il3FehL//s0BlgMT5g vNFNFOssjU7yQOWDMf4Zq+hmQro/BQuCVNf3EvWMdkKN9v8Zb1IWxmgnuArhHnvLFFSZ 38xGyT5jmG3ru7/h8Y4R8xE9x80LL/8fyGqmQkaaddFc0T52XyUt00MygxJcFKAOCkky ltVNhk2vmFZSWompjijakgM0s6kbE35pkc/D6hzymf4mFr9WztHDgf4rvP+Bu7xy6sAg uZaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702432016; x=1703036816; 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=qszLfAKNpP74FHM7wD9c9dcl+3LOKl56LHcbcbYEWZTo25g0H6zNhJ6lKHF3n4DFgK cHAX6nl3BO9G1jF8lZMOKHv56IybzpDKhAa6tqt1+Nh9hF3yZ1J155vDR60Qkg0H3nB8 HIk0wKv63CuBWtT9pcKlN2RtLCVVOYoAh1PxilwnZtdOXnUI6ESh27Y0/LaF5d9G9TYY 29U6Mg+/EwrmZ9kSsfgpsuMfUKgy70HWn3gSRgReBQgQbmJiDig54qBhdHhy2+g8AsvU ximuwYXhH/PUAD882HZ/TkNWxY9/x0jIIBM2yV/kwvOov4cEHtX8yttM6gahg7qV9krC Ml8g== X-Gm-Message-State: AOJu0YyX1emkhsJhQPOP/reBLk6QoUEImnmuVIWYFtVU0rZLUPtcAV5c envQzuYA4t3C4Hv8Vfij5h/K3HIcnDBdDcYpFL+kXA== X-Google-Smtp-Source: AGHT+IH9t4jC+CauOMora/+ljZDbM2dbrkvS+A1y5Rgz/HIu5Cpj+pG+PRG32WJ8M9DH+RNt6a9Oyw== X-Received: by 2002:a05:6830:1dba:b0:6d9:da9f:ab43 with SMTP id z26-20020a0568301dba00b006d9da9fab43mr6854037oti.32.1702432016256; Tue, 12 Dec 2023 17:46:56 -0800 (PST) Received: from hermes.lan (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id f7-20020aa79d87000000b006ce5b4ade28sm8988375pfq.174.2023.12.12.17.46.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 17:46:55 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao Subject: [PATCH 18/26] common/cnxk: replace RTE_LOG_DP with rte_log_dp Date: Tue, 12 Dec 2023 17:42:34 -0800 Message-ID: <20231213014408.612051-19-stephen@networkplumber.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231213014408.612051-1-stephen@networkplumber.org> References: <20231213014408.612051-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