> -----Original Message----- > From: Matan Azrad [mailto:[email protected]] > Sent: Sunday, September 3, 2017 9:19 PM > To: Wu, Jingjing <[email protected]>; Gaetan Rivet > <[email protected]>; > Thomas Monjalon <[email protected]> > Cc: [email protected]; Ori Kam <[email protected]>; [email protected] > 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") > Cc: [email protected] > > Signed-off-by: Matan Azrad <[email protected]>
>From the view of testpmd, the fix is good. Acked-by: Jingjing Wu <[email protected]> Thanks Jingjing

