dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Pawel Wodkowski <pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Eric Kinzie <ehkinzie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"dev-VfR2kkLFssw@public.gmane.org"
	<dev-VfR2kkLFssw@public.gmane.org>,
	Declan Doherty
	<declan.doherty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 1/5] bond: use existing enslaved device queues
Date: Fri, 10 Apr 2015 09:40:09 +0200	[thread overview]
Message-ID: <55277E59.1020200@intel.com> (raw)
In-Reply-To: <1428339685-27686-2-git-send-email-ehkinzie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

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-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,
>

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

  parent reply	other threads:[~2015-04-10  7:40 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   ` [PATCH 1/5] bond: use existing enslaved device queues Eric Kinzie
     [not found]     ` <1428339685-27686-2-git-send-email-ehkinzie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-10  7:40       ` Pawel Wodkowski [this message]
     [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=55277E59.1020200@intel.com \
    --to=pawelx.wodkowski-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=declan.doherty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=ehkinzie-Re5JQEeQqe8AvxtiuMwx3w@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).