bus/cdx: silence bus scan when CDX is unavailable

Message ID 20230609111109.2877000-1-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series bus/cdx: silence bus scan when CDX is unavailable |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing fail Testing issues
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-aarch-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

David Marchand June 9, 2023, 11:11 a.m. UTC
  Absence of the CDX bus is not an error.

Bugzilla ID: 1246
Fixes: 45ef232af515 ("bus/cdx: introduce AMD CDX bus")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/bus/cdx/cdx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Gupta, Nipun June 9, 2023, 11:14 a.m. UTC | #1
[Public]

Acked-by: Nipun Gupta <nipun.gupta@amd.com>

> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Friday, June 9, 2023 4:41 PM
> To: dev@dpdk.org
> Cc: Gupta, Nipun <Nipun.Gupta@amd.com>; Agarwal, Nikhil
> <nikhil.agarwal@amd.com>; Yigit, Ferruh <Ferruh.Yigit@amd.com>
> Subject: [PATCH] bus/cdx: silence bus scan when CDX is unavailable
>
> Absence of the CDX bus is not an error.
>
> Bugzilla ID: 1246
> Fixes: 45ef232af515 ("bus/cdx: introduce AMD CDX bus")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  drivers/bus/cdx/cdx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/bus/cdx/cdx.c b/drivers/bus/cdx/cdx.c
> index 9607096d18..28bbf92ed5 100644
> --- a/drivers/bus/cdx/cdx.c
> +++ b/drivers/bus/cdx/cdx.c
> @@ -268,9 +268,9 @@ cdx_scan(void)
>
>       dir = opendir(RTE_CDX_BUS_DEVICES_PATH);
>       if (dir == NULL) {
> -             CDX_BUS_ERR("%s(): opendir failed: %s", __func__,
> +             CDX_BUS_INFO("%s(): opendir failed: %s", __func__,
>                       strerror(errno));
> -             return -1;
> +             return 0;
>       }
>
>       while ((e = readdir(dir)) != NULL) {
> --
> 2.40.1
  
David Marchand June 9, 2023, 1:20 p.m. UTC | #2
On Fri, Jun 9, 2023 at 1:14 PM Gupta, Nipun <Nipun.Gupta@amd.com> wrote:
> > Absence of the CDX bus is not an error.
> >
> > Bugzilla ID: 1246
> > Fixes: 45ef232af515 ("bus/cdx: introduce AMD CDX bus")
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Nipun Gupta <nipun.gupta@amd.com>

Applied.
  

Patch

diff --git a/drivers/bus/cdx/cdx.c b/drivers/bus/cdx/cdx.c
index 9607096d18..28bbf92ed5 100644
--- a/drivers/bus/cdx/cdx.c
+++ b/drivers/bus/cdx/cdx.c
@@ -268,9 +268,9 @@  cdx_scan(void)
 
 	dir = opendir(RTE_CDX_BUS_DEVICES_PATH);
 	if (dir == NULL) {
-		CDX_BUS_ERR("%s(): opendir failed: %s", __func__,
+		CDX_BUS_INFO("%s(): opendir failed: %s", __func__,
 			strerror(errno));
-		return -1;
+		return 0;
 	}
 
 	while ((e = readdir(dir)) != NULL) {