DPDK patches and discussions
 help / color / mirror / Atom feed
From: Eric Kinzie <ehkinzie@gmail.com>
To: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/5] bond: use existing enslaved device queues
Date: Tue, 14 Apr 2015 10:29:24 -0400	[thread overview]
Message-ID: <20150414142920.GA24843@roosta.home> (raw)
In-Reply-To: <55277E59.1020200@intel.com>

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 <ehkinzie@gmail.com>
> >---
> >  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

  reply	other threads:[~2015-04-14 14:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-06 17:01 [dpdk-dev] [PATCH 0/5] bonding corrections and additions Eric Kinzie
2015-04-06 17:01 ` [dpdk-dev] [PATCH 1/5] bond: use existing enslaved device queues Eric Kinzie
2015-04-10  7:40   ` Pawel Wodkowski
2015-04-14 14:29     ` Eric Kinzie [this message]
2015-04-14 14:34       ` Wodkowski, PawelX
2015-04-06 17:01 ` [dpdk-dev] [PATCH 2/5] bond mode 4: copy entire config structure Eric Kinzie
2015-04-10  7:47   ` Pawel Wodkowski
2015-04-10  7:55     ` Thomas Monjalon
2015-04-06 17:01 ` [dpdk-dev] [PATCH 3/5] bond mode 4: do not ignore multicast Eric Kinzie
2015-04-10  7:56   ` Pawel Wodkowski
2015-04-06 17:01 ` [dpdk-dev] [PATCH 4/5] bond mode 4: allow external state machine Eric Kinzie
2015-04-07 14:18   ` Pawel Wodkowski
2015-04-07 14:37     ` Pawel Wodkowski
2015-04-07 17:31     ` Eric Kinzie
2015-04-10  8:29   ` Pawel Wodkowski
2015-04-06 17:01 ` [dpdk-dev] [PATCH 5/5] bond mode 4: tests for " Eric Kinzie
2015-04-10  8:41   ` Pawel Wodkowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150414142920.GA24843@roosta.home \
    --to=ehkinzie@gmail.com \
    --cc=dev@dpdk.org \
    --cc=pawelx.wodkowski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).