DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Vijay Kumar Srivastava <vsrivast@xilinx.com>
Subject: [PATCH 4/6] vdpa/sfc: remove use of EAL logtype
Date: Tue, 25 Jun 2024 14:24:12 +0200	[thread overview]
Message-ID: <20240625122414.1065829-5-david.marchand@redhat.com> (raw)
In-Reply-To: <20240625122414.1065829-1-david.marchand@redhat.com>

If registering a dynamic logtype fails at runtime, fall back to a
common logtype.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/vdpa/sfc/sfc_vdpa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/vdpa/sfc/sfc_vdpa.c b/drivers/vdpa/sfc/sfc_vdpa.c
index 9db87fcb7d..eda111954f 100644
--- a/drivers/vdpa/sfc/sfc_vdpa.c
+++ b/drivers/vdpa/sfc/sfc_vdpa.c
@@ -181,12 +181,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_EAL;
+		return sfc_vdpa_logtype_driver;
 	}
 
 	lt_str = rte_zmalloc("logtype_str", lt_str_size_max, 0);
 	if (lt_str == NULL)
-		return RTE_LOGTYPE_EAL;
+		return sfc_vdpa_logtype_driver;
 
 	strncpy(lt_str, lt_prefix_str, lt_prefix_str_size);
 	lt_str[lt_prefix_str_size - 1] = '.';
@@ -197,7 +197,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_EAL : ret;
+	return ret < 0 ? sfc_vdpa_logtype_driver : ret;
 }
 
 static int
-- 
2.45.2


  parent reply	other threads:[~2024-06-25 12:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25 12:24 [PATCH 0/6] Some drivers logging cleanups David Marchand
2024-06-25 12:24 ` [PATCH 1/6] vdpa/sfc: remove dead code David Marchand
2024-06-25 14:25   ` Andrew Rybchenko
2024-06-25 12:24 ` [PATCH 2/6] drivers: use dedicated log macros instead of EAL logtype David Marchand
2024-06-25 12:24 ` [PATCH 3/6] net/sfc: remove use " David Marchand
2024-06-25 14:26   ` Andrew Rybchenko
2024-06-25 12:24 ` David Marchand [this message]
2024-06-25 12:24 ` [PATCH 5/6] bus/pci: use a dynamic logtype David Marchand
2024-06-26  2:05   ` Chenbo Xia
2024-06-25 12:24 ` [PATCH 6/6] crypto/ccp: " David Marchand
2024-06-28 11:57   ` David Marchand
2024-07-03 14:55 ` [PATCH 0/6] Some drivers logging cleanups David Marchand

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=20240625122414.1065829-5-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --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).