[dpdk-dev] [PATCH 1/8] examples/fips_validation: enhance getopt_long usage

2020-10-29 Thread Ibtisam Tariq
Instead of using getopt_long return value, strcmp was used to compare the input parameters with the struct option array. This patch get rid of all those strcmp by directly binding each longopt with an int enum. Bugzilla ID: 238 Fixes: 3d0fad56b74 ("examples/fips_validation: add crypto FIPS applica

Re: [dpdk-dev] [PATCH 1/8] examples/fips_validation: enhance getopt_long usage

2020-10-29 Thread David Marchand
Hello Ibtisam, On Thu, Oct 29, 2020 at 1:55 PM Ibtisam Tariq wrote: > > Instead of using getopt_long return value, strcmp was used to > compare the input parameters with the struct option array. This > patch get rid of all those strcmp by directly binding each longopt > with an int enum. > > Bugz

Re: [dpdk-dev] [PATCH 1/8] examples/fips_validation: enhance getopt_long usage

2020-11-02 Thread Ibtisam Tariq
Hi David, Thank you for reviewing the patch. I will submit the v2 of the patchset with new updates. On Fri, Oct 30, 2020 at 3:07 AM David Marchand wrote: > Hello Ibtisam, > > On Thu, Oct 29, 2020 at 1:55 PM Ibtisam Tariq > wrote: > > > > Instead of using getopt_long return value, strcmp was us

Re: [dpdk-dev] [PATCH 1/8] examples/fips_validation: enhance getopt_long usage

2020-11-04 Thread Ibtisam Tariq
Hello David, In reference to this comment > + case MBUF_DATAROOM_KEYWORD_NUM: > + { > + uint32_t data_room_size; Here, I don't think we need a temp storage. If the value is invalid, the parsing and then init will fail. You can directly pass &env.m

Re: [dpdk-dev] [PATCH 1/8] examples/fips_validation: enhance getopt_long usage

2020-11-05 Thread David Marchand
Hello Ibtisam, On Wed, Nov 4, 2020 at 11:00 AM Ibtisam Tariq wrote: > > + case MBUF_DATAROOM_KEYWORD_NUM: > > + { > > + uint32_t data_room_size; > > Here, I don't think we need a temp storage. > If the value is invalid, the parsing and then init w

Re: [dpdk-dev] [PATCH 1/8] examples/fips_validation: enhance getopt_long usage

2020-11-09 Thread Ibtisam Tariq
Hello David, IMHO, it cannot be moved to read_uint16 parser. If we do, we can't verify that the user input value is greater than UINT16 MAX or not on the overflow data. > > + if (data_room_size == 0 || > > + data_room_size > UINT16_MAX) {

Re: [dpdk-dev] [PATCH 1/8] examples/fips_validation: enhance getopt_long usage

2020-11-10 Thread David Marchand
On Tue, Nov 10, 2020 at 7:10 AM Ibtisam Tariq wrote: > IMHO, it cannot be moved to read_uint16 parser. > If we do, we can't verify that the user input value is greater than > UINT16 MAX or not on the overflow data. > > > + if (data_room_size == 0 || > > > +

Re: [dpdk-dev] [PATCH 1/8] examples/fips_validation: enhance getopt_long usage

2020-11-10 Thread Ibtisam Tariq
Thanks for explaining. I got it. I will submit the patches with new updates. On Tue, Nov 10, 2020 at 1:23 PM David Marchand wrote: > > On Tue, Nov 10, 2020 at 7:10 AM Ibtisam Tariq > wrote: > > IMHO, it cannot be moved to read_uint16 parser. > > If we do, we can't verify that the user input val