DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: David Marchand <david.marchand@redhat.com>
Cc: "Cel, TomaszX" <tomaszx.cel@intel.com>,
	"Jozwiak, TomaszX" <tomaszx.jozwiak@intel.com>,
	Yongseok Koh <yskoh@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>,
	"Trahe, Fiona" <fiona.trahe@intel.com>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 1/1] test/compress: add max mbuf size test case
Date: Fri, 19 Apr 2019 11:30:17 +0200	[thread overview]
Message-ID: <1988563.CbslbgrKNx@xps> (raw)
In-Reply-To: <CAJFAV8yxtr3QWMx6XwTwBtf349j8HS+DbRwiimfeZZVa-v9THg@mail.gmail.com>

19/04/2019 11:25, David Marchand:
> On Fri, Apr 19, 2019 at 11:08 AM Thomas Monjalon <thomas@monjalon.net>
> wrote:
> 
> > There are some variables declared in the middle of the function,
> > and one (i) is declared twice with two different types.
> >
> > Tomasz and Tomasz, are you working on it urgently please?
> >
> 
> Found out that this test is not built by default.
> I have a trivial fix but I wonder how this has been tested seeing how it
> won't compile.

It is enabled with devtools/test-build.sh
and it is compiling fine with recent compilers I think.

Please send your fix.


> > 19/04/2019 00:42, Yongseok Koh:
> > > Hi,
> > >
> > > I'm seeing compile error.
> > > Isn't it due to this patch?
> > >
> > > $ gcc --version
> > > gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
> > >
> > >
> > > FAILED: app/test/app@test@@dpdk-test@exe/test_compressdev.c.o
> > [...]
> > > ../app/test/test_compressdev.c: In function
> > ‘test_compressdev_deflate_stateless_dynamic_big’:
> > > ../app/test/test_compressdev.c:1992:16: error: conflicting types for ‘i’
> > >   for (uint32_t i = 0; i < BIG_DATA_TEST_SIZE - 1; ++i)
> > >                 ^
> > > ../app/test/test_compressdev.c:1949:11: note: previous definition of ‘i’
> > was here
> > >   uint16_t i = 0;
> > >            ^
> > > ../app/test/test_compressdev.c:1992:2: error: ‘for’ loop initial
> > declarations are only allowed in C99 mode
> > >   for (uint32_t i = 0; i < BIG_DATA_TEST_SIZE - 1; ++i)
> > >   ^
> > > ../app/test/test_compressdev.c:1992:2: note: use option -std=c99 or
> > -std=gnu99 to compile your code
> > > ../app/test/test_compressdev.c:1996:19: warning: assignment from
> > incompatible pointer type [enabled by default]
> > >   int_data.buf_idx = &i;
> > >                    ^
> > > [1501/1523] Generating igb_uio with a custom command.
> > > make: Entering directory `/usr/src/kernels/3.10.0-862.el7.x86_64'
> > >   CC [M]
> > /auto/mtiswgwork/yskoh/git/mellanox/dpdk.org-2/build/kernel/linux/igb_uio/igb_uio.o
> > >   Building modules, stage 2.
> > >   MODPOST 1 modules
> > > make[1]: Warning: File
> > `/auto/mtiswgwork/yskoh/git/mellanox/dpdk.org-2/build/kernel/linux/igb_uio/igb_uio.mod.c'
> > has modification time 0.0096 s in the future
> > >   CC
> > /auto/mtiswgwork/yskoh/git/mellanox/dpdk.org-2/build/kernel/linux/igb_uio/igb_uio.mod.o
> > >   LD [M]
> > /auto/mtiswgwork/yskoh/git/mellanox/dpdk.org-2/build/kernel/linux/igb_uio/igb_uio.ko
> > > make[1]: warning:  Clock skew detected.  Your build may be incomplete.
> > > make: Leaving directory `/usr/src/kernels/3.10.0-862.el7.x86_64'
> > >
> > >
> > > Thanks,
> > > Yongseok
> >
> > [...]
> > > >> +static int
> > > >> +test_compressdev_deflate_stateless_dynamic_big(void)
> > > >> +{
> > > >> +  struct comp_testsuite_params *ts_params = &testsuite_params;
> > > >> +  uint16_t i = 0;
> > > >> +  int ret = TEST_SUCCESS;
> > > >> +  const struct rte_compressdev_capabilities *capab;
> > > >> +  char *test_buffer = NULL;
> > > >> +
> > > >> +  capab = rte_compressdev_capability_get(0,
> > > >> RTE_COMP_ALGO_DEFLATE);
> > > >> +  TEST_ASSERT(capab != NULL, "Failed to retrieve device
> > capabilities");
> > > >> +
> > > >> +  if ((capab->comp_feature_flags &
> > > >> RTE_COMP_FF_HUFFMAN_DYNAMIC) == 0)
> > > >> +          return -ENOTSUP;
> > > >> +
> > > >> +  if ((capab->comp_feature_flags &
> > > >> RTE_COMP_FF_OOP_SGL_IN_SGL_OUT) == 0)
> > > >> +          return -ENOTSUP;
> > > >> +
> > > >> +  test_buffer = rte_malloc(NULL, BIG_DATA_TEST_SIZE, 0);
> > > >> +  if (test_buffer == NULL) {
> > > >> +          RTE_LOG(ERR, USER1,
> > > >> +                  "Can't allocate buffer for big-data\n");
> > > >> +          return TEST_FAILED;
> > > >> +  }
> > > >> +
> > > >> +  struct interim_data_params int_data = {
> > > >> +          (const char * const *)&test_buffer,
> > > >> +          1,
> > > >> +          NULL,
> > > >> +          &ts_params->def_comp_xform,
> > > >> +          &ts_params->def_decomp_xform,
> > > >> +          1
> > > >> +  };
> > > >> +
> > > >> +  struct test_data_params test_data = {
> > > >> +          RTE_COMP_OP_STATELESS,
> > > >> +          SGL_BOTH,
> > > >> +          ZLIB_DECOMPRESS,
> > > >> +          0,
> > > >> +          1
> > > >> +  };
> > > >> +
> > > >> +  ts_params->def_comp_xform->compress.deflate.huffman =
> > > >> +
> > > >>    RTE_COMP_HUFFMAN_DYNAMIC;
> > > >> +
> > > >> +  /* fill the buffer with data based on rand. data */
> > > >> +  srand(BIG_DATA_TEST_SIZE);
> > > >> +  for (uint32_t i = 0; i < BIG_DATA_TEST_SIZE - 1; ++i)
> > > >> +          test_buffer[i] = (uint8_t)(rand() % ((uint8_t)-1)) | 1;
> > > >> +
> > > >> +  test_buffer[BIG_DATA_TEST_SIZE-1] = 0;
> > > >> +  int_data.buf_idx = &i;
> >
> >
> >
> >
> 

  parent reply	other threads:[~2019-04-19  9:30 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-15  9:44 [dpdk-dev] [PATCH] compress/qat: add dynamic sgl allocation Tomasz Jozwiak
2019-02-15  9:44 ` [dpdk-dev] [PATCH] compress/qat: add fallback to fixed compression Tomasz Jozwiak
2019-02-15 17:01   ` Trahe, Fiona
2019-03-19 14:04     ` Akhil Goyal
2019-03-19 14:04       ` Akhil Goyal
2019-02-15  9:44 ` [dpdk-dev] [PATCH] test/compress: add max mbuf size test case Tomasz Jozwiak
2019-03-27 14:02   ` Akhil Goyal
2019-03-27 14:02     ` Akhil Goyal
2019-04-02 12:16   ` [dpdk-dev] [PATCH v2 0/1] " Tomasz Cel
2019-04-02 12:16     ` Tomasz Cel
2019-04-02 12:16     ` [dpdk-dev] [PATCH v2 1/1] test/compress: " Tomasz Cel
2019-04-02 12:16       ` Tomasz Cel
2019-04-02 12:22       ` Cel, TomaszX
2019-04-02 12:22         ` Cel, TomaszX
2019-04-18 22:42         ` Yongseok Koh
2019-04-18 22:42           ` Yongseok Koh
2019-04-19  9:07           ` Thomas Monjalon
2019-04-19  9:07             ` Thomas Monjalon
2019-04-19  9:25             ` David Marchand
2019-04-19  9:25               ` David Marchand
2019-04-19  9:30               ` Thomas Monjalon [this message]
2019-04-19  9:30                 ` Thomas Monjalon
2019-04-19  9:32                 ` Jozwiak, TomaszX
2019-04-19  9:32                   ` Jozwiak, TomaszX
2019-04-19  9:39                   ` David Marchand
2019-04-19  9:39                     ` David Marchand
2019-04-19  9:58           ` Jozwiak, TomaszX
2019-04-19  9:58             ` Jozwiak, TomaszX
2019-04-16 14:53     ` [dpdk-dev] [PATCH v2 0/1] " Akhil Goyal
2019-04-16 14:53       ` Akhil Goyal
2019-03-01 11:00 ` [dpdk-dev] [PATCH v2] add dynamic sgl allocation Tomasz Jozwiak
2019-03-01 11:00   ` [dpdk-dev] [PATCH v2] compress/qat: " Tomasz Jozwiak
2019-03-01 11:17 ` [dpdk-dev] [PATCH v3 0/1] " Tomasz Jozwiak
2019-03-01 11:17   ` [dpdk-dev] [PATCH v3 1/1] compress/qat: " Tomasz Jozwiak
2019-03-07 12:02   ` [dpdk-dev] [PATCH v4 0/1] " Tomasz Jozwiak
2019-03-07 12:02     ` [dpdk-dev] [PATCH v4 1/1] compress/qat: " Tomasz Jozwiak
2019-03-07 18:58       ` Trahe, Fiona
2019-03-17 18:00       ` Akhil Goyal
2019-03-17 18:00         ` Akhil Goyal
2019-03-18  8:12         ` Jozwiak, TomaszX
2019-03-18  8:12           ` Jozwiak, TomaszX
2019-03-18  8:23           ` arpita das
2019-03-18  8:23             ` arpita das
2019-03-26 13:51     ` [dpdk-dev] [PATCH v5 0/1] " Tomasz Jozwiak
2019-03-26 13:51       ` Tomasz Jozwiak
2019-03-26 13:51       ` [dpdk-dev] [PATCH v5 1/1] compress/qat: " Tomasz Jozwiak
2019-03-26 13:51         ` Tomasz Jozwiak
2019-03-28 14:37         ` Trahe, Fiona
2019-03-28 14:37           ` Trahe, Fiona
2019-03-29 14:40           ` Akhil Goyal
2019-03-29 14:40             ` Akhil Goyal
2019-04-03  8:39             ` Akhil Goyal
2019-04-03  8:39               ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1988563.CbslbgrKNx@xps \
    --to=thomas@monjalon.net \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=fiona.trahe@intel.com \
    --cc=tomaszx.cel@intel.com \
    --cc=tomaszx.jozwiak@intel.com \
    --cc=yskoh@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).