From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 285A147D2 for ; Thu, 26 May 2016 18:39:29 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 26 May 2016 09:39:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,369,1459839600"; d="scan'208";a="989358400" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 26 May 2016 09:39:02 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u4QGd1Cw013465; Thu, 26 May 2016 17:39:01 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id u4QGd14n026442; Thu, 26 May 2016 17:39:01 +0100 Received: (from bairemon@localhost) by sivswdev01.ir.intel.com with id u4QGd1Kk026437; Thu, 26 May 2016 17:39:01 +0100 From: Bernard Iremonger To: dev@dpdk.org Cc: declan.doherty@intel.com, konstantin.ananyev@intel.com, Bernard Iremonger Date: Thu, 26 May 2016 17:38:45 +0100 Message-Id: <1464280727-25752-5-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1464280727-25752-1-git-send-email-bernard.iremonger@intel.com> References: <1462461300-9962-1-git-send-email-bernard.iremonger@intel.com> <1464280727-25752-1-git-send-email-bernard.iremonger@intel.com> Subject: [dpdk-dev] [PATCH v2 4/6] bonding: add spinlock to stop function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2016 16:39:29 -0000 Signed-off-by: Bernard Iremonger --- 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 93043ef..55b37a5 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1651,6 +1651,7 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev) struct bond_dev_private *internals = eth_dev->data->dev_private; uint8_t i; + rte_spinlock_lock(&internals->lock); if (internals->mode == BONDING_MODE_8023AD) { struct port *port; void *pkt = NULL; @@ -1672,7 +1673,7 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev) } if (internals->mode == BONDING_MODE_TLB || - internals->mode == BONDING_MODE_ALB) { + internals->mode == BONDING_MODE_ALB) { bond_tlb_disable(internals); for (i = 0; i < internals->active_slave_count; i++) tlb_last_obytets[internals->active_slaves[i]] = 0; @@ -1685,6 +1686,7 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev) eth_dev->data->dev_link.link_status = ETH_LINK_DOWN; eth_dev->data->dev_started = 0; + rte_spinlock_unlock(&internals->lock); } void -- 2.6.3