From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f178.google.com (mail-pf0-f178.google.com [209.85.192.178]) by dpdk.org (Postfix) with ESMTP id 982638E98 for ; Fri, 4 Dec 2015 18:14:12 +0100 (CET) Received: by pfnn128 with SMTP id n128so28936591pfn.0 for ; Fri, 04 Dec 2015 09:14:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1wj3+VQBmOwjF6xnarCe/dSCiQOI+ed4Yv0U3g8dLwI=; b=J6cIq7WeLs3vNg5s+wAmMkn3HY1pEvmBt2XBdloPvjFj4bd+TDOlLAHE2VS1uEjtcf b63oGWPSrFg/AHQ9mVcmHxAsy7oieTYbIuE0yF7PEHvAeYjqGZSA4Tq5aXpHZ3LPwuis 46iodmNXCiSNWWHn5kzZu4F/brzGPuQIeWXFd5PLg1ktqsPL+XCQT/4SDU/kWh8YU7gr tw+IX03Cgj+EgH6NLofMz3uqIZhz2hXIY6iO4ddLDm/2AQ7tXc4RZX/9MSW8SdHeTX7O S239cqqekjTa84HK1rR6LFh9S9fjmKOaA4Gw45C+ChMexlwZl8xsiBwhlbjV/v8YkykQ f6nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1wj3+VQBmOwjF6xnarCe/dSCiQOI+ed4Yv0U3g8dLwI=; b=cbVGAtRtlhF5wHeedoi+e7Zu4WPwBuWei8VQTKU6eijzQ9GgJQcwq29kgPhSLxzIcN 358GSLvUPsqXoIp0nXb1tvUeFQxYsuIaON1rqhkmCyqvvPtA2CTHUhGldOulphLhvoIn FJDa2+45IFOwfzgOZb7UwVDPkLx9FwU+feCzj1rySsegZtuwXeNUfw4BtbfbndnZyHIG wxTEBex76DjYAn035KjsLa03uEib8dLVAZ55wSfYoSbEyuoNXeYtXHDWGu8QC6ncSEEd Z77lfJn38ij7cwBrbYeKOjbTeJPGUw+u6jCi1kekkYeI5QndLmaISuuSBaMIW4xLXLQ6 e+EA== X-Gm-Message-State: ALoCoQm388tQR0tYRWZy8kFFyQXY1BDtdj9kE72vN52Q+2nCQBKYRuUtcivuHkgFgeoRBQEJ+NH1 X-Received: by 10.98.69.7 with SMTP id s7mr22557137pfa.28.1449249252022; Fri, 04 Dec 2015 09:14:12 -0800 (PST) Received: from xeon-e3.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id 134sm18291003pfa.30.2015.12.04.09.14.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Dec 2015 09:14:11 -0800 (PST) From: Stephen Hemminger To: declan.doherty@intel.com Date: Fri, 4 Dec 2015 09:14:13 -0800 Message-Id: <1449249260-15165-2-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1449249260-15165-1-git-send-email-stephen@networkplumber.org> References: <1449249260-15165-1-git-send-email-stephen@networkplumber.org> Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH 1/8] bond: use existing enslaved device queues 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: Fri, 04 Dec 2015 17:14:13 -0000 From: Eric Kinzie This solves issues when an active device is added to a bond. If a device to be enslaved already has transmit and/or receive queues allocated, use those and then create any additional queues that are necessary. Signed-off-by: Eric Kinzie Signed-off-by: Stephen Hemminger --- drivers/net/bonding/rte_eth_bond_pmd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index aa985f5..127b976 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1340,7 +1340,9 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, } /* Setup Rx Queues */ - for (q_id = 0; q_id < bonded_eth_dev->data->nb_rx_queues; q_id++) { + /* Use existing queues, if any */ + for (q_id = slave_eth_dev->data->nb_rx_queues; + 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, @@ -1356,7 +1358,9 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, } /* Setup Tx Queues */ - for (q_id = 0; q_id < bonded_eth_dev->data->nb_tx_queues; q_id++) { + /* Use existing queues, if any */ + for (q_id = slave_eth_dev->data->nb_tx_queues; + 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.1.4