DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Vijay Kumar Srivastava <vsrivast@xilinx.com>
Subject: [PATCH] net/sfc: replace of RTE_LOGTYPE_PMD
Date: Wed, 22 Feb 2023 19:10:20 -0800	[thread overview]
Message-ID: <20230223031021.167490-1-stephen@networkplumber.org> (raw)

The static LOGTYPE PMD will go away in the future.
Replace its use in the sfc driver with the same static
type as is already used in RTE_LOG_REGISTER macro.

These drivers are trying to do things that other drivers are not
in creating log types. IMHO it should follow the other driver
usage pattern. But this patch leaves the special code.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/sfc/sfc_ethdev.c | 2 +-
 drivers/vdpa/sfc/sfc_vdpa.c  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 2ec743ebce4a..320043145495 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -3231,5 +3231,5 @@ RTE_INIT(sfc_driver_register_logtype)
 
 	ret = rte_log_register_type_and_pick_level(SFC_LOGTYPE_PREFIX "driver",
 						   RTE_LOG_NOTICE);
-	sfc_logtype_driver = (ret < 0) ? RTE_LOGTYPE_PMD : ret;
+	sfc_logtype_driver = (ret < 0) ? RTE_LOGTYPE_EAL : ret;
 }
diff --git a/drivers/vdpa/sfc/sfc_vdpa.c b/drivers/vdpa/sfc/sfc_vdpa.c
index 53f598facc75..bd6ecde4507f 100644
--- a/drivers/vdpa/sfc/sfc_vdpa.c
+++ b/drivers/vdpa/sfc/sfc_vdpa.c
@@ -180,12 +180,12 @@ sfc_vdpa_register_logtype(const struct rte_pci_addr *pci_addr,
 		++lt_prefix_str_size; /* Reserve space for prefix separator */
 		lt_str_size_max = lt_prefix_str_size + PCI_PRI_STR_SIZE + 1;
 	} else {
-		return RTE_LOGTYPE_PMD;
+		return RTE_LOGTYPE_EAL;
 	}
 
 	lt_str = rte_zmalloc("logtype_str", lt_str_size_max, 0);
 	if (lt_str == NULL)
-		return RTE_LOGTYPE_PMD;
+		return RTE_LOGTYPE_EAL;
 
 	strncpy(lt_str, lt_prefix_str, lt_prefix_str_size);
 	lt_str[lt_prefix_str_size - 1] = '.';
@@ -196,7 +196,7 @@ sfc_vdpa_register_logtype(const struct rte_pci_addr *pci_addr,
 	ret = rte_log_register_type_and_pick_level(lt_str, ll_default);
 	rte_free(lt_str);
 
-	return ret < 0 ? RTE_LOGTYPE_PMD : ret;
+	return ret < 0 ? RTE_LOGTYPE_EAL : ret;
 }
 
 static int
-- 
2.39.1


             reply	other threads:[~2023-02-23  3:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23  3:10 Stephen Hemminger [this message]
2023-03-10 14:22 ` Andrew Rybchenko
2023-03-10 16:09   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230223031021.167490-1-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=vsrivast@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).