* [PATCH] common/cnxk: return on fail to init ROC Model
@ 2022-06-10 8:14 Hanumanth Pothula
2022-06-15 17:59 ` Jerin Jacob
0 siblings, 1 reply; 2+ messages in thread
From: Hanumanth Pothula @ 2022-06-10 8:14 UTC (permalink / raw)
To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
Cc: dev, jerinj, hpothula
Return with error on fail to initialize RoC Model.
Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
---
drivers/common/cnxk/roc_platform.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/common/cnxk/roc_platform.c b/drivers/common/cnxk/roc_platform.c
index ebb6225f4d..443aa8d396 100644
--- a/drivers/common/cnxk/roc_platform.c
+++ b/drivers/common/cnxk/roc_platform.c
@@ -37,7 +37,12 @@ roc_plt_init(void)
plt_err("Failed to reserve mem for roc_model");
return -ENOMEM;
}
- roc_model_init(mz->addr);
+ if (roc_model_init(mz->addr)) {
+ plt_err("Failed to init roc_model");
+
+ rte_memzone_free(mz);
+ return -EINVAL;
+ }
}
} else {
if (mz == NULL) {
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] common/cnxk: return on fail to init ROC Model
2022-06-10 8:14 [PATCH] common/cnxk: return on fail to init ROC Model Hanumanth Pothula
@ 2022-06-15 17:59 ` Jerin Jacob
0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2022-06-15 17:59 UTC (permalink / raw)
To: Hanumanth Pothula
Cc: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
dpdk-dev, Jerin Jacob
On Fri, Jun 10, 2022 at 1:44 PM Hanumanth Pothula <hpothula@marvell.com> wrote:
>
> Return with error on fail to initialize RoC Model.
>
> Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
Updated the git commit as follows and applied to
dpdk-next-net-mrvl/for-next-net. Thanks
common/cnxk: handle ROC model init failure
Return with error on fail to initialize ROC model.
Fixes: 014a9e222bac ("common/cnxk: add model init and IO handling API")
Cc: stable@dpdk.org
Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
> ---
> drivers/common/cnxk/roc_platform.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/common/cnxk/roc_platform.c b/drivers/common/cnxk/roc_platform.c
> index ebb6225f4d..443aa8d396 100644
> --- a/drivers/common/cnxk/roc_platform.c
> +++ b/drivers/common/cnxk/roc_platform.c
> @@ -37,7 +37,12 @@ roc_plt_init(void)
> plt_err("Failed to reserve mem for roc_model");
> return -ENOMEM;
> }
> - roc_model_init(mz->addr);
> + if (roc_model_init(mz->addr)) {
> + plt_err("Failed to init roc_model");
> +
> + rte_memzone_free(mz);
> + return -EINVAL;
> + }
> }
> } else {
> if (mz == NULL) {
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-15 18:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10 8:14 [PATCH] common/cnxk: return on fail to init ROC Model Hanumanth Pothula
2022-06-15 17:59 ` Jerin Jacob
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).