From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-qt0-f196.google.com (mail-qt0-f196.google.com [209.85.216.196]) by dpdk.org (Postfix) with ESMTP id 2AC1E6CA2; Fri, 16 Mar 2018 17:34:47 +0100 (CET) Received: by mail-qt0-f196.google.com with SMTP id q11so5752003qtl.9; Fri, 16 Mar 2018 09:34:47 -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; bh=Sum6PgsxYVlcB4vJNT8ix5Ng1B9YUHyGFO/EUT/zRho=; b=r+x3wDRt5/tBNSFP5FxAPAdDY3Fm+HUPLyD1qgbX0iLx8vlUVTfz1w/oTgkwufjD4g P66Vc5grSrfxMM7rlBcETori/Bn+6kMeFHdtORN9iwDbt94X8Rioyn53GewKbmH5Vwdu HbssobwO0Yi6DlKCV3UgLFKWsn0TOkOF4ouYpF4kNzVhjs7drwKAFrnvJv4vZCXZbuBe ta0FViLrCA/CN/Di61r6xvMsKiWt74siB5a7p4FoOmgISs5acCSGAT9KfH+x4vseftYQ KwsaYratxipFveVFu0vex/C7c9wy43YvARKqdjsBI8BkwkMOelLEe9nHww4TwWI+uVPJ tIRw== 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; bh=Sum6PgsxYVlcB4vJNT8ix5Ng1B9YUHyGFO/EUT/zRho=; b=kQh8OHTO+eIN9azmtJjyy6kC/p6tZQjoazKIsR9r3U+YVmgjSuGNog1Bf8uSEfvpnW g79goSqQOt7U/llR6p74FOhtXZzjh4le29ENOJlllsMrsairkd5wHLgwTIAZO+LbGFed AiOF+y0o3MyCGhP7ts1s199g4Om95TUbyHVYmEfMtNGcQFlg5owVb3WrTckSzvCYVvc+ vGK3HA1Rwr42Tipmg8P3GkfRLxkt7gz5h6xfREsgeSN2jvjCbF6ioLuuvRZDHvudBY60 dNGCWgMWIJb/tk7tpoi9nq3PK/UcQipSfr7wT4F5/qfORcY4ievzY6FerW4LFe/0DjnV Eh+A== X-Gm-Message-State: AElRT7FWk8pJZIuwVMtgtIROvXUZ8UoAs5PtaZrwKGpmpYQHv4KuS4+a IuNe0OqHoWIyLDMXzeObjldHDw== X-Google-Smtp-Source: AG47ELve5GneqBv1EO4mQvxYWcQTIvmzj2nTfh1gux3cGX5gbUpFMqM6gRsb1fUckyqkv2znMCwJ1g== X-Received: by 10.200.40.44 with SMTP id 41mr3572081qtq.111.1521218086346; Fri, 16 Mar 2018 09:34:46 -0700 (PDT) Received: from monolith.home (pool-173-79-224-159.washdc.fios.verizon.net. [173.79.224.159]) by smtp.gmail.com with ESMTPSA id 72sm5832618qtf.53.2018.03.16.09.34.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Mar 2018 09:34:45 -0700 (PDT) From: Chas Williams <3chas3@gmail.com> To: dev@dpdk.org Cc: declan.doherty@intel.com, "Charles (Chas) Williams" , stable@dpdk.org Date: Fri, 16 Mar 2018 12:34:41 -0400 Message-Id: <20180316163441.31898-1-3chas3@gmail.com> X-Mailer: git-send-email 2.13.6 Subject: [dpdk-dev] [PATCH] net/bonding: set dev_started later 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: Fri, 16 Mar 2018 16:34:47 -0000 From: "Charles (Chas) Williams" There are several error paths where the bonding device may not start. Don't set dev_started until we know that we are sure start is going to succeed. Fixes: 2efb58cbab ("bond: new link bonding library") Cc: stable@dpdk.org Signed-off-by: Chas Williams --- drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index b59ba9f7c..6d738f8c2 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2028,7 +2028,6 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev) } eth_dev->data->dev_link.link_status = ETH_LINK_DOWN; - eth_dev->data->dev_started = 1; internals = eth_dev->data->dev_private; @@ -2089,6 +2088,9 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev) if (internals->slaves[i].link_status_poll_enabled) internals->link_status_polling_enabled = 1; } + + eth_dev->data->dev_started = 1; + /* start polling if needed */ if (internals->link_status_polling_enabled) { rte_eal_alarm_set( -- 2.13.6