common/cnxk: show more detailed info on model mismatch

Message ID 20220224103422.1425044-1-tduszynski@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series common/cnxk: show more detailed info on model mismatch |

Checks

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

Commit Message

Tomasz Duszynski Feb. 24, 2022, 10:34 a.m. UTC
  Model is uniquely identified by 4 numbers. Print them all in case
model being populated is not on a list of known models. This makes
debugging a bit easier.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
---
 drivers/common/cnxk/roc_model.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Jerin Jacob Feb. 24, 2022, 8:36 p.m. UTC | #1
On Thu, Feb 24, 2022 at 4:04 PM Tomasz Duszynski <tduszynski@marvell.com> wrote:
>
> Model is uniquely identified by 4 numbers. Print them all in case
> model being populated is not on a list of known models. This makes
> debugging a bit easier.
>
> Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
> Reviewed-by: Jakub Palider <jpalider@marvell.com>
> Reviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>


Updated the git commit as follows and applied to
dpdk-next-net-mrvl/for-next-net. Thanks

    common/cnxk: show more detailed info on model mismatch

    Model is uniquely identified by 4 numbers. Print them all in case
    model being populated is not on a list of known models. This makes
    debugging a bit easier.

    Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
    Reviewed-by: Jakub Palider <jpalider@marvell.com>
    Reviewed-by: Jerin Jacob <jerinj@marvell.com>
> ---
>  drivers/common/cnxk/roc_model.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/common/cnxk/roc_model.c b/drivers/common/cnxk/roc_model.c
> index 447dc6e8bc..49617c02b7 100644
> --- a/drivers/common/cnxk/roc_model.c
> +++ b/drivers/common/cnxk/roc_model.c
> @@ -132,7 +132,8 @@ populate_model(struct roc_model *model, uint32_t midr)
>         if (!found) {
>                 model->flag = 0;
>                 strncpy(model->name, "unknown", ROC_MODEL_STR_LEN_MAX - 1);
> -               plt_err("Invalid RoC model (impl=0x%x, part=0x%x)", impl, part);
> +               plt_err("Invalid RoC model (impl=0x%x, part=0x%x, major=0x%x, minor=0x%x)",
> +                       impl, part, major, minor);
>         }
>
>         return found;
> --
> 2.25.1
>
  

Patch

diff --git a/drivers/common/cnxk/roc_model.c b/drivers/common/cnxk/roc_model.c
index 447dc6e8bc..49617c02b7 100644
--- a/drivers/common/cnxk/roc_model.c
+++ b/drivers/common/cnxk/roc_model.c
@@ -132,7 +132,8 @@  populate_model(struct roc_model *model, uint32_t midr)
 	if (!found) {
 		model->flag = 0;
 		strncpy(model->name, "unknown", ROC_MODEL_STR_LEN_MAX - 1);
-		plt_err("Invalid RoC model (impl=0x%x, part=0x%x)", impl, part);
+		plt_err("Invalid RoC model (impl=0x%x, part=0x%x, major=0x%x, minor=0x%x)",
+			impl, part, major, minor);
 	}
 
 	return found;