From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by dpdk.org (Postfix) with ESMTP id 56F0EC300 for ; Mon, 6 Apr 2015 19:01:43 +0200 (CEST) Received: by paboj16 with SMTP id oj16so49861186pab.0 for ; Mon, 06 Apr 2015 10:01:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=ELibKCa3u0DKeIdYPVGfwQ7X6ud+DDpsLsyXP4AvA3g=; b=EPzrT4m6vRcqqdBhoPdM2cxXYndr4zV13EdkOIbyqhieLARGS7TzLBE+p5tRvOeDMp BKgWfUMFVoOwsdDvtJK8mDR0AXlc+Ulrw1wBNUN+oQcOFc/7BBxSw9kUIfXZ39rW6Oi7 vRyEWMTsrXz2Kw5r/hd7YnEPYWw94VGJ4MzyN021WCSsKzDiuR5qh8uEsj/LXlBaYZPZ dcxbRzareJd5iKK2ew8iHhxo38Q2BoV0i4ahfCTdhT3RTIztDtGxPeCRP3q0YQyxJWtx tsQZ12kytzNBR4KxjLNu+MZFqo5jdYXJ0NfzOSU0sLp5AQmqs++FBymu454P+YJVd1G6 8f9Q== X-Received: by 10.66.184.106 with SMTP id et10mr29659717pac.138.1428339702612; Mon, 06 Apr 2015 10:01:42 -0700 (PDT) Received: from buildhost2.vyatta.com. ([144.49.132.22]) by mx.google.com with ESMTPSA id o6sm5253698pds.38.2015.04.06.10.01.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Apr 2015 10:01:41 -0700 (PDT) From: Eric Kinzie To: dev@dpdk.org Date: Mon, 6 Apr 2015 10:01:21 -0700 Message-Id: <1428339685-27686-2-git-send-email-ehkinzie@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1428339685-27686-1-git-send-email-ehkinzie@gmail.com> References: <1428339685-27686-1-git-send-email-ehkinzie@gmail.com> Subject: [dpdk-dev] [PATCH 1/5] 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: Mon, 06 Apr 2015 17:01:43 -0000 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 --- lib/librte_pmd_bond/rte_eth_bond_pmd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/librte_pmd_bond/rte_eth_bond_pmd.c b/lib/librte_pmd_bond/rte_eth_bond_pmd.c index c937e6b..4fd7d97 100644 --- a/lib/librte_pmd_bond/rte_eth_bond_pmd.c +++ b/lib/librte_pmd_bond/rte_eth_bond_pmd.c @@ -1318,7 +1318,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, @@ -1334,7 +1336,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, -- 1.7.10.4