net/bnxt: fix build failure
Checks
Commit Message
Fix build failures because of uninitialized variable usage.
Fixes: 05b405d58148 ("net/bnxt: add dpool allocator for EM allocation")
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/tf_core/dpool.c | 1 +
drivers/net/bnxt/tf_ulp/ulp_mapper.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
Comments
09/07/2021 00:49, Ajit Khaparde:
> Fix build failures because of uninitialized variable usage.
You should add the error log here.
You don't mention the condition of failure.
Nobody reproduced a failure so far.
> Fixes: 05b405d58148 ("net/bnxt: add dpool allocator for EM allocation")
>
> Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
On Fri, Jul 9, 2021 at 1:48 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> 09/07/2021 00:49, Ajit Khaparde:
> > Fix build failures because of uninitialized variable usage.
>
> You should add the error log here.
> You don't mention the condition of failure.
> Nobody reproduced a failure so far.
>
Sure. I did not notice it on my Fedora34 either.
The build error was reported in the dpdk-test-report [1].
Let me resend a v2 with the information.
[1] http://mails.dpdk.org/archives/test-report/2021-July/203186.html
> > Fixes: 05b405d58148 ("net/bnxt: add dpool allocator for EM allocation")
> >
> > Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
> > Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
>
>
>
>
On Fri, Jul 9, 2021 at 4:48 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 09/07/2021 00:49, Ajit Khaparde:
> > Fix build failures because of uninitialized variable usage.
>
> You should add the error log here.
> You don't mention the condition of failure.
> Nobody reproduced a failure so far.
Hi Thomas,
This addresses FC34 (which I think is using gcc11) build failures, there
is an example here:
http://mails.dpdk.org/archives/test-report/2021-July/203186.html
Regards,
Lance
@@ -125,6 +125,7 @@ int dpool_defrag(struct dpool *dpool,
largest_free_size = 0;
largest_free_index = 0;
count = 0;
+ index = 0;
for (i = 0; i < dpool->size; i++) {
if (DP_IS_FREE(dpool->entry[i].flags)) {
@@ -2249,7 +2249,7 @@ ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
struct tf_free_tbl_entry_parms free_parms = { 0 };
uint32_t tbl_scope_id;
struct tf *tfp;
- struct bnxt_ulp_glb_resource_info glb_res;
+ struct bnxt_ulp_glb_resource_info glb_res = { 0 };
uint16_t bit_size;
bool alloc = false;
bool write = false;