From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by dpdk.org (Postfix) with ESMTP id A7C2F2B94; Tue, 18 Oct 2016 14:28:52 +0200 (CEST) Received: by mail-lf0-f65.google.com with SMTP id x79so32447069lff.2; Tue, 18 Oct 2016 05:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=/Bobw6+kn4ZgjdGde7A+bh9v7w32xdM1nE13wAefPX8=; b=af4JvKcNbyIgkheQ41JSHdZeHX5CZfwZ0MTdn+tOLtGJdZS4uWgbE8NV/xfu4jqNtF OAugdNaMACd7nBYVsrZL+lUo2yU+s+V/nLWUuF+4TFeqetCo4F3gnSeG6aasGk6z3/cj Hjp149EynuZeQprFP5XJ2ziahcREqYW8nOoAgShGBO+GmyeOXFangiEnZYVK4a7ZlHQb 1fdm9XDX9ZUJM/4GTeeD6p8t2OHHhoSh5/mcixhiUWNzdEqIoTSiR1F+kaCEjujVJ4ft Lwm9LHZie6CaOFObOQIHBKO1twNCSZ/9ZZ8kMxyaWYcidp0AjD9ybThOrsxne2gjnFnO mDPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=/Bobw6+kn4ZgjdGde7A+bh9v7w32xdM1nE13wAefPX8=; b=VKFmZBYHSRoteRD7uVwSm4YdDWM6ocZZ+DxefipjhQe16I6PmGqQaFuEhoUHhCVOQ3 euJKjC7IIjoVFLeGGqm41JmAKByB8xyzJDv255NvZfYIC62FPb8EN/3gpkzRoLF29qoj ULNUHiHc+8hhO7u2INiVgumvuRlPS/6pWHJ1d0PF3nwxfKdCsNT9BW/uP1/iHdsueDZs OOP8L98pARSJQy21CO+dzRwGsRHqwiNfBJTVQ/5guntW3bnlN8nM5k/t2t11a1IVOVc/ i/ZHJP0lioAtYoBqM02HKfiR8tgoKhCa6M+4M6XXqcywvq8OYXE1Nj2YaVPWvbtNQUov gaLA== X-Gm-Message-State: AA6/9Rk/Uw2GjWkCqEa/PSDzZ5wG3pZUQ4NJnRdLp50LtG1ZZ/UrvsAB0ake473JftgMmnuewU6KxyeB2yc9Sw== X-Received: by 10.28.61.134 with SMTP id k128mr11363774wma.51.1476793731064; Tue, 18 Oct 2016 05:28:51 -0700 (PDT) MIME-Version: 1.0 Sender: jblunck@gmail.com Received: by 10.28.216.195 with HTTP; Tue, 18 Oct 2016 05:28:50 -0700 (PDT) In-Reply-To: <1473251290-22053-1-git-send-email-i.maximets@samsung.com> References: <1473251290-22053-1-git-send-email-i.maximets@samsung.com> From: Jan Blunck Date: Tue, 18 Oct 2016 14:28:50 +0200 X-Google-Sender-Auth: crFmH5uHphnXNleuFMglLiNTGVc Message-ID: To: Ilya Maximets Cc: dev@dpdk.org, Declan Doherty , Heetae Ahn , Yuanhan Liu , Eric Kinzie , Bernard Iremonger , stable@dpdk.org Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] 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: Tue, 18 Oct 2016 12:28:53 -0000 If the application already configured queues the PMD should not silently claim ownership and reset them. What exactly is the problem when changing MTU? This works fine from what I can tell. Cheers, Jan On Wed, Sep 7, 2016 at 2:28 PM, Ilya Maximets wrote: > 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 > --- > 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 b20a272..eb5b6d1 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -1305,8 +1305,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; > > @@ -1347,9 +1345,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, > @@ -1365,9 +1361,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 >