From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by dpdk.org (Postfix) with ESMTP id 21D5A91 for ; Wed, 31 Oct 2018 17:14:05 +0100 (CET) Received: by mail-qk1-f193.google.com with SMTP id p3-v6so10428252qkb.5 for ; Wed, 31 Oct 2018 09:14:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=crNTlVL8oxQ/bIuKLKdiYiCWKDPPVGfD0yKk8jnuz0w=; b=gYD7o1C+zBkG8Y2tNnfK5W4hv1IWEP3nU4H2EPaD+YQl7p8nFTu6uQ7uYA2P3gWh3x GnOwxmx8kXVusTASFaPBl3CrugHzoDVwgTyEiMblOTOSt218LfBPoro/4BLyoaS7AFG6 66NJIMKZHHuXjBMU+JZDHucEmFqD1XrE1wrEhMZhbSIade68LzU0jZcQdvkax1IuiwoD rXDqnr/gKOUn0ntQ4g73x3TFIoWPABSqCUDvl3aVlUjb2QBa7S9vFgnoc5IQgltHXT5q nv7RnvkYt1ixxPs/lbUB15uvWdsW+izmICEtr3DsK93Par0w6xzzWk1FM9Yg35uqqehD orcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=crNTlVL8oxQ/bIuKLKdiYiCWKDPPVGfD0yKk8jnuz0w=; b=FrZ8rGUj5ZNvyDnAM0kdDM8XDXZTzn/kAD9klYOvwTYtyI8/5xsHQ8ilpOVCyhGSQv UIEJoi2nJUahuT5yEVT9sOxA+6J4BRvuJUCMbVcijJCdysTrilLUNnlAnrSkK8PJuMx/ G51LgwJ/dAdffk4U8um5dYfBvJBpT5vp3SCMna0mqgUhzEgQ+v0QhU7HXPbBBeXbkpmM V5OBkq2My2UGsAh362KDnEJ9G6Anzb63VAVRwf3tMMmDaAeTfs3aGokDoc5Foev829Sq cXQWGRHx5qEc4ZwP4iunmbOw5ZOzL7ow4REzgLD7xTy35qcRAOh/Bd6Ngq0PqQxmkhYC ssRQ== X-Gm-Message-State: AGRZ1gIVohWa1HrQz77tr/X63KthnbRv+oTMKP5ozwocYwlCsSI9SNh6 sgTHkH6i8HnEKrazBdeygIk= X-Google-Smtp-Source: AJdET5fALHik7xdPoVUiqrMFLfZYyB77VuupWJ3PZDi7bU7lxYgBQKOHYVhPAoVZcdCLiWPnqFdoBw== X-Received: by 2002:ac8:65cd:: with SMTP id t13-v6mr3222369qto.260.1541002444524; Wed, 31 Oct 2018 09:14:04 -0700 (PDT) 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 u16sm2373130qkg.14.2018.10.31.09.14.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 09:14:03 -0700 (PDT) To: Radu Nicolau , dev@dpdk.org Cc: thomas@monjalon.net, declan.doherty@intel.com, chas3@att.com, ferruh.yigit@intel.com, arybchenko@solarflare.com References: <1540994346-17532-1-git-send-email-radu.nicolau@intel.com> <1541001008-13498-1-git-send-email-radu.nicolau@intel.com> From: Chas Williams <3chas3@gmail.com> Message-ID: Date: Wed, 31 Oct 2018 12:14:03 -0400 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: <1541001008-13498-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 v2] net/bonding: fix segfault when creating bonded device 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: Wed, 31 Oct 2018 16:14:05 -0000 On 10/31/2018 11:50 AM, Radu Nicolau wrote: > After the patch below the call to rte_eth_bond_8023ad_agg_selection_set > from probe() segfaults; there is no need to call the function, just set > the mode directly. > Also, reverted 1620175b400e. > > Fixes: 391797f04208 ("drivers/bus: move driver assignment to end of probing") > Fixes: 1620175b400e ("net/bonding: fix invalid port id") > > Signed-off-by: Radu Nicolau Acked-by: Chas Williams > --- > v2: reverted earlier patch > > drivers/net/bonding/rte_eth_bond_pmd.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c > index 156f31c..1a6d8e4 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -3216,8 +3216,6 @@ bond_probe(struct rte_vdev_device *dev) > internals = rte_eth_devices[port_id].data->dev_private; > internals->kvlist = kvlist; > > - rte_eth_dev_probing_finish(&rte_eth_devices[port_id]); > - > if (rte_kvargs_count(kvlist, PMD_BOND_AGG_MODE_KVARG) == 1) { > if (rte_kvargs_process(kvlist, > PMD_BOND_AGG_MODE_KVARG, > @@ -3230,12 +3228,12 @@ bond_probe(struct rte_vdev_device *dev) > } > > if (internals->mode == BONDING_MODE_8023AD) > - rte_eth_bond_8023ad_agg_selection_set(port_id, > - agg_mode); > + internals->mode4.agg_selection = agg_mode; > } else { > - rte_eth_bond_8023ad_agg_selection_set(port_id, AGG_STABLE); > + internals->mode4.agg_selection = AGG_STABLE; > } > > + rte_eth_dev_probing_finish(&rte_eth_devices[port_id]); > RTE_BOND_LOG(INFO, "Create bonded device %s on port %d in mode %u on " > "socket %u.", name, port_id, bonding_mode, socket_id); > return 0; >