From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id B3270558D; Thu, 24 Nov 2016 12:35:44 +0100 (CET) Received: by mail-wm0-f66.google.com with SMTP id g23so4729479wme.1; Thu, 24 Nov 2016 03:35:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=gVGz/iWsvLXHDFwg4mXnkyJRhnsqDxGVFV9+CetXsko=; b=E6PZi5yx/Lhxm9Z5PIGlWWrnEPdpq9ZY07KbdycqrGgxHBaduc1M3P3/HYOiGLR61Q Ulm9OM+ZgpHPgkT8izw4+bYzi/Gab/W4armpANeGt4dwH+KEJSZyWyQoGkAr9Sk5pz90 B5fdtSPa6h8vN0nb0B6ZS2gV3UOUyCV3F0q2V+DXFZcJB/hYApfxPG5MNn7mqfhvl00g OUIPEJ539rmPdNOHQ7e74xOpGKU40MxKW3wt3inVhNgQh+LNbjV588l9RDi182s08vPJ V6CIHRzea5e1ceANDfg8tH60jdTIYbbgbb/fZia+7rZ3RM87j+rzSU2r1tBSNUnREEwh lF3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=gVGz/iWsvLXHDFwg4mXnkyJRhnsqDxGVFV9+CetXsko=; b=d5aQuyKPUb43I9y/+2Dc3LaBCj7YBJv9J9xBcade1BqTTvBbvqctc1QNtacaLadF2t o8+o1hsffV1GhCI9j4puFb6xnYyxl6hW1isNDunG+VKoIYyrqX4wQj54Zi/w9XFFF7Zq tyqyX25vkd6viE5esPhFlMLC3lP8xD1vOkv9/f2YkZ84u3KSCDOM3myc0CW3x34PGK7l v6h0jtJK4suM8XiPnb6o5L+MSndZcEDlVx5phRF2E9LWfRsMwgQI5p2R/nmhkhWSNJLZ oLoYTpCEYSgfT8VujgTjCC7FTvma7vW29iFujxzox5SQF8zjg+30FUDyFDN7yU2xdl8v ezhA== X-Gm-Message-State: AKaTC01FmoUrU+r/rkkAY+aJwSxrUtgF4RiD1oVIb7exvUeWAjkyfnCvbxmSsUhvvu3kWg== X-Received: by 10.28.189.69 with SMTP id n66mr1880672wmf.35.1479987344402; Thu, 24 Nov 2016 03:35:44 -0800 (PST) Received: from weierstrass.local.net ([91.200.110.70]) by smtp.gmail.com with ESMTPSA id l74sm7786020wmg.2.2016.11.24.03.35.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 03:35:43 -0800 (PST) Sender: Jan Blunck From: Jan Blunck To: dev@dpdk.org Cc: ferruh.yigit@intel.com, i.maximets@samsung.com, bruce.richardson@intel.com, declan.doherty@intel.com, ehkinzie@gmail.com, bernard.iremonger@intel.com, stable@dpdk.org Date: Thu, 24 Nov 2016 12:26:49 +0100 Message-Id: <1479986809-14934-6-git-send-email-jblunck@infradead.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479986809-14934-1-git-send-email-jblunck@infradead.org> References: <1479986809-14934-1-git-send-email-jblunck@infradead.org> Subject: [dpdk-stable] [PATCH v2 5/5] Revert "bonding: use existing enslaved device queues" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 11:35:44 -0000 From: Ilya Maximets This reverts commit 5b7bb2bda5519b7800f814df64d4e015282140e5. It is necessary to reconfigure all queues every time because configuration can be changed. For example, if we're reconfiguring bonding device with new memory pool, already configured queues will still use the old one. And if the old mempool be freed, application likely will panic in attempt to use freed mempool. This happens when we use the bonding device with OVS 2.6 while MTU reconfiguration: PANIC in rte_mempool_get_ops(): assert "(ops_index >= 0) && (ops_index < RTE_MEMPOOL_MAX_OPS_IDX)" failed Cc: Signed-off-by: Ilya Maximets Acked-by: Declan Doherty Acked-by: Declan Doherty Acked-by: Jan Blunck --- drivers/net/bonding/rte_eth_bond_pmd.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index e61afc9..b604642 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1317,8 +1317,6 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, struct bond_rx_queue *bd_rx_q; struct bond_tx_queue *bd_tx_q; - uint16_t old_nb_tx_queues = slave_eth_dev->data->nb_tx_queues; - uint16_t old_nb_rx_queues = slave_eth_dev->data->nb_rx_queues; int errval; uint16_t q_id; @@ -1362,9 +1360,7 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, } /* Setup Rx Queues */ - /* Use existing queues, if any */ - for (q_id = old_nb_rx_queues; - q_id < bonded_eth_dev->data->nb_rx_queues; q_id++) { + for (q_id = 0; q_id < bonded_eth_dev->data->nb_rx_queues; q_id++) { bd_rx_q = (struct bond_rx_queue *)bonded_eth_dev->data->rx_queues[q_id]; errval = rte_eth_rx_queue_setup(slave_eth_dev->data->port_id, q_id, @@ -1380,9 +1376,7 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, } /* Setup Tx Queues */ - /* Use existing queues, if any */ - for (q_id = old_nb_tx_queues; - q_id < bonded_eth_dev->data->nb_tx_queues; q_id++) { + for (q_id = 0; q_id < bonded_eth_dev->data->nb_tx_queues; q_id++) { bd_tx_q = (struct bond_tx_queue *)bonded_eth_dev->data->tx_queues[q_id]; errval = rte_eth_tx_queue_setup(slave_eth_dev->data->port_id, q_id, -- 2.7.4