dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Eric Kinzie <ehkinzie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: dev-VfR2kkLFssw@public.gmane.org
Subject: [PATCH 1/5] bond: use existing enslaved device queues
Date: Mon,  6 Apr 2015 10:01:21 -0700	[thread overview]
Message-ID: <1428339685-27686-2-git-send-email-ehkinzie@gmail.com> (raw)
In-Reply-To: <1428339685-27686-1-git-send-email-ehkinzie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 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

  parent reply	other threads:[~2015-04-06 17:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-06 17:01 [PATCH 0/5] bonding corrections and additions Eric Kinzie
     [not found] ` <1428339685-27686-1-git-send-email-ehkinzie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-06 17:01   ` Eric Kinzie [this message]
     [not found]     ` <1428339685-27686-2-git-send-email-ehkinzie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-10  7:40       ` [PATCH 1/5] bond: use existing enslaved device queues Pawel Wodkowski
     [not found]         ` <55277E59.1020200-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-04-14 14:29           ` Eric Kinzie
     [not found]             ` <20150414142920.GA24843-5G/Vjf02Nsf/9pzu0YdTqQ@public.gmane.org>
2015-04-14 14:34               ` Wodkowski, PawelX
2015-04-06 17:01   ` [PATCH 2/5] bond mode 4: copy entire config structure Eric Kinzie
     [not found]     ` <1428339685-27686-3-git-send-email-ehkinzie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-10  7:47       ` Pawel Wodkowski
     [not found]         ` <55278003.2090706-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-04-10  7:55           ` Thomas Monjalon
2015-04-06 17:01   ` [PATCH 3/5] bond mode 4: do not ignore multicast Eric Kinzie
     [not found]     ` <1428339685-27686-4-git-send-email-ehkinzie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-10  7:56       ` Pawel Wodkowski
2015-04-06 17:01   ` [PATCH 4/5] bond mode 4: allow external state machine Eric Kinzie
     [not found]     ` <1428339685-27686-5-git-send-email-ehkinzie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-07 14:18       ` Pawel Wodkowski
     [not found]         ` <5523E720.2050207-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
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   ` [PATCH 5/5] bond mode 4: tests for " Eric Kinzie
     [not found]     ` <1428339685-27686-6-git-send-email-ehkinzie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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=1428339685-27686-2-git-send-email-ehkinzie@gmail.com \
    --to=ehkinzie-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    /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).