[dpdk-dev] [PATCH 2/2] devargs: remove limit on parameters length

2015-01-08 Thread Panu Matilainen
On 01/08/2015 12:59 AM, Stephen Hemminger wrote: > On Wed, 7 Jan 2015 14:03:29 +0100 > David Marchand wrote: > >> +buf = strdup(devargs_str); >> +if (buf == NULL) { >> +RTE_LOG(ERR, EAL, "cannot allocate temp memory for devargs\n"); >> +goto fail; >> +} >> + >

[dpdk-dev] [PATCH 2/2] devargs: remove limit on parameters length

2015-01-08 Thread David Marchand
On Wed, Jan 7, 2015 at 11:59 PM, Stephen Hemminger < stephen at networkplumber.org> wrote: > On Wed, 7 Jan 2015 14:03:29 +0100 > David Marchand wrote: > > > + buf = strdup(devargs_str); > > + if (buf == NULL) { > > + RTE_LOG(ERR, EAL, "cannot allocate temp memory for > devarg

[dpdk-dev] [PATCH 2/2] devargs: remove limit on parameters length

2015-01-07 Thread Stephen Hemminger
On Wed, 7 Jan 2015 14:03:29 +0100 David Marchand wrote: > + buf = strdup(devargs_str); > + if (buf == NULL) { > + RTE_LOG(ERR, EAL, "cannot allocate temp memory for devargs\n"); > + goto fail; > + } > + If string is only used in same function you might consid

[dpdk-dev] [PATCH 2/2] devargs: remove limit on parameters length

2015-01-07 Thread David Marchand
As far as I know, there is no reason why we should have a limit on the length of parameters that can be given for a device. Remove this limit by using dynamic allocations. Signed-off-by: David Marchand --- lib/librte_eal/common/eal_common_devargs.c | 26 +- lib/librte_