From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id 09E551B868 for ; Tue, 15 May 2018 15:48:35 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id o4-v6so239379wrm.0 for ; Tue, 15 May 2018 06:48:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bvVgIxUVwdpYU4ytPQ2iFRRJdGEOrI7O5NH8nwv8t5k=; b=qIaTfhaSvgVckSwfT7Z3x1JveBfmp5ihhexiL4Y8hfX8TBM8UV0ZU2IrXJESmIBsRX Xk93z3HN/omcNPNdX5Xpst2xUJqxixkOsB3jJTWqw276l9ajHUbcJXEXmOaEukle8kZE 57MKQzONv6RU6vMX4Tr2r42DS1aKoWZ0635oEF5jzmvOAQP2EgahfH8slchwRFuM1asw v/DvJWC8MXxta0JG/m9y9sjZXKQ2G1Pg02OK7I24FtqBvt0KRbzKZG/Tu7cx32eF0iZU rslebiozoe2+rAX7Qq8GPwd7ESw3a6SFk0DZLD1KE1/tSKlpjU2lVuxfA0x31sqmtDZG SiAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bvVgIxUVwdpYU4ytPQ2iFRRJdGEOrI7O5NH8nwv8t5k=; b=c+2va5//Vxfy0uExlEmNRLv51+DAqCDmeLZXIlDM0qe4cBPBms/unBmKXJEyO8fHVg 5BySbmvFi5Emyzx/RLpIiTZRAykaoR6yUKMFozX37miOIdV+/JsrQvHRzoE5loA/BkXN AYUwLQKi7X6vqxsxgpNc/OCpBz0aoSnfe1r01uC+3W9Ur9BeRpUPqe6msebaQRfWGuFZ lfnCuGEVXSwuf1kBpvpG4he0eFt/ApvW+6JqGSPytYWJlCZVRQrpMvhWYeSi4N1C/xq4 BYfW6YkOCbA7fsDGbDRxYlV/VSZzMkTYki4RnBMdoOmD7TiBZWvFqrjMTfmWwRn8bBmY OwiQ== X-Gm-Message-State: ALKqPwcMyo5HcpVRecoIdsrWDve/+E3hd5Lw/4XR1DedEibtTVYVSYbm xhj2YSOMaVqQeCJ7Jk0injs= X-Google-Smtp-Source: AB8JxZpMJQ67OSmSUhFjFceN2zRpDp7MocuIjYlG9KBq9K3B8sOjZNy6EtI/2hH4FDUuHUaJX0oKDA== X-Received: by 2002:adf:bb14:: with SMTP id r20-v6mr1403296wrg.244.1526392114754; Tue, 15 May 2018 06:48:34 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id y81-v6sm654398wmd.31.2018.05.15.06.48.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 06:48:33 -0700 (PDT) From: luca.boccassi@gmail.com To: Matan Azrad Cc: Bernard Iremonger , dpdk stable Date: Tue, 15 May 2018 14:46:42 +0100 Message-Id: <20180515134731.9337-31-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180515134731.9337-1-luca.boccassi@gmail.com> References: <20180503110612.12146-2-luca.boccassi@gmail.com> <20180515134731.9337-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'app/testpmd: fix slave port detection' has been queued to stable release 18.02.2 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: Tue, 15 May 2018 13:48:35 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 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/16/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 51bbbb9efb102f96bc21698fb89e0e378fa0ef60 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 0708c32cb..d168805d8 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2248,7 +2248,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.14.2