[dpdk-stable] [PATCH] app/testpmd: fix forward port ids setting
ferruh.yigit at intel.com
Mon Oct 9 07:13:56 CEST 2017
On 9/7/2017 8:44 AM, Wu, Jingjing wrote:
>> -----Original Message-----
>> From: Matan Azrad [mailto:matan at mellanox.com]
>> Sent: Sunday, September 3, 2017 9:19 PM
>> To: Wu, Jingjing <jingjing.wu at intel.com>; Gaetan Rivet <gaetan.rivet at 6wind.com>;
>> Thomas Monjalon <thomas at monjalon.net>
>> Cc: dev at dpdk.org; Ori Kam <orika at mellanox.com>; stable at dpdk.org
>> Subject: [PATCH] app/testpmd: fix forward port ids setting
>> The corrupted code didn't check the port availability when
>> it was trying to set the forward port IDs array.
>> However, when it was counting the number of ports, the availability
>> was checked by RTE_ETH_FOREACH_DEV iterator.
>> Hence, even when ETH devices ports were not in ATTACHED state,
>> the testpmd tried to forward traffic by them and got segmentation
>> fault at queue access time.
>> For example:
>> When EAL command line parameters include two devices, the first
>> is failsafe with two sub devices and the second is any device,
>> testpmd gets two devices by the iterator and sets for forwarding
>> both, the failsafe device and the failsafe first sub device
>> (instead of the second sub device).
>> After the first failsafe sub device state was changed to DEFERRED,
>> testpmd tries to forward traffic through the deferred device
>> because it didn't check the port availability in setting time.
>> The fix uses the RTE_ETH_FOREACH_DEV iterator for the forward
>> port IDs default setting.
>> Fixes: af75078fece3 ("first public release")
I think this has been broken by introducing DEFERRED state without
fixing iterators, it wasn't broken previously, so updating fixes line as:
Fixes: cb894d99eceb ("ethdev: add deferred intermediate device state")
>> Cc: stable at dpdk.org
>> Signed-off-by: Matan Azrad <matan at mellanox.com>
> Acked-by: Jingjing Wu <jingjing.wu at intel.com>
Applied to dpdk-next-net/master, thanks.
More information about the stable