* [dpdk-dev] [PATCH] test/compress: replace test vector @ 2020-01-14 11:56 Artur Trybula 2020-01-14 12:33 ` Trahe, Fiona 2020-02-06 9:37 ` [dpdk-dev] [PATCH v2] " Artur Trybula 0 siblings, 2 replies; 15+ messages in thread From: Artur Trybula @ 2020-01-14 11:56 UTC (permalink / raw) To: dev, stable, fiona.trahe, shallyv, adamx.dybkowski, marcinx.danilewicz, arturx.trybula, akhil.goyal This patch replaces existing test vector with a new one containing C code to fix license issue. Signed-off-by: Artur Trybula <arturx.trybula@intel.com> --- app/test/test_compressdev_test_buffer.h | 228 ++++++++++++++---------- 1 file changed, 132 insertions(+), 96 deletions(-) diff --git a/app/test/test_compressdev_test_buffer.h b/app/test/test_compressdev_test_buffer.h index c0492f89a..4e8bd9eb2 100644 --- a/app/test/test_compressdev_test_buffer.h +++ b/app/test/test_compressdev_test_buffer.h @@ -190,106 +190,142 @@ static const char test_buf_shakespeare[] = "\n" "ORLANDO Go apart, Adam, and thou shalt hear how he will\n"; -/* Snippet of source code in Pascal */ -static const char test_buf_pascal[] = - " Ptr = 1..DMem;\n" - " Loc = 1..IMem;\n" - " Loc0 = 0..IMem;\n" - " EdgeT = (hout,lin,hin,lout); {Warning this order is important in}\n" - " {predicates such as gtS,geS}\n" - " CardT = (finite,infinite);\n" - " ExpT = Minexp..Maxexp;\n" - " ManT = Mininf..Maxinf; \n" - " Pflag = (PNull,PSoln,PTrace,PPrint);\n" - " Sreal = record\n" - " edge:EdgeT;\n" - " cardinality:CardT;\n" - " exp:ExpT; {exponent}\n" - " mantissa:ManT;\n" - " end;\n" - " Int = record\n" - " hi:Sreal;\n" - " lo:Sreal;\n" - " end;\n" - " Instr = record\n" - " Code:OpType;\n" - " Pars: array[0..Par] of 0..DMem;\n" - " end;\n" - " DataMem= record\n" - " D :array [Ptr] of Int;\n" - " S :array [Loc] of State;\n" - " LastHalve:Loc;\n" - " RHalve :array [Loc] of real;\n" - " end;\n" - " DataFlags=record\n" - " PF :array [Ptr] of Pflag;\n" - " end;\n" - "var\n" - " Debug : (none,activity,post,trace,dump);\n" - " Cut : (once,all);\n" - " GlobalEnd,Verifiable:boolean;\n" - " HalveThreshold:real;\n" - " I : array [Loc] of Instr; {Memory holding instructions}\n" - " End : Loc; {last instruction in I}\n" - " ParN : array [OpType] of -1..Par; {number of parameters for each \n" - " opcode. -1 means no result}\n" - " ParIntersect : array [OpType] of boolean ;\n" - " DInit : DataMem; {initial memory which is cleared and \n" - " used in first call}\n" - " DF : DataFlags; {hold flags for variables, e.g. print/trace}\n" - " MaxDMem:0..DMem;\n" - " Shift : array[0..Digits] of 1..maxint;{array of constant multipliers}\n" - " {used for alignment etc.}\n" - " Dummy :Positive;\n" - " {constant intervals and Sreals}\n" - " PlusInfS,MinusInfS,PlusSmallS,MinusSmallS,ZeroS,\n" - " PlusFiniteS,MinusFiniteS:Sreal;\n" - " Zero,All,AllFinite:Int;\n" - "\n" - "procedure deblank;\n" - "var Ch:char;\n" - "begin\n" - " while (not eof) and (input^ in [' ',' ']) do read(Ch);\n" - "end;\n" - "\n" - "procedure InitialOptions;\n" - "\n" - "#include '/user/profs/cleary/bin/options.i';\n" - "\n" - " procedure Option;\n" - " begin\n" - " case Opt of\n" - " 'a','A':Debug:=activity;\n" - " 'd','D':Debug:=dump;\n" - " 'h','H':HalveThreshold:=StringNum/100;\n" - " 'n','N':Debug:=none;\n" - " 'p','P':Debug:=post;\n" - " 't','T':Debug:=trace;\n" - " 'v','V':Verifiable:=true;\n" - " end;\n" - " end;\n" - "\n" - "begin\n" - " Debug:=trace;\n" - " Verifiable:=false;\n" - " HalveThreshold:=67/100;\n" - " Options;\n" - " writeln(Debug);\n" - " writeln('Verifiable:',Verifiable);\n" - " writeln('Halve threshold',HalveThreshold);\n" - "end;{InitialOptions}\n" - "\n" - "procedure NormalizeUp(E,M:integer;var S:Sreal;var Closed:boolean);\n" - "begin\n" - "with S do\n" - "begin\n" - " if M=0 then S:=ZeroS else\n" - " if M>0 then\n"; +/* Snippet of source code in C */ +static const char test_buf_c_code[] = + "/* SPDX-License-Identifier: BSD-3-Clause\n" + " * Copyright(c) 2010-2014 Intel Corporation\n" + " */\n" + "\n" + "#include <stdio.h>\n" + "#include <inttypes.h>\n" + "#include <string.h>\n" + "#include <math.h>\n" + "#include <rte_common.h>\n" + "#include <rte_hexdump.h>\n" + "#include <rte_pause.h>\n" + "\n" + "#include test.h\n" + "\n" + "#define MAX_NUM 1 << 20\n" + "\n" + "#define FAIL(x)\\n" + " {printf(x '() test failed!\n');\\n" + " return -1;}\n" + "\n" + "/* this is really a sanity check */\n" + "static int\n" + "test_macros(int __rte_unused unused_parm)\n" + "{\n" + "#define SMALLER 0x1000U\n" + "#define BIGGER 0x2000U\n" + "#define PTR_DIFF BIGGER - SMALLER\n" + "#define FAIL_MACRO(x)\\n" + " {printf(#x '() test failed!\n');\\n" + " return -1;}\n" + "\n" + " uintptr_t unused = 0;\n" + "\n" + " RTE_SET_USED(unused);\n" + "\n" + "if ((uintptr_t)RTE_PTR_ADD(SMALLER, PTR_DIFF) != BIGGER)\n" + " FAIL_MACRO(RTE_PTR_ADD);\n" + " if ((uintptr_t)RTE_PTR_SUB(BIGGER, PTR_DIFF) != SMALLER)\n" + " FAIL_MACRO(RTE_PTR_SUB);\n" + " if (RTE_PTR_DIFF(BIGGER, SMALLER) != PTR_DIFF)\n" + " FAIL_MACRO(RTE_PTR_DIFF);\n" + " if (RTE_MAX(SMALLER, BIGGER) != BIGGER)\n" + " FAIL_MACRO(RTE_MAX);\n" + " if (RTE_MIN(SMALLER, BIGGER) != SMALLER)\n" + " FAIL_MACRO(RTE_MIN);\n" + "\n" + " if (strncmp(RTE_STR(test), 'test', sizeof('test')))\n" + " FAIL_MACRO(RTE_STR);\n" + "\n" + " return 0;\n" + "}\n" + "\n" + "static int\n" + "test_bsf(void)\n" + "{\n" + " uint32_t shift, pos;\n" + "\n" + " /* safe versions should be able to handle 0 */\n" + " if (rte_bsf32_safe(0, &pos) != 0)\n" + " FAIL('rte_bsf32_safe');\n" + " if (rte_bsf64_safe(0, &pos) != 0)\n" + " FAIL('rte_bsf64_safe');\n" + "\n" + " for (shift = 0; shift < 63; shift++) {\n" + " uint32_t val32;\n" + " uint64_t val64;\n" + "\n" + " val64 = 1ULL << shift;\n" + " if ((uint32_t)rte_bsf64(val64) != shift)\n" + " FAIL('rte_bsf64');\n" + " if (rte_bsf64_safe(val64, &pos) != 1)\n" + " FAIL('rte_bsf64_safe');\n" + " if (pos != shift)\n" + " FAIL('rte_bsf64_safe');\n" + "\n" + " if (shift > 31)\n" + " continue;\n" + "\n" + " val32 = 1U << shift;\n" + " if ((uint32_t)rte_bsf32(val32) != shift)\n" + " FAIL('rte_bsf32');\n" + " if (rte_bsf32_safe(val32, &pos) != 1)\n" + " FAIL('rte_bsf32_safe');\n" + " if (pos != shift)\n" + " FAIL('rte_bsf32_safe');\n" + " }\n" + "\n" + " return 0;\n" + "}\n" + "\n" + "static int\n" + "test_log2(void)\n" + "{\n" + " uint32_t i, base, compare;\n" + " const uint32_t max = 0x10000;\n" + " const uint32_t step = 1;\n" + "\n" + " for (i = 0; i < max; i = i + step) {\n" + " uint64_t i64;\n" + "\n" + " /* extend range for 64-bit */\n" + " i64 = (uint64_t)i << 32;\n" + " base = (uint32_t)ceilf(log2(i64));\n" + " compare = rte_log2_u64(i64);\n" + " if (base != compare) {\n" + " printf('Wrong rte_log2_u64(%' PRIx64 ') val %x," + " expected %x\n',\n" + " i64, compare, base);\n" + " return TEST_FAILED;\n" + " }\n" + "\n" + " base = (uint32_t)ceilf(log2((uint32_t)i));\n" + " compare = rte_log2_u32((uint32_t)i);\n" + " if (base != compare) {\n" + " printf('Wrong rte_log2_u32(%x) val %x, expected" + " %x\n',\n" + " i, compare, base);\n" + " return TEST_FAILED;\n" + " }\n" + " compare = rte_log2_u64((uint64_t)i);\n" + " if (base != compare) {\n" + " printf('Wrong rte_log2_u64(%x) val %x, expected" + " %x\n',\n" + " i, compare, base);\n" + " return TEST_FAILED;\n" + " }\n" + " }\n" + " return 0;\n" + "}\n"; static const char * const compress_test_bufs[] = { test_buf_alice, test_buf_shakespeare, - test_buf_pascal + test_buf_c_code }; #endif /* TEST_COMPRESSDEV_TEST_BUFFERS_H_ */ -- 2.17.1 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] test/compress: replace test vector 2020-01-14 11:56 [dpdk-dev] [PATCH] test/compress: replace test vector Artur Trybula @ 2020-01-14 12:33 ` Trahe, Fiona 2020-01-15 15:54 ` Akhil Goyal 2020-02-06 9:37 ` [dpdk-dev] [PATCH v2] " Artur Trybula 1 sibling, 1 reply; 15+ messages in thread From: Trahe, Fiona @ 2020-01-14 12:33 UTC (permalink / raw) To: Trybula, ArturX, dev, stable, shallyv, Dybkowski, AdamX, Danilewicz, MarcinX, akhil.goyal > -----Original Message----- > From: Trybula, ArturX <arturx.trybula@intel.com> > Sent: Tuesday, January 14, 2020 11:57 AM > To: dev@dpdk.org; stable@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; shallyv@marvell.com; > Dybkowski, AdamX <adamx.dybkowski@intel.com>; Danilewicz, MarcinX > <marcinx.danilewicz@intel.com>; Trybula, ArturX <arturx.trybula@intel.com>; akhil.goyal@nxp.com > Subject: [PATCH] test/compress: replace test vector > > This patch replaces existing test vector with a new > one containing C code to fix license issue. > > Signed-off-by: Artur Trybula <arturx.trybula@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] test/compress: replace test vector 2020-01-14 12:33 ` Trahe, Fiona @ 2020-01-15 15:54 ` Akhil Goyal 2020-01-17 21:51 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon 0 siblings, 1 reply; 15+ messages in thread From: Akhil Goyal @ 2020-01-15 15:54 UTC (permalink / raw) To: Trahe, Fiona, Trybula, ArturX, dev, stable, shallyv, Dybkowski, AdamX, Danilewicz, MarcinX > > > > This patch replaces existing test vector with a new > > one containing C code to fix license issue. > > > > Signed-off-by: Artur Trybula <arturx.trybula@intel.com> > Acked-by: Fiona Trahe <fiona.trahe@intel.com> Applied to dpdk-next-crypto Thanks. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] test/compress: replace test vector 2020-01-15 15:54 ` Akhil Goyal @ 2020-01-17 21:51 ` Thomas Monjalon 2020-01-20 13:54 ` Mcnamara, John 0 siblings, 1 reply; 15+ messages in thread From: Thomas Monjalon @ 2020-01-17 21:51 UTC (permalink / raw) To: Trahe, Fiona, Trybula, ArturX Cc: dev, stable, shallyv, Dybkowski, AdamX, Danilewicz, MarcinX, Akhil Goyal 15/01/2020 16:54, Akhil Goyal: > > > > > > This patch replaces existing test vector with a new > > > one containing C code to fix license issue. > > > > > > Signed-off-by: Artur Trybula <arturx.trybula@intel.com> > > Acked-by: Fiona Trahe <fiona.trahe@intel.com> > Applied to dpdk-next-crypto This is a terrible idea. Adding C code in a C project as text, and worst, its own code, will make grep matching on fake text. Why do you need so much text to compress? Why not just opening our own code files as text? Why stable@dpdk.org is Cc'ed in this email? What is the license issue? Should it be backported? If yes, the stable tag is missing. I drop this patch from -rc1. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] test/compress: replace test vector 2020-01-17 21:51 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon @ 2020-01-20 13:54 ` Mcnamara, John 2020-01-20 14:33 ` Thomas Monjalon 0 siblings, 1 reply; 15+ messages in thread From: Mcnamara, John @ 2020-01-20 13:54 UTC (permalink / raw) To: Thomas Monjalon, Trahe, Fiona, Trybula, ArturX Cc: dev, stable, shallyv, Dybkowski, AdamX, Danilewicz, MarcinX, Akhil Goyal > -----Original Message----- > From: stable <stable-bounces@dpdk.org> On Behalf Of Thomas Monjalon > Sent: Friday, January 17, 2020 9:52 PM > To: Trahe, Fiona <fiona.trahe@intel.com>; Trybula, ArturX > <arturx.trybula@intel.com> > Cc: dev@dpdk.org; stable@dpdk.org; shallyv@marvell.com; Dybkowski, AdamX > <adamx.dybkowski@intel.com>; Danilewicz, MarcinX > <marcinx.danilewicz@intel.com>; Akhil Goyal <akhil.goyal@nxp.com> > Subject: Re: [dpdk-stable] [PATCH] test/compress: replace test vector > > 15/01/2020 16:54, Akhil Goyal: > > > > > > > > This patch replaces existing test vector with a new one containing > > > > C code to fix license issue. > > > > > > > > Signed-off-by: Artur Trybula <arturx.trybula@intel.com> > > > Acked-by: Fiona Trahe <fiona.trahe@intel.com> > > Applied to dpdk-next-crypto > > This is a terrible idea. > Adding C code in a C project as text, and worst, its own code, will make > grep matching on fake text. Hi, I don't think this is a valid criticism. The patch replace code in Pascal with some code in C as a compression test. The grep part isn't really relevant, it should be clear to anyone who finds a match. If you have a strong objection we will replace it with some more public domain text. > Why do you need so much text to compress? > Why not just opening our own code files as text? That probably isn't worth the effort. > Why stable@dpdk.org is Cc'ed in this email? Ok. We'll do that. > What is the license issue? The issue is that the Pascal code from the Calgary Corpus (a standard body of compression test input) doesn't have a license or explicitly say that it is in the public domain so it isn't clear if we can relicense it as BSD-3. We are being overly cautious here but we didn't want to run into any potential license issues. John ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] test/compress: replace test vector 2020-01-20 13:54 ` Mcnamara, John @ 2020-01-20 14:33 ` Thomas Monjalon 2020-01-20 15:00 ` Trahe, Fiona 2020-01-20 18:00 ` Mcnamara, John 0 siblings, 2 replies; 15+ messages in thread From: Thomas Monjalon @ 2020-01-20 14:33 UTC (permalink / raw) To: Trahe, Fiona, Trybula, ArturX, Mcnamara, John Cc: dev, stable, shallyv, Dybkowski, AdamX, Danilewicz, MarcinX, Akhil Goyal 20/01/2020 14:54, Mcnamara, John: > From: stable <stable-bounces@dpdk.org> On Behalf Of Thomas Monjalon > > 15/01/2020 16:54, Akhil Goyal: > > > > > > > > > > This patch replaces existing test vector with a new one containing > > > > > C code to fix license issue. > > > > > > > > > > Signed-off-by: Artur Trybula <arturx.trybula@intel.com> > > > > Acked-by: Fiona Trahe <fiona.trahe@intel.com> > > > Applied to dpdk-next-crypto > > > > This is a terrible idea. > > Adding C code in a C project as text, and worst, its own code, will make > > grep matching on fake text. > > Hi, > > I don't think this is a valid criticism. The patch replace code in Pascal with some code in C as a compression test. The grep part isn't really relevant, it should be clear to anyone who finds a match. > > If you have a strong objection we will replace it with some more public domain text. Yes please, it will be less confusing. > > Why do you need so much text to compress? Please why do we need some code at all? > > Why not just opening our own code files as text? > > That probably isn't worth the effort. > > > Why stable@dpdk.org is Cc'ed in this email? > > Ok. We'll do that. I say Why? You say Ok :-) > > What is the license issue? > > The issue is that the Pascal code from the Calgary Corpus (a standard body of compression test input) doesn't have a license or explicitly say that it is in the public domain so it isn't clear if we can relicense it as BSD-3. We are being overly cautious here but we didn't want to run into any potential license issues. OK Please explain in the commit log. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] test/compress: replace test vector 2020-01-20 14:33 ` Thomas Monjalon @ 2020-01-20 15:00 ` Trahe, Fiona 2020-01-20 18:00 ` Mcnamara, John 1 sibling, 0 replies; 15+ messages in thread From: Trahe, Fiona @ 2020-01-20 15:00 UTC (permalink / raw) To: Thomas Monjalon, Trybula, ArturX, Mcnamara, John Cc: dev, stable, shallyv, Dybkowski, AdamX, Danilewicz, MarcinX, Akhil Goyal, Trahe, Fiona Hi Thomas > -----Original Message----- > From: Thomas Monjalon <thomas@monjalon.net> > Sent: Monday, January 20, 2020 2:33 PM > To: Trahe, Fiona <fiona.trahe@intel.com>; Trybula, ArturX <arturx.trybula@intel.com>; Mcnamara, > John <john.mcnamara@intel.com> > Cc: dev@dpdk.org; stable@dpdk.org; shallyv@marvell.com; Dybkowski, AdamX > <adamx.dybkowski@intel.com>; Danilewicz, MarcinX <marcinx.danilewicz@intel.com>; Akhil Goyal > <akhil.goyal@nxp.com> > Subject: Re: [dpdk-stable] [PATCH] test/compress: replace test vector > > 20/01/2020 14:54, Mcnamara, John: > > From: stable <stable-bounces@dpdk.org> On Behalf Of Thomas Monjalon > > > 15/01/2020 16:54, Akhil Goyal: > > > > > > > > > > > > This patch replaces existing test vector with a new one containing > > > > > > C code to fix license issue. > > > > > > > > > > > > Signed-off-by: Artur Trybula <arturx.trybula@intel.com> > > > > > Acked-by: Fiona Trahe <fiona.trahe@intel.com> > > > > Applied to dpdk-next-crypto > > > > > > This is a terrible idea. > > > Adding C code in a C project as text, and worst, its own code, will make > > > grep matching on fake text. > > > > Hi, > > > > I don't think this is a valid criticism. The patch replace code in Pascal with some code in C as a > compression test. The grep part isn't really relevant, it should be clear to anyone who finds a match. > > > > If you have a strong objection we will replace it with some more public domain text. > > Yes please, it will be less confusing. > > > > Why do you need so much text to compress? > > Please why do we need some code at all? [Fiona] compression engines are usually tested with different types of data to represent various use-cases. So include for example ASCII text, binary chunks, excel files, etc. Compression of code is a typical compression workload - and as code has lots of patterns may be quite compressible, at different ratios to standard English language text. That said, it's not so important in DPDK to cover all data types as our focus is not on verifying the compression engines, but just the path through the API and PMD to them. So we can replace this text if it's less confusing. > > > > Why not just opening our own code files as text? > > > > That probably isn't worth the effort. > > > > > Why stable@dpdk.org is Cc'ed in this email? > > > > Ok. We'll do that. > > I say Why? You say Ok :-) [Fiona] Simple mistake - sorry 😊 > > > > What is the license issue? > > > > The issue is that the Pascal code from the Calgary Corpus (a standard body of compression test > input) doesn't have a license or explicitly say that it is in the public domain so it isn't clear if we can > relicense it as BSD-3. We are being overly cautious here but we didn't want to run into any potential > license issues. > > OK > Please explain in the commit log. > [Fiona] ok ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] test/compress: replace test vector 2020-01-20 14:33 ` Thomas Monjalon 2020-01-20 15:00 ` Trahe, Fiona @ 2020-01-20 18:00 ` Mcnamara, John 2020-01-27 10:59 ` Mcnamara, John 1 sibling, 1 reply; 15+ messages in thread From: Mcnamara, John @ 2020-01-20 18:00 UTC (permalink / raw) To: Thomas Monjalon, Trahe, Fiona, Trybula, ArturX Cc: dev, stable, shallyv, Dybkowski, AdamX, Danilewicz, MarcinX, Akhil Goyal > -----Original Message----- > From: Thomas Monjalon <thomas@monjalon.net> > Sent: Monday, January 20, 2020 2:33 PM > To: Trahe, Fiona <fiona.trahe@intel.com>; Trybula, ArturX > <arturx.trybula@intel.com>; Mcnamara, John <john.mcnamara@intel.com> > Cc: dev@dpdk.org; stable@dpdk.org; shallyv@marvell.com; Dybkowski, AdamX > <adamx.dybkowski@intel.com>; Danilewicz, MarcinX > <marcinx.danilewicz@intel.com>; Akhil Goyal <akhil.goyal@nxp.com> > Subject: Re: [dpdk-stable] [PATCH] test/compress: replace test vector > > 20/01/2020 14:54, Mcnamara, John: > > From: stable <stable-bounces@dpdk.org> On Behalf Of Thomas Monjalon > > > 15/01/2020 16:54, Akhil Goyal: > > > > > > > > > > > > This patch replaces existing test vector with a new one > > > > > > containing C code to fix license issue. > > > > > > > > > > > > Signed-off-by: Artur Trybula <arturx.trybula@intel.com> > > > > > Acked-by: Fiona Trahe <fiona.trahe@intel.com> > > > > Applied to dpdk-next-crypto > > > > > > This is a terrible idea. > > > Adding C code in a C project as text, and worst, its own code, will > > > make grep matching on fake text. > > > > Hi, > > > > I don't think this is a valid criticism. The patch replace code in > Pascal with some code in C as a compression test. The grep part isn't > really relevant, it should be clear to anyone who finds a match. > > > > If you have a strong objection we will replace it with some more public > domain text. > > Yes please, it will be less confusing. > > > > Why do you need so much text to compress? > > Please why do we need some code at all? > > > > Why not just opening our own code files as text? > > > > That probably isn't worth the effort. > > > > > Why stable@dpdk.org is Cc'ed in this email? > > > > Ok. We'll do that. > > I say Why? You say Ok :-) I mis-read it. I thought you said it wasn't CCed. John ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] test/compress: replace test vector 2020-01-20 18:00 ` Mcnamara, John @ 2020-01-27 10:59 ` Mcnamara, John 0 siblings, 0 replies; 15+ messages in thread From: Mcnamara, John @ 2020-01-27 10:59 UTC (permalink / raw) To: Mcnamara, John, Thomas Monjalon, Trahe, Fiona, Trybula, ArturX Cc: dev, stable, shallyv, Dybkowski, AdamX, Danilewicz, MarcinX, Akhil Goyal > -----Original Message----- > From: dev <dev-bounces@dpdk.org> On Behalf Of Mcnamara, John > Sent: Monday, January 20, 2020 6:00 PM > To: Thomas Monjalon <thomas@monjalon.net>; Trahe, Fiona > <fiona.trahe@intel.com>; Trybula, ArturX <arturx.trybula@intel.com> > Cc: dev@dpdk.org; stable@dpdk.org; shallyv@marvell.com; Dybkowski, AdamX > <adamx.dybkowski@intel.com>; Danilewicz, MarcinX > <marcinx.danilewicz@intel.com>; Akhil Goyal <akhil.goyal@nxp.com> > Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] test/compress: replace test > vector This patch also needs a BSD SPDX header. Please add that. John ^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH v2] test/compress: replace test vector 2020-01-14 11:56 [dpdk-dev] [PATCH] test/compress: replace test vector Artur Trybula 2020-01-14 12:33 ` Trahe, Fiona @ 2020-02-06 9:37 ` Artur Trybula 2020-02-12 13:25 ` Akhil Goyal 1 sibling, 1 reply; 15+ messages in thread From: Artur Trybula @ 2020-02-06 9:37 UTC (permalink / raw) To: dev, stable, fiona.trahe, shallyv, adamx.dybkowski, marcinx.danilewicz, arturx.trybula, akhil.goyal This patch replaces an existing test vector with a new one containing public domain text only. This is to avoid any potential issues re-licensing content as BSD-3 which has no clear original license. Fixes: b06aa643cac4 ("test/compress: add initial unit tests") Signed-off-by: Artur Trybula <arturx.trybula@intel.com> --- v2 changes: - changed test vector (the 3rd entry), text from Alice's Adventures in Wonderland instead of C-code (v1) - added BSD SPDX header app/test/test_compressdev_test_buffer.h | 194 ++++++++++++------------ 1 file changed, 98 insertions(+), 96 deletions(-) diff --git a/app/test/test_compressdev_test_buffer.h b/app/test/test_compressdev_test_buffer.h index c0492f89a..d24160244 100644 --- a/app/test/test_compressdev_test_buffer.h +++ b/app/test/test_compressdev_test_buffer.h @@ -1,3 +1,7 @@ +/* SPDX-License-Identifier: (BSD-3-Clause) + * Copyright(c) 2018-2020 Intel Corporation + */ + #ifndef TEST_COMPRESSDEV_TEST_BUFFERS_H_ #define TEST_COMPRESSDEV_TEST_BUFFERS_H_ @@ -190,106 +194,104 @@ static const char test_buf_shakespeare[] = "\n" "ORLANDO Go apart, Adam, and thou shalt hear how he will\n"; -/* Snippet of source code in Pascal */ -static const char test_buf_pascal[] = - " Ptr = 1..DMem;\n" - " Loc = 1..IMem;\n" - " Loc0 = 0..IMem;\n" - " EdgeT = (hout,lin,hin,lout); {Warning this order is important in}\n" - " {predicates such as gtS,geS}\n" - " CardT = (finite,infinite);\n" - " ExpT = Minexp..Maxexp;\n" - " ManT = Mininf..Maxinf; \n" - " Pflag = (PNull,PSoln,PTrace,PPrint);\n" - " Sreal = record\n" - " edge:EdgeT;\n" - " cardinality:CardT;\n" - " exp:ExpT; {exponent}\n" - " mantissa:ManT;\n" - " end;\n" - " Int = record\n" - " hi:Sreal;\n" - " lo:Sreal;\n" - " end;\n" - " Instr = record\n" - " Code:OpType;\n" - " Pars: array[0..Par] of 0..DMem;\n" - " end;\n" - " DataMem= record\n" - " D :array [Ptr] of Int;\n" - " S :array [Loc] of State;\n" - " LastHalve:Loc;\n" - " RHalve :array [Loc] of real;\n" - " end;\n" - " DataFlags=record\n" - " PF :array [Ptr] of Pflag;\n" - " end;\n" - "var\n" - " Debug : (none,activity,post,trace,dump);\n" - " Cut : (once,all);\n" - " GlobalEnd,Verifiable:boolean;\n" - " HalveThreshold:real;\n" - " I : array [Loc] of Instr; {Memory holding instructions}\n" - " End : Loc; {last instruction in I}\n" - " ParN : array [OpType] of -1..Par; {number of parameters for each \n" - " opcode. -1 means no result}\n" - " ParIntersect : array [OpType] of boolean ;\n" - " DInit : DataMem; {initial memory which is cleared and \n" - " used in first call}\n" - " DF : DataFlags; {hold flags for variables, e.g. print/trace}\n" - " MaxDMem:0..DMem;\n" - " Shift : array[0..Digits] of 1..maxint;{array of constant multipliers}\n" - " {used for alignment etc.}\n" - " Dummy :Positive;\n" - " {constant intervals and Sreals}\n" - " PlusInfS,MinusInfS,PlusSmallS,MinusSmallS,ZeroS,\n" - " PlusFiniteS,MinusFiniteS:Sreal;\n" - " Zero,All,AllFinite:Int;\n" - "\n" - "procedure deblank;\n" - "var Ch:char;\n" - "begin\n" - " while (not eof) and (input^ in [' ',' ']) do read(Ch);\n" - "end;\n" - "\n" - "procedure InitialOptions;\n" - "\n" - "#include '/user/profs/cleary/bin/options.i';\n" - "\n" - " procedure Option;\n" - " begin\n" - " case Opt of\n" - " 'a','A':Debug:=activity;\n" - " 'd','D':Debug:=dump;\n" - " 'h','H':HalveThreshold:=StringNum/100;\n" - " 'n','N':Debug:=none;\n" - " 'p','P':Debug:=post;\n" - " 't','T':Debug:=trace;\n" - " 'v','V':Verifiable:=true;\n" - " end;\n" - " end;\n" - "\n" - "begin\n" - " Debug:=trace;\n" - " Verifiable:=false;\n" - " HalveThreshold:=67/100;\n" - " Options;\n" - " writeln(Debug);\n" - " writeln('Verifiable:',Verifiable);\n" - " writeln('Halve threshold',HalveThreshold);\n" - "end;{InitialOptions}\n" - "\n" - "procedure NormalizeUp(E,M:integer;var S:Sreal;var Closed:boolean);\n" - "begin\n" - "with S do\n" - "begin\n" - " if M=0 then S:=ZeroS else\n" - " if M>0 then\n"; +/* Snippet of Alice's Adventures in Wonderland */ +static const char test_buf_alice2[] = + "`Curiouser and curiouser!' cried Alice (she was so much\n" + "surprised, that for the moment she quite forgot how to speak good\n" + "English); `now I'm opening out like the largest telescope that\n" + "ever was! Good-bye, feet!' (for when she looked down at her\n" + "feet, they seemed to be almost out of sight, they were getting so\n" + "far off). `Oh, my poor little feet, I wonder who will put on\n" + "your shoes and stockings for you now, dears? I'm sure _I_ shan't\n" + "be able! I shall be a great deal too far off to trouble myself\n" + "about you: you must manage the best way you can; --but I must be\n" + "kind to them,' thought Alice, `or perhaps they won't walk the\n" + "way I want to go! Let me see: I'll give them a new pair of\n" + "boots every Christmas.'\n" + "\n" + " And she went on planning to herself how she would manage it.\n" + "`They must go by the carrier,' she thought; `and how funny it'll\n" + "seem, sending presents to one's own feet! And how odd the\n" + "directions will look!\n" + "\n" + " ALICE'S RIGHT FOOT, ESQ.\n" + " HEARTHRUG,\n" + " NEAR THE FENDER,\n" + " (WITH ALICE'S LOVE).\n" + "\n" + "Oh dear, what nonsense I'm talking!'\n" + "\n" + " Just then her head struck against the roof of the hall: in\n" + "fact she was now more than nine feet high, and she at once took\n" + "up the little golden key and hurried off to the garden door.\n" + "\n" + " Poor Alice! It was as much as she could do, lying down on one\n" + "side, to look through into the garden with one eye; but to get\n" + "through was more hopeless than ever: she sat down and began to\n" + "cry again.\n" + "\n" + " `You ought to be ashamed of yourself,' said Alice, `a great\n" + "girl like you,' (she might well say this), `to go on crying in\n" + "this way! Stop this moment, I tell you!' But she went on all\n" + "the same, shedding gallons of tears, until there was a large pool\n" + "all round her, about four inches deep and reaching half down the\n" + "hall.\n" + "\n" + " After a time she heard a little pattering of feet in the\n" + "distance, and she hastily dried her eyes to see what was coming.\n" + "It was the White Rabbit returning, splendidly dressed, with a\n" + "pair of white kid gloves in one hand and a large fan in the\n" + "other: he came trotting along in a great hurry, muttering to\n" + "himself as he came, `Oh! the Duchess, the Duchess! Oh! won't she\n" + "be savage if I've kept her waiting!' Alice felt so desperate\n" + "that she was ready to ask help of any one; so, when the Rabbit\n" + "came near her, she began, in a low, timid voice, `If you please,\n" + "sir--' The Rabbit started violently, dropped the white kid\n" + "gloves and the fan, and skurried away into the darkness as hard\n" + "as he could go.\n" + "\n" + " Alice took up the fan and gloves, and, as the hall was very\n" + "hot, she kept fanning herself all the time she went on talking:\n" + "`Dear, dear! How queer everything is to-day! And yesterday\n" + "things went on just as usual. I wonder if I've been changed in\n" + "the night? Let me think: was I the same when I got up this\n" + "morning? I almost think I can remember feeling a little\n" + "different. But if I'm not the same, the next question is, Who in\n" + "the world am I? Ah, THAT'S the great puzzle!' And she began\n" + "thinking over all the children she knew that were of the same age\n" + "as herself, to see if she could have been changed for any of\n" + "them.\n" + "\n" + " `I'm sure I'm not Ada,' she said, `for her hair goes in such\n" + "long ringlets, and mine doesn't go in ringlets at all; and I'm\n" + "sure I can't be Mabel, for I know all sorts of things, and she,\n" + "oh! she knows such a very little! Besides, SHE'S she, and I'm I,\n" + "and--oh dear, how puzzling it all is! I'll try if I know all the\n" + "things I used to know. Let me see: four times five is twelve,\n" + "and four times six is thirteen, and four times seven is--oh dear!\n" + "I shall never get to twenty at that rate! However, the\n" + "Multiplication Table doesn't signify: let's try Geography.\n" + "London is the capital of Paris, and Paris is the capital of Rome,\n" + "and Rome--no, THAT'S all wrong, I'm certain! I must have been\n" + "changed for Mabel! I'll try and say ''How doth the little--''\n" + "and she crossed her hands on her lap as if she were saying lessons,\n" + "and began to repeat it, but her voice sounded hoarse and\n" + "strange, and the words did not come the same as they used to do:--\n" + "\n" + " `How doth the little crocodile\n" + " Improve his shining tail,\n" + " And pour the waters of the Nile\n" + " On every golden scale!\n" + "\n" + " `How cheerfully he seems to grin,\n" + " How neatly spread his claws,\n" + " And welcome little fishes in\n" + " With gently smiling jaws!'\n"; static const char * const compress_test_bufs[] = { test_buf_alice, test_buf_shakespeare, - test_buf_pascal + test_buf_alice2 }; #endif /* TEST_COMPRESSDEV_TEST_BUFFERS_H_ */ -- 2.17.1 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v2] test/compress: replace test vector 2020-02-06 9:37 ` [dpdk-dev] [PATCH v2] " Artur Trybula @ 2020-02-12 13:25 ` Akhil Goyal 2020-02-12 13:31 ` Thomas Monjalon 0 siblings, 1 reply; 15+ messages in thread From: Akhil Goyal @ 2020-02-12 13:25 UTC (permalink / raw) To: Artur Trybula, dev, stable, fiona.trahe, shallyv, adamx.dybkowski, marcinx.danilewicz, thomas Hi Thomas, > > This patch replaces an existing test vector with a new one containing > public domain text only. This is to avoid any potential issues > re-licensing content as BSD-3 which has no clear original license. > > Fixes: b06aa643cac4 ("test/compress: add initial unit tests") > > Signed-off-by: Artur Trybula <arturx.trybula@intel.com> > --- > v2 changes: > - changed test vector (the 3rd entry), text from > Alice's Adventures in Wonderland instead of C-code (v1) > - added BSD SPDX header > > app/test/test_compressdev_test_buffer.h | 194 ++++++++++++------------ > 1 file changed, 98 insertions(+), 96 deletions(-) > Do you have any more comments on this patch? Regards, Akhil ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v2] test/compress: replace test vector 2020-02-12 13:25 ` Akhil Goyal @ 2020-02-12 13:31 ` Thomas Monjalon 2020-02-12 14:12 ` Akhil Goyal 0 siblings, 1 reply; 15+ messages in thread From: Thomas Monjalon @ 2020-02-12 13:31 UTC (permalink / raw) To: Artur Trybula, Akhil Goyal Cc: dev, stable, fiona.trahe, shallyv, adamx.dybkowski, marcinx.danilewicz 12/02/2020 14:25, Akhil Goyal: > Hi Thomas, > > > > > This patch replaces an existing test vector with a new one containing > > public domain text only. This is to avoid any potential issues > > re-licensing content as BSD-3 which has no clear original license. > > > > Fixes: b06aa643cac4 ("test/compress: add initial unit tests") > > > > Signed-off-by: Artur Trybula <arturx.trybula@intel.com> > > --- > > v2 changes: > > - changed test vector (the 3rd entry), text from > > Alice's Adventures in Wonderland instead of C-code (v1) > > - added BSD SPDX header > > > > app/test/test_compressdev_test_buffer.h | 194 ++++++++++++------------ > > 1 file changed, 98 insertions(+), 96 deletions(-) > > > Do you have any more comments on this patch? No more comment. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v2] test/compress: replace test vector 2020-02-12 13:31 ` Thomas Monjalon @ 2020-02-12 14:12 ` Akhil Goyal 2020-02-12 14:56 ` Trybula, ArturX 0 siblings, 1 reply; 15+ messages in thread From: Akhil Goyal @ 2020-02-12 14:12 UTC (permalink / raw) To: Artur Trybula Cc: dev, stable, fiona.trahe, shallyv, adamx.dybkowski, marcinx.danilewicz, Thomas Monjalon Hi Artur, > > 12/02/2020 14:25, Akhil Goyal: > > Hi Thomas, > > > > > > > > This patch replaces an existing test vector with a new one containing > > > public domain text only. This is to avoid any potential issues > > > re-licensing content as BSD-3 which has no clear original license. > > > > > > Fixes: b06aa643cac4 ("test/compress: add initial unit tests") > > > > > > Signed-off-by: Artur Trybula <arturx.trybula@intel.com> > > > --- > > > v2 changes: > > > - changed test vector (the 3rd entry), text from > > > Alice's Adventures in Wonderland instead of C-code (v1) > > > - added BSD SPDX header > > > > > > app/test/test_compressdev_test_buffer.h | 194 ++++++++++++------------ > > > 1 file changed, 98 insertions(+), 96 deletions(-) > > > > > Do you have any more comments on this patch? > > No more comment. > Should we also tag stable for this patch? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v2] test/compress: replace test vector 2020-02-12 14:12 ` Akhil Goyal @ 2020-02-12 14:56 ` Trybula, ArturX 2020-02-13 9:30 ` Akhil Goyal 0 siblings, 1 reply; 15+ messages in thread From: Trybula, ArturX @ 2020-02-12 14:56 UTC (permalink / raw) To: Akhil Goyal Cc: dev, stable, Trahe, Fiona, shallyv, Dybkowski, AdamX, Danilewicz, MarcinX, Thomas Monjalon Hi Akhil, > Hi Artur, > > > > > 12/02/2020 14:25, Akhil Goyal: > > > Hi Thomas, > > > > > > > > > > > This patch replaces an existing test vector with a new one > > > > containing public domain text only. This is to avoid any potential > > > > issues re-licensing content as BSD-3 which has no clear original license. > > > > > > > > Fixes: b06aa643cac4 ("test/compress: add initial unit tests") > > > > > > > > Signed-off-by: Artur Trybula <arturx.trybula@intel.com> > > > > --- > > > > v2 changes: > > > > - changed test vector (the 3rd entry), text from > > > > Alice's Adventures in Wonderland instead of C-code (v1) > > > > - added BSD SPDX header > > > > > > > > app/test/test_compressdev_test_buffer.h | 194 > > > > ++++++++++++------------ > > > > 1 file changed, 98 insertions(+), 96 deletions(-) > > > > > > > Do you have any more comments on this patch? > > > > No more comment. > > > > Should we also tag stable for this patch? Yes, we need this tag. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v2] test/compress: replace test vector 2020-02-12 14:56 ` Trybula, ArturX @ 2020-02-13 9:30 ` Akhil Goyal 0 siblings, 0 replies; 15+ messages in thread From: Akhil Goyal @ 2020-02-13 9:30 UTC (permalink / raw) To: Trybula, ArturX Cc: dev, stable, Trahe, Fiona, shallyv, Dybkowski, AdamX, Danilewicz, MarcinX, Thomas Monjalon > Hi Akhil, > > > Hi Artur, > > > > > > > > 12/02/2020 14:25, Akhil Goyal: > > > > Hi Thomas, > > > > > > > > > > > > > > This patch replaces an existing test vector with a new one > > > > > containing public domain text only. This is to avoid any potential > > > > > issues re-licensing content as BSD-3 which has no clear original license. > > > > > > > > > > Fixes: b06aa643cac4 ("test/compress: add initial unit tests") > > > > > > > > > > Signed-off-by: Artur Trybula <arturx.trybula@intel.com> > > > > > --- > > > > > v2 changes: > > > > > - changed test vector (the 3rd entry), text from > > > > > Alice's Adventures in Wonderland instead of C-code (v1) > > > > > - added BSD SPDX header > > > > > > > > > > app/test/test_compressdev_test_buffer.h | 194 > > > > > ++++++++++++------------ > > > > > 1 file changed, 98 insertions(+), 96 deletions(-) > > > > > > > > > Do you have any more comments on this patch? > > > > > > No more comment. > > > > > > > Should we also tag stable for this patch? > > Yes, we need this tag. Applied to dpdk-next-crypto Thanks. ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2020-02-13 9:30 UTC | newest] Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-01-14 11:56 [dpdk-dev] [PATCH] test/compress: replace test vector Artur Trybula 2020-01-14 12:33 ` Trahe, Fiona 2020-01-15 15:54 ` Akhil Goyal 2020-01-17 21:51 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon 2020-01-20 13:54 ` Mcnamara, John 2020-01-20 14:33 ` Thomas Monjalon 2020-01-20 15:00 ` Trahe, Fiona 2020-01-20 18:00 ` Mcnamara, John 2020-01-27 10:59 ` Mcnamara, John 2020-02-06 9:37 ` [dpdk-dev] [PATCH v2] " Artur Trybula 2020-02-12 13:25 ` Akhil Goyal 2020-02-12 13:31 ` Thomas Monjalon 2020-02-12 14:12 ` Akhil Goyal 2020-02-12 14:56 ` Trybula, ArturX 2020-02-13 9:30 ` Akhil Goyal
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).