From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by dpdk.org (Postfix) with ESMTP id D5A93C498 for ; Wed, 24 Jun 2015 23:01:56 +0200 (CEST) Received: by padev16 with SMTP id ev16so35997756pad.0 for ; Wed, 24 Jun 2015 14:01:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id; bh=80IFo7/6O1Kd91AXqITaY0Z/zg/aJcSGU20pM8mQXd8=; b=rQDUK0FIcof67WaWF7a9C6BC3b7r7M8u3yM4gz+rtV9jeOs8ZpTcx4onfH0xM1BDzv 1geHIcdAQJQ1NZm0rF06zetKuJjzwUP7BeHPemM3I6rB5fETVuwwPRiSYYF1T/lA+R0M 4xNJkcyZzLVTAuZUVDBaSwP9RGo6WD8waJ6B05FmGR8F1+zvQph9XxiE27UtPBzrRK6F 1zGNm20Gn1xcsuVsDZQE3yMqET1/zTfoiGn/yrpUaITxqxaF9LRVb+3yJRPfUczPgKKX hAtN+Dm3aByntspv3lpvc4bpG+I2jWVcy6oHFABe3qB0exvTv29v6caEfecWrixdy/ts bLKw== X-Received: by 10.66.119.105 with SMTP id kt9mr11374156pab.86.1435179716271; Wed, 24 Jun 2015 14:01:56 -0700 (PDT) Received: from linux-06jr.site.brocade.com ([144.49.131.1]) by mx.google.com with ESMTPSA id cc5sm10130869pac.24.2015.06.24.14.01.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Jun 2015 14:01:55 -0700 (PDT) Sender: Jan Blunck From: Jan Blunck To: dev@dpdk.org Date: Wed, 24 Jun 2015 14:01:23 -0700 Message-Id: <1435179683-10180-1-git-send-email-jblunck@infradead.org> X-Mailer: git-send-email 2.1.4 Subject: [dpdk-dev] [PATCH] Make bond_ethdev_stop iterate only over active slaves 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: Wed, 24 Jun 2015 21:01:57 -0000 When stopping the bond device we don't need to try and free up the LACPDU's from deactivated devices since this is covered by bond_mode_8023ad_deactivate_slave(). This fixes the following: [ 0.100569] PANIC in bond_ethdev_stop(): [ 0.100589] line 1172 assert "port->rx_ring != NULL" failed Signed-off-by: Jan Blunck --- drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 5a2fbef..1fd1321 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1520,8 +1520,8 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev) bond_mode_8023ad_stop(eth_dev); /* Discard all messages to/from mode 4 state machines */ - for (i = 0; i < internals->slave_count; i++) { - port = &mode_8023ad_ports[internals->slaves[i].port_id]; + for (i = 0; i < internals->active_slave_count; i++) { + port = &mode_8023ad_ports[internals->active_slaves[i]]; RTE_VERIFY(port->rx_ring != NULL); while (rte_ring_dequeue(port->rx_ring, &pkt) != -ENOENT) -- 2.1.4