From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by dpdk.org (Postfix) with ESMTP id 5FADF239 for ; Wed, 31 Oct 2018 16:37:23 +0100 (CET) Received: by mail-qk1-f195.google.com with SMTP id 189so8777319qkj.8 for ; Wed, 31 Oct 2018 08:37:23 -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=zlo4HNtHcmz3Ynqjxk3EBUTfSuHXIv6M7wrKQQy+Ino=; b=LqbqEAhGCJxQbGFuDQLGyjPjLrhY5Tp5GQjeDSphC5qQxByxubl1IeMN3YAEAFk+ZG I/dokfc6YEgjkrJpu2WKMgT4ggW/MZ7mtTLZlbb7hzAGJqOsneE1Au5Wve+ChHXbH5cQ nOejKrs+HR2FSKKKtBWAW50pXKeGS9iUF3SV/n3gRMz00Pepx5/JZrYKjY5xULPMRaS4 kjgsTpr3Rm9+HYZBLuJto5ucQyjkdvFPnFLchjpadB4X23s9JvSLKRAI54NYUHaWyKH7 vn3pVlLuWzX8cvQmdg18sy+tfMi/IkUpTxsTbir5RiKDveLsDOTVy9CXgKDI4hdkKcwc Pp6A== 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=zlo4HNtHcmz3Ynqjxk3EBUTfSuHXIv6M7wrKQQy+Ino=; b=fYgKQmpLraih4rZpUGVcvSykgjkcH89aH8pZQ3CPrBs+Fh6ju6jHzl8oYdILfoo+HG eYqzlrZKUsmZtipk8QAl8f4EZFiogHo7UMn1FPQk4GcVjL09V1RT1QjDktu24iogZG6i 8GZnjNF8oi03K0lbxgp1iZeCWuIrwA4kprAavcoGbZ3Jwpc50IDxbx37bXv3Q0A9bhu8 DH3CM0ed4n12azdGGZqPCOOWzBsKkeYl0CZzZGqThnatqYi/LlvvLfH3BkDZuVr4Ce8T VjylmO2phwojxEJkF8sdtkTQkraG4E6XLWhPLcwy7m1FO9Zvd+p7Qyr+e8y4XzZLag1o PD7Q== X-Gm-Message-State: AGRZ1gKjX9VziwCm9eca73qQ5ICq1YqsWCcLEg4hXkY2/VbmG+mdw7b+ 8liQRe8BItXxuEeCXiPJ2YA= X-Google-Smtp-Source: AJdET5cpIW1dmYmOJHd2bPraV8IxBOlW3bqyoY0yvoPT5Z4uFgzWTMM/Te9UMqVJAvH/HtfRSegByA== X-Received: by 2002:a37:be02:: with SMTP id o2mr3040165qkf.133.1541000242814; Wed, 31 Oct 2018 08:37:22 -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 k14-v6sm26000111qtk.28.2018.10.31.08.37.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 08:37:22 -0700 (PDT) To: Thomas Monjalon , Radu Nicolau Cc: dev@dpdk.org, 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> <2490703.Y8HZJr6zFH@xps> From: Chas Williams <3chas3@gmail.com> Message-ID: <2adb03da-ff43-3ab4-5e5a-0a44622d5f8d@gmail.com> Date: Wed, 31 Oct 2018 11:37:21 -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: <2490703.Y8HZJr6zFH@xps> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] 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 15:37:23 -0000 On 10/31/2018 11:06 AM, Thomas Monjalon wrote: > 31/10/2018 14:59, Radu Nicolau: >> 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. >> >> Fixes: 391797f04208 ("drivers/bus: move driver assignment to end of probing") > > It would not segfault if you call rte_eth_dev_probing_finish() at the > real end of the probing function. Then the port will be considered not > valid in rte_eth_bond_8023ad_agg_selection_set(). > It does not solve your problem but it is more correct. > So I suggest to revert this patch (which was a wrong fix): > http://git.dpdk.org/dpdk/commit/?id=1620175 Or just make the change proposed in this commit and also move this section before the probing finish. This is performing initial setup of the interface and it doesn't need to use the public API to do this. And this should be done before the public API can access the device. > Then the issue is to allow configuring a port before the end of probing. That shouldn't be allowed of course. > This patch is workarounding the public API which checks port validity. > I think it is a good approach.