From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f176.google.com (mail-pf0-f176.google.com [209.85.192.176]) by dpdk.org (Postfix) with ESMTP id 66C26C56E for ; Sat, 20 Feb 2016 08:39:15 +0100 (CET) Received: by mail-pf0-f176.google.com with SMTP id x65so63779608pfb.1 for ; Fri, 19 Feb 2016 23:39:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oxCp2UTiDEwsBy7CfPVhY73tsAj5s+R+NoWfeUqUMGI=; b=GKK1Q7rNQnyj5BAZaSTxRu/nfOv9b6pkez/1nNvDvSbrcOceJ2xytBaORhiB5oyVeA G+zuZXDbYmlM9ZXCEpKIqdwo3o3y/GWpNwroSEORtyVehgxgcKQn4AEeZepiR4oYzDyq OCKSCz6TXVPiK9zf0u07d/fFcdwuwALIIuJCCz4XlfwcN3ysHHZlAlvF9deDH8mF/bQD aza1nSlbIMEwEhTMdktBxF0MgkK1ZSen1lpDA0qh60/CFy+/A6veJmOZB1MZRD7/NIMn jeTnB8UR+ZPHdr+IlYxYwU/g891EM9mgcdxRkP9isdn6Uo/ESHMdV562SJgx5UvBRQU+ QV0Q== 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=oxCp2UTiDEwsBy7CfPVhY73tsAj5s+R+NoWfeUqUMGI=; b=i9hthScqGIZriefiGZ24gMnuGSeXsJhf831+diTEVaMEgesHw27Goa1pD8G47I55/G RXrTMvKkBMZ7s/anQlS3Jj1Eln3HFb1G+ifo0mb2hnVMYlY/ZueGRPBku3cNMPd0s69e xxocyzecppUm3SK/jyMSSmYLzv3KAFyZzc8m4oWhh+xgoBlffPV9n0rYrfA+c2lf19d4 jLRQ+2pb9Eemal3KSRvcHORdnJIKWHilw3QYEb02LiABl5mSuDTXjThu3zu3ST+8YY2H DOePgm96hEzkcDaRkI+WYJp9HyFI00Bhiowz/cxmTHKJUUmcxBHtDwmLAoZvOp/xKvEP YWFw== X-Gm-Message-State: AG10YOTELpOHoXJvgel0tfcEDKen7yQ3fJ5odPOHlVMnIDiksDZJdqbRAiA0ISvDtJ7Hbg== X-Received: by 10.98.64.26 with SMTP id n26mr20489292pfa.149.1455909491370; Fri, 19 Feb 2016 11:18:11 -0800 (PST) Received: from buildhost2.vyatta.com. ([144.49.132.22]) by smtp.gmail.com with ESMTPSA id tp6sm19670555pab.25.2016.02.19.11.18.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Feb 2016 11:18:10 -0800 (PST) From: Eric Kinzie To: dev@dpdk.org Date: Fri, 19 Feb 2016 11:17:48 -0800 Message-Id: <1455909473-13539-2-git-send-email-ehkinzie@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1455909473-13539-1-git-send-email-ehkinzie@gmail.com> References: <8CEF83825BEC744B83065625E567D7C219FB2C51@IRSMSX108.ger.corp.intel.com> <1455909473-13539-1-git-send-email-ehkinzie@gmail.com> Subject: [dpdk-dev] [PATCH v2 1/6] 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: Sat, 20 Feb 2016 07:39:15 -0000 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 Acked-by: Declan Doherty --- 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 b63c886..2f193db 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1344,7 +1344,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, @@ -1360,7 +1362,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