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 2F11F436E3; Wed, 13 Dec 2023 17:40:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F90142F63; Wed, 13 Dec 2023 17:40:15 +0100 (CET) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mails.dpdk.org (Postfix) with ESMTP id 871BF42F04 for ; Wed, 13 Dec 2023 17:40:10 +0100 (CET) Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1d06d42a58aso66566715ad.0 for ; Wed, 13 Dec 2023 08:40:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1702485610; x=1703090410; 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=TFco7o1FJMnx1yCq0brlp2BMzPyjFA1RTumvD/FNmTY=; b=nfG6qZZwKIsan34G3PfrQM+aYOBwwyEuxqsTzqzbdwYiG1AQJvRSUGrHR13exuQio7 WUGphauZqjySVNpbu7yh+qrjdJ7vasI2L6XJxcVoYCBtuJThA4P/328kMgUaL+MNSWB9 tOCMtiZM0dbdfwtxYUCgKDKxqgqhUvlcWZnCgWaplZ2C2V/zQLkG4VcmvSnQ5HZ80rdN BVoR+UY1ZBj0UHAFXsUOAU4umHg1k96VCOH2I/Is8bwpNwIorDmc+SLHdPmo6mmHGgtS 0WxDXXEKsHPnqUWkZZz0HjTDH8fj2352zTK5mu8LFH6bWMZTLRQ7w6w/jMam9X/c4+oH 1HDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702485610; x=1703090410; 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=TFco7o1FJMnx1yCq0brlp2BMzPyjFA1RTumvD/FNmTY=; b=S2LFplth19WPah4RrfbpTAWXnmLXFcNr5KJroXQ5zek9qvUAyEm1ebrA3mFISymWuo QIqCmEiEv6uyftvqm2vhOYxfIT/7QMGK9O7IF1nhpQI/6cHCZjRAYvz3VB58BJSE0qPA OG8G3aBcIUMOyb9LDHYWu7fLLTTYAKDUxcTPRfU7sYCsLd1lYdq+rCbT8p+WT0vzfbpM TvkSkDF+sSL53Drr0QGw6USWp9u7b4YcR8LBvzCzvthQqnTsqazfxH/PFWjV5yfe5APr CZLEXp6J2XsYvpuQO1cS1Krni6GrwRFF6HBMD0bVxifmPKbyVbn5sPwQEbFHMRa/swbo c99A== X-Gm-Message-State: AOJu0YyQ8nVt39N/xkG1bXOa8bJgCgvKOZXa5gLpGBzAv/jKyK7HjJEe nj4WrkmdxIvF3jh7sCxReYa2E9acanUGJY+kyqw= X-Google-Smtp-Source: AGHT+IERFmoMVxDWDNT6Kg+8oE+4Cxq3aLvRY11dwjq043RbWn6MvnE8nndh03dWRbglFnxqABbKnQ== X-Received: by 2002:a17:902:784a:b0:1d3:49ba:501a with SMTP id e10-20020a170902784a00b001d349ba501amr1616406pln.12.1702485609752; Wed, 13 Dec 2023 08:40:09 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id 4-20020a170902c24400b001d0a6f31519sm10749593plg.188.2023.12.13.08.40.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 08:40:09 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao Subject: [PATCH v3 17/37] common/cnxk: replace RTE_LOG_DP with rte_log_dp Date: Wed, 13 Dec 2023 08:35:51 -0800 Message-ID: <20231213163820.894987-18-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231213163820.894987-1-stephen@networkplumber.org> References: <20231213014408.612051-1-stephen@networkplumber.org> <20231213163820.894987-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.43.0