From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id AD921A0679 for ; Fri, 5 Apr 2019 15:03:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 489671B4E1; Fri, 5 Apr 2019 15:03:57 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 4FDB61B4D2; Fri, 5 Apr 2019 15:03:52 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D5557252AA; Fri, 5 Apr 2019 09:03:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 05 Apr 2019 09:03:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=dhxGEEYVnxBK81J9zXyxt4VqTTmKZuPGKL+jql372a4=; b=bx9nLQRWu0/U QLxcg+xXcjSIQk2hU/SqHeFTU7X+ADmXvfrX5it+HfZ3XrdA7YazhIb0aO6BBeua +Pk4HBUnY8xUEK1x/1Z3f9S+kKxhR0CXoMxhMPKuDv8Al4Xat4ZsZVXpAOQml18d n35JgwDWQPmyACehggAyKn8Fy5NXTII= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=dhxGEEYVnxBK81J9zXyxt4VqTTmKZuPGKL+jql372 a4=; b=q3eUyDit1uaGykY+Np8KIYIikW6feyaQgVan6OFYH6BCYQzVeud3WKa5y t0FvIuRCHdT3XAryiArjbWQea3nSMxemzH5ur4MMd3p9GZaKg/rO1cjOYGaKe+hU lM+dCKYmv3xiNQpQ12VRysC1/HbQaQnj3hU35UgJmMZTQSNDqR+PxBqDsw4RZOpm ykxlY7MW3wqa8bkcJrpJgimYlvRBfHdVvYed6gckPfhwWbkl8JRUFZboLOvhbLbr klBozlU19Z2KsFcAGa8JpOOdt2tkevSaxiK1IH0gptNyZmX2tpuLAo0vEUZYHljn Edpn2rsBebiUs6+8TpNbpfv7Vk/3w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrtdejgdehieculddtuddrgedutddrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvden ucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrg hlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhep mhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsth gvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 440BE100E5; Fri, 5 Apr 2019 09:03:50 -0400 (EDT) From: Thomas Monjalon To: Akhil Goyal , "anatoly.burakov@intel.com" Cc: dev@dpdk.org, "stable@dpdk.org" Date: Fri, 05 Apr 2019 15:03:48 +0200 Message-ID: <2108513.ynXuZs2m7e@xps> In-Reply-To: <20190327112348.12785-1-akhil.goyal@nxp.com> References: <20190327111318.12347-1-akhil.goyal@nxp.com> <20190327112348.12785-1-akhil.goyal@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] examples/multi_process/symmetric_mp: fix link check X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 27/03/2019 12:33, Akhil Goyal: > link check is done for primary process for the ports > which are given in the port mask and not the complete > set of ports. > > Fixes: d3641ae86313 ("examples: update link status checks") > Cc: stable@dpdk.org > > Signed-off-by: Akhil Goyal > --- > for (portid = 0; portid < port_num; portid++) { The logic of this loop is wrong. The port ids may be not contiguous. Look at RTE_ETH_FOREACH_DEV* for such iteration. > - if ((port_mask & (1 << portid)) == 0) > + if ((mask & (1 << portid)) == 0) > continue; [...] > - check_all_ports_link_status((uint8_t)num_ports, (~0x0)); > + check_all_ports_link_status(rte_eth_dev_count(), port_mask); The function rte_eth_dev_count is deprecated. It should be noticed when compiling. On more comment, I think such wrong implementation is existing in many examples: % git grep -l 'check_all_ports_link_status(.*num' app/test/test_pmd_perf.c examples/link_status_interrupt/main.c examples/load_balancer/init.c examples/multi_process/client_server_mp/mp_server/init.c examples/multi_process/symmetric_mp/main.c examples/server_node_efd/server/init.c