[dpdk-dev] [PATCH] test/compress: fix max mbuf size test case

Jozwiak, TomaszX tomaszx.jozwiak at intel.com
Fri Apr 19 14:14:16 CEST 2019


> Moreover I don't know how the pointer of a local variable can be used.
That usage is in all test cases in this file - so probably should be fixed first.

May be I'm not an expert but what's wrong with usage of a pointer of local variable inside the function?



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas at monjalon.net]
> Sent: Friday, April 19, 2019 1:50 PM
> To: Jozwiak, TomaszX <tomaszx.jozwiak at intel.com>
> Cc: dev at dpdk.org; Richardson, Bruce <bruce.richardson at intel.com>;
> david.marchand at redhat.com; Trahe, Fiona <fiona.trahe at intel.com>;
> yskoh at mellanox.com; Cel, TomaszX <tomaszx.cel at intel.com>
> Subject: Re: [dpdk-dev] [PATCH] test/compress: fix max mbuf size test case
> 
> Please stop top-posting, and read again below:
> 
> 19/04/2019 13:36, Jozwiak, TomaszX:
> > test_deflate_comp_decomp function is common for all test cases.
> > The options for this function are inside struct interim_data_params,
> > which is passed to test_deflate_comp_decomp function as a pointer.
> >
> > The field buf_idx should be initialized  because is used inside
> > test_deflate_comp_decomp That's the reason of:
> > 	int_data.buf_idx = &i;
> >
> > I'm not an author of this solution - sorry.
> >
> > We can review this and try to add new solution.
> 
> I am not talking about int_data but the use of "i".
> Please look again your patch, you are using "j" instead of "i"
> and "i" is kept alone.
> Moreover I don't know how the pointer of a local variable can be used.
> 
> 
> > From: Thomas Monjalon [mailto:thomas at monjalon.net]
> > > 19/04/2019 12:57, Jozwiak, TomaszX:
> > > > > What is supposed to be "i"?
> > > > > It is initialized at 0 and never touched.
> > > > >
> > > > It's touched inside test_deflate_comp_decomp function.
> > >
> > > What do you mean?
> > > It's a local variable and its address is referenced:
> > > 	int_data.buf_idx = &i;
> > > It looks really wrong.
> > >
> > > Another error is seen in FreeBSD.
> > >
> > > Should I totally revert this patch?
> 
> 



More information about the dev mailing list