From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 73F4F5A52 for ; Fri, 10 Apr 2015 09:40:54 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 10 Apr 2015 00:40:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,555,1422950400"; d="scan'208";a="711720044" Received: from unknown (HELO [10.217.248.56]) ([10.217.248.56]) by orsmga002.jf.intel.com with ESMTP; 10 Apr 2015 00:40:52 -0700 Message-ID: <55277E59.1020200@intel.com> Date: Fri, 10 Apr 2015 09:40:09 +0200 From: Pawel Wodkowski User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Eric Kinzie , "dev@dpdk.org" , Declan Doherty References: <1428339685-27686-1-git-send-email-ehkinzie@gmail.com> <1428339685-27686-2-git-send-email-ehkinzie@gmail.com> In-Reply-To: <1428339685-27686-2-git-send-email-ehkinzie@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [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: Fri, 10 Apr 2015 07:40:55 -0000 On 2015-04-06 19:01, Eric Kinzie wrote: > 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, > Why you want to do that? As far as I am aware (but Declan Doherty should speak here to) purpose of this part of code is to have configuration of queues in slaves consistent with bd_rx_q/bd_tx_q. If you skip reconfiguration of queues that are already configured in port you can have them configured in different way after enslaving. So again: what is the purpose of doing so? -- Pawel