[dpdk-dev] [dpdk-stable] [PATCH v3] net/failsafe: fix parameters parsing

Ferruh Yigit ferruh.yigit at intel.com
Tue Aug 29 19:05:53 CEST 2017


On 8/28/2017 8:52 AM, Gaëtan Rivet wrote:
> Hi Matan,
> 
> thanks
> 
> On Sun, Aug 27, 2017 at 10:23:14AM +0300, Matan Azrad wrote:
>> The corrupted code used wrongly snprintf return value as the
>> number of characters actually copied, in spite of the meanning
>> is the number of characters which would be generated for the
>> given input.
>>
>> It caused to remain zerod bytes between the failsafe command line
>> non sub device parameters indicates end of string.
>>
>> Hence, when rte_kvargs_parse tried to parse all parameters, it
>> got end of string after the first one and the others weren't parsed.
>>
>> So, if the mac parameters was the first in command line it was
>> taken while hotplug_poll was left default, and vice versa.
>>
>> The fix updates the buffer index by dedicated variable contains
>> the copy size, by the way validates the comma separation.
>>
>> Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")
>> Cc: stable at dpdk.org
>>
>> Signed-off-by: Matan Azrad <matan at mellanox.com>
> Acked-by: Gaetan Rivet <gaetan.rivet at 6wind.com>

Applied to dpdk-next-net/master, thanks.


More information about the dev mailing list