From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 6B5D08DA4 for ; Sun, 20 May 2018 15:08:49 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 19E0021D23; Sun, 20 May 2018 09:08:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 20 May 2018 09:08:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=0LdTZuvvqlQZ4tI1R IJ6rGUHYBye4BGPvp4Vd93cNOM=; b=u8JcT87vZS+AIcBMRFkQaZefSeFogo8SV l3RGhdkX019i7yRuC5TgVK1tMCZIogjNLb5io/IGPcUgGLNFOKYgKkwHOtR1RgPQ qVQGtkojOFtQfozwkicxez0h1+zMRM+74N16hu5L9z7yUXmW93mW9uffBdRRHrNo vB5T+h490ZZCVGZDvlbDhmAzIWq4KN7lXdi8bGa9XPk1VG5JQkiTpFvZTlrwoe/+ XCr3+V8RXnVNCKm/8gNbpB+6LGmP7LUAyMVmJdciKp9v+PlraEuPaAAzIjM3Dd9s NUevKOCNSKi0Z2IxI2o7pzzaIA5tnn7qdq7tR1qMOjm93JB/YVkbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=0LdTZuvvqlQZ4tI1RIJ6rGUHYBye4BGPvp4Vd93cNOM=; b=O2WPuZib Q8F7EPeCQde20qeCbm5QoTqbpBlR66RZuSn4qIqOeqDck4oveY6gqMlX5rMFCAFm eEQlrzXcHFDFfF9Ck1pqF0/eMmzVDNi/FY2ekn7RJgV+KG5WJ/kNFyPMV/q27UiH HYn0T41c9g6cfq5ZNy49G7mIdvpXCrlYSH42UKor4tn3pODbikv/WsIW7XDDkalA j333DHjiEClK1LBtYh1EXw54HnDQ0mnGfOpsRH/GSvOxq5SEKlGhZ2/q+WZccxNq 0UAV0RQ7W+zcTinSEPbFcutW/YNnvZtAwMBGWM52/CyMg6WL3U5YT7kzLi+YzRXL vwksXsEbL7WZNA== X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from yuanhanliu-NB0.tencent.com (unknown [223.74.148.80]) by mail.messagingengine.com (Postfix) with ESMTPA id 585CB1025C; Sun, 20 May 2018 09:08:47 -0400 (EDT) From: Yuanhan Liu To: Matan Azrad Cc: Bernard Iremonger , dpdk stable Date: Sun, 20 May 2018 21:02:25 +0800 Message-Id: <20180520130246.16287-9-yliu@fridaylinux.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180520130246.16287-1-yliu@fridaylinux.org> References: <20180520130246.16287-1-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'app/testpmd: fix slave port detection' has been queued to LTS release 17.11.3 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: , X-List-Received-Date: Sun, 20 May 2018 13:08:49 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/27/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 392078fc1bd49eef80a942be0b562f5db909c79e Mon Sep 17 00:00:00 2001 From: Matan Azrad Date: Wed, 28 Mar 2018 11:17:53 +0000 Subject: [PATCH] app/testpmd: fix slave port detection [ upstream commit b8b8b344cb44bea46ac1d2037e8e5f1e742319f6 ] Testpmd allows to create and control bonding devices by run time command lines using the bonding PMD API. Some bonding device slaves operations (close, stop, etc) should not be used by the application and must be managed by the bonding PMD. Thus, Testpmd manages slave flags to prevent the special operations calls and when a slave is added to bonding device by a run time command line, the flag is set. There is one more way to define the slaves for a bonding device using EAL command line and Testpmd doesn't set the slave flag in this case what causes to the special operations to be called by Testpmd. Add one more check to detect bonding slave device. Fixes: 41b05095c4d1 ("app/testpmd: fix bonding start") Fixes: 0e545d3047fe ("app/testpmd: check stopping port is not in bonding") Signed-off-by: Matan Azrad Acked-by: Bernard Iremonger --- app/test-pmd/testpmd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index f66f4c643..03c9aa7f8 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2246,7 +2246,10 @@ uint8_t port_is_bonding_slave(portid_t slave_pid) struct rte_port *port; port = &ports[slave_pid]; - return port->slave_flag; + if ((rte_eth_devices[slave_pid].data->dev_flags & + RTE_ETH_DEV_BONDED_SLAVE) || (port->slave_flag == 1)) + return 1; + return 0; } const uint16_t vlan_tags[] = { -- 2.11.0