From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id E538E1DB9 for ; Mon, 30 Apr 2018 16:43:16 +0200 (CEST) Received: by mail-wr0-f195.google.com with SMTP id v60-v6so8280992wrc.7 for ; Mon, 30 Apr 2018 07:43:16 -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=FbYLz6BkUM1dFquhEe+Ao4jAKK24n9IX5JJ+CpEqN3I=; b=d2q94U0K/eAFnDj7iHjZuvPCZF/i3EUSAhenO/7HvhqcJW1VuS14DUdzc0t6Gz1J1/ EOMwpXSe6ZiOEi2xUn7OxU8hQLkD8t9VvX+/qAhtduhnZ7jRMrSnQNDOBQ1DM9BSXlTt 3u2U/cCVuK4egpBMqNp3EBcBs34HONWxEVBjKp05xNzXo6+GIh//IvC0zCLzzolpI+zV LKZBFw+6fNwrdx5SWfKVs6eZEgDnG06TgkYuDD19net6U/nsCSKtj4KQm+YpTXpAf1r/ 9syHkC/Le/XXMAQxJtens5G+oTdVABkolv5OdO7J/6rwHn54vQW1cUXrnakMifGXNVaj qOBA== 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=FbYLz6BkUM1dFquhEe+Ao4jAKK24n9IX5JJ+CpEqN3I=; b=RHUYMBN6+fCHxLl/EHm0FsETNyH6TL6TW8KNOMVn6Lj2yT0YvyoqrB9h8TtzNt76hL kCGzN9bw/i/625s/vF6BMJ+l2if3GbX53//EDaqackHYdaPAp/m+fYhPyahiS6z7q9df 8uDynyahLogkEeg/MxyaYCcsc7x06ra9HDXW+ngqF1wdArDdJWKn8iA7ZhWMfEa2mqHR 6HHBXllC7OoM54tB2W83kI4RS+vufPTf3vfb4yf5gzMT+lv02uyz6Xn1QKA4AUczKrEA eH4D2dHoK+jCrNcYpxBwhboTvW6LWJ/p2cj0hw0Fq9iPTAREf2Rocap9As98eWrXJS5I JbRQ== X-Gm-Message-State: ALQs6tCTjI+Y34DJrBcP5Oxj5wgJQaEkUHtLZ5PW+UtuGw98jW2z7oh3 sbQuYGEBfMvTxJhE2T5k9whyOYPgwkc= X-Google-Smtp-Source: AB8JxZqmOnSA7Pi5JFbO2335QE51fFOs9eEZSNZuCIx8boD3p9MoWK74TdflK/pljBOdS2aCXVBVOg== X-Received: by 2002:adf:a453:: with SMTP id e19-v6mr8830836wra.121.1525099396580; Mon, 30 Apr 2018 07:43:16 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id w31-v6sm12643723wrb.93.2018.04.30.07.43.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:43:15 -0700 (PDT) From: luca.boccassi@gmail.com To: Chas Williams Cc: Radu Nicolau , dpdk stable Date: Mon, 30 Apr 2018 15:40:47 +0100 Message-Id: <20180430144223.18657-32-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430144223.18657-1-luca.boccassi@gmail.com> References: <20180430140606.4615-80-luca.boccassi@gmail.com> <20180430144223.18657-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/bonding: clear started state if start fails' 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: Mon, 30 Apr 2018 14:43:17 -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/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 65bf9e3e3fb9085e0fd5d883342164a82b7a3f0b Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Fri, 23 Mar 2018 13:05:32 -0400 Subject: [PATCH] net/bonding: clear started state if start fails [ upstream commit 85d3c09a0f40740ca64556522fed1b3bb5aa6167 ] There are several error paths where the bonding device may not start. Clear dev_started before we return if we take one of these paths. Fixes: 2efb58cbab6e ("bond: new link bonding library") Signed-off-by: Chas Williams Acked-by: Radu Nicolau --- drivers/net/bonding/rte_eth_bond_pmd.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index c34c3251f..c0d167fff 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2026,7 +2026,7 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev) if (internals->slave_count == 0) { RTE_BOND_LOG(ERR, "Cannot start port since there are no slave devices"); - return -1; + goto out_err; } if (internals->user_defined_mac == 0) { @@ -2037,18 +2037,18 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev) new_mac_addr = &internals->slaves[i].persisted_mac_addr; if (new_mac_addr == NULL) - return -1; + goto out_err; if (mac_address_set(eth_dev, new_mac_addr) != 0) { RTE_BOND_LOG(ERR, "bonded port (%d) failed to update MAC address", eth_dev->data->port_id); - return -1; + goto out_err; } } /* Update all slave devices MACs*/ if (mac_address_slaves_update(eth_dev) != 0) - return -1; + goto out_err; /* If bonded device is configure in promiscuous mode then re-apply config */ if (internals->promiscuous_en) @@ -2073,7 +2073,7 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev) "bonded port (%d) failed to reconfigure slave device (%d)", eth_dev->data->port_id, internals->slaves[i].port_id); - return -1; + goto out_err; } /* We will need to poll for link status if any slave doesn't * support interrupts @@ -2081,6 +2081,7 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev) if (internals->slaves[i].link_status_poll_enabled) internals->link_status_polling_enabled = 1; } + /* start polling if needed */ if (internals->link_status_polling_enabled) { rte_eal_alarm_set( @@ -2100,6 +2101,10 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev) bond_tlb_enable(internals); return 0; + +out_err: + eth_dev->data->dev_started = 0; + return -1; } static void -- 2.14.2