From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id BCF191AF03; Mon, 9 Oct 2017 07:13:58 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Oct 2017 22:13:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,498,1500966000"; d="scan'208";a="908037284" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.254.114.24]) ([10.254.114.24]) by FMSMGA003.fm.intel.com with ESMTP; 08 Oct 2017 22:13:56 -0700 To: "Wu, Jingjing" , Matan Azrad , Gaetan Rivet , Thomas Monjalon Cc: "dev@dpdk.org" , Ori Kam , "stable@dpdk.org" References: <1504444747-56298-1-git-send-email-matan@mellanox.com> <9BB6961774997848B5B42BEC655768F810E42494@SHSMSX103.ccr.corp.intel.com> From: Ferruh Yigit Message-ID: Date: Mon, 9 Oct 2017 06:13:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <9BB6961774997848B5B42BEC655768F810E42494@SHSMSX103.ccr.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] app/testpmd: fix forward port ids setting X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Oct 2017 05:13:59 -0000 On 9/7/2017 8:44 AM, Wu, Jingjing wrote: > > >> -----Original Message----- >> From: Matan Azrad [mailto:matan@mellanox.com] >> Sent: Sunday, September 3, 2017 9:19 PM >> To: Wu, Jingjing ; Gaetan Rivet ; >> Thomas Monjalon >> Cc: dev@dpdk.org; Ori Kam ; stable@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@dpdk.org >> >> Signed-off-by: Matan Azrad > Acked-by: Jingjing Wu Applied to dpdk-next-net/master, thanks.