From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vn0-f53.google.com (mail-vn0-f53.google.com [209.85.216.53]) by dpdk.org (Postfix) with ESMTP id 95C1458EF for ; Tue, 14 Apr 2015 16:29:28 +0200 (CEST) Received: by vnbf62 with SMTP id f62so4083095vnb.13 for ; Tue, 14 Apr 2015 07:29:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=TVKj8TQq3cJMdugX5iOQANSjinnfWcy3BV/o3B4RPgE=; b=wVAI8h1qe6VZKEhmNZQhGarZ0H3H/5qLtKLztRHYhfWiXIydbiGuwGmHIKuSkr9KBX kfV7yd1J3NHpDIpxRZLfqrMHHvqQNGWmL0lnzdyvhz1uGkdjo1GYq0YRo1xNxr7o0fnR O5gjjBhT5G4UBtcHO6pHYm7AXmp2kUMgOgxmzHCTgnsQpY6HPsHWPkBWoJFPbdZfAwC2 Pgc1PoQ3l6XJZMMSC9cnJkh33prmdh0s8uv+HfrTLndD8/Nt4D6Zxjy/2QURA5POMU/h bzOnyIkRQwGMI9M9Q7WxlEnAAjjeT9hQ2sJ0hdDPVRiAc9XKwbMshsL6B9UcEiAueWGG hZ/w== X-Received: by 10.140.107.139 with SMTP id h11mr13525881qgf.63.1429021768087; Tue, 14 Apr 2015 07:29:28 -0700 (PDT) Received: from gmail.com (pool-108-31-208-15.washdc.fios.verizon.net. [108.31.208.15]) by mx.google.com with ESMTPSA id z69sm805097qkz.27.2015.04.14.07.29.25 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 14 Apr 2015 07:29:26 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Tue, 14 Apr 2015 10:29:24 -0400 Date: Tue, 14 Apr 2015 10:29:24 -0400 From: Eric Kinzie To: Pawel Wodkowski Message-ID: <20150414142920.GA24843@roosta.home> References: <1428339685-27686-1-git-send-email-ehkinzie@gmail.com> <1428339685-27686-2-git-send-email-ehkinzie@gmail.com> <55277E59.1020200@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55277E59.1020200@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "dev@dpdk.org" 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: Tue, 14 Apr 2015 14:29:29 -0000 On Fri Apr 10 09:40:09 +0200 2015, Pawel Wodkowski wrote: > 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 Pawel, I generally test things I've just built using virtio devices and calling rte_eth_tx_queue_setup() more than once for a given queue id fails. However, it seems that most PMDs allow re-allocating device queues while virtio does not (xenvirt also seems to lack this functionality), so I don't think my approach here is right. I'll remove this patch when I send the next version of this series. Thanks, Eric