From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-qt1-f193.google.com (mail-qt1-f193.google.com [209.85.160.193]) by dpdk.org (Postfix) with ESMTP id 8A89E5B12 for ; Tue, 27 Nov 2018 19:57:04 +0100 (CET) Received: by mail-qt1-f193.google.com with SMTP id n21so22979427qtl.6 for ; Tue, 27 Nov 2018 10:57:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=W77g/RNH4y7JMHcbosMSaZA8S/6SgPDdpIjGbtwSRKE=; b=jNTtsrBBJ1uahv6zT5p8J3Z2iu/o8VSjQ6d/pTemlxiprF5U1vO2uSevUToef4zP6O GVZH8l1aRH/dEl/1+pN9nYXyQYCs1X05mce3i05kfTQDLLW7yp0rDPetKuxj0b2jSTIy ZDDai+8ATOujU1eYMu3Uzt+M6E9/FYu8i7pc2/kz+dEQdJtpx51w29K93UJvHt6HoCOV wAEIhiBzYstCi3iTXKLxrrC5OhdEVA7vBSIuUgDtuA3tqyIKu1uR59M9KBa5qlOxOY54 Pt4CqdCPa/5BJH9Sg3y49wgW89rEe+VFDantNoVjVQBZt5qd+OnrmkfcXh+krOLSK7IM pYSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=W77g/RNH4y7JMHcbosMSaZA8S/6SgPDdpIjGbtwSRKE=; b=nAsxEzz4fPhMAnS3a/pVY6cKNPvdldmshKgr+pk/N3uWgmhvHaMr28CwCfDUpcmreT rq21paqzGQ3XhzdHbqUoFhNSccbux3gxvgnB5G10LAMdqOrSJfmKuhZq4F+8Y/QC4wiR /myBuUlvHCINtK5xv0PgnO9ETkg9gLEIzkShgPwSRM3K9zdlG2OD8VFNUZBZSanrhYMf h5ILVVQ5vhPoFwwNZNDqlMdKFVSU1cYxu4D8UST//RRl0RdQKM7GkBGNXrwNXtysGS5F quKo1OxgCXqzcXOqwpid4VedCWkHTxNI6AqbR8iRXklMrqB4B+6ABdAqPAgEIYTkhPv2 M0zA== X-Gm-Message-State: AGRZ1gKMTM6NNaGzlqkOz21v04UJ6qaQmR6LP8eruEmB8sxcsOsD2Vsp ZHzp/T1ziGxBnQ4aL73FkpfWVXhY X-Google-Smtp-Source: AJdET5dlsiBXzPJK2DLGbotOhXP7uwbVUX3bvL46phdnlLObLt4CvHZy4BsnOdoVMwMGDLs5oenn0Q== X-Received: by 2002:ac8:41:: with SMTP id i1mr32393068qtg.126.1543345023719; Tue, 27 Nov 2018 10:57:03 -0800 (PST) Received: from [192.168.1.10] (pool-96-255-82-34.washdc.fios.verizon.net. [96.255.82.34]) by smtp.gmail.com with ESMTPSA id x41sm3855705qth.92.2018.11.27.10.57.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Nov 2018 10:57:02 -0800 (PST) To: dev@dpdk.org References: <1542127564-25901-1-git-send-email-radu.nicolau@intel.com> From: Chas Williams <3chas3@gmail.com> Message-ID: <3422085f-a4ed-c9a9-8e14-ce2fd56363b7@gmail.com> Date: Tue, 27 Nov 2018 13:57:01 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1542127564-25901-1-git-send-email-radu.nicolau@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] examples/bond: fix initialization error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 18:57:04 -0000 On 11/13/2018 11:46 AM, Radu Nicolau wrote: > Queue setup will fail if called before adding slaves. > > Fixes: 7a0665940fa8 ("net/bonding: inherit descriptor limits from slaves") > Cc: stable@dpdk.org > > Signed-off-by: Radu Nicolau Acked-by: Chas Williams > --- > examples/bond/main.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/examples/bond/main.c b/examples/bond/main.c > index b282e68..65f3c39 100644 > --- a/examples/bond/main.c > +++ b/examples/bond/main.c > @@ -243,6 +243,13 @@ bond_port_init(struct rte_mempool *mbuf_pool) > rte_exit(EXIT_FAILURE, "port %u: rte_eth_dev_adjust_nb_rx_tx_desc " > "failed (res=%d)\n", BOND_PORT, retval); > > + for (i = 0; i < slaves_count; i++) { > + if (rte_eth_bond_slave_add(BOND_PORT, slaves[i]) == -1) > + rte_exit(-1, "Oooops! adding slave (%u) to bond (%u) failed!\n", > + slaves[i], BOND_PORT); > + > + } > + > /* RX setup */ > rxq_conf = dev_info.default_rxconf; > rxq_conf.offloads = local_port_conf.rxmode.offloads; > @@ -263,13 +270,6 @@ bond_port_init(struct rte_mempool *mbuf_pool) > rte_exit(retval, "port %u: TX queue 0 setup failed (res=%d)", > BOND_PORT, retval); > > - for (i = 0; i < slaves_count; i++) { > - if (rte_eth_bond_slave_add(BOND_PORT, slaves[i]) == -1) > - rte_exit(-1, "Oooops! adding slave (%u) to bond (%u) failed!\n", > - slaves[i], BOND_PORT); > - > - } > - > retval = rte_eth_dev_start(BOND_PORT); > if (retval < 0) > rte_exit(retval, "Start port %d failed (res=%d)", BOND_PORT, retval); >