From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A9008A04C0; Fri, 25 Sep 2020 10:52:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3FCA11DD87; Fri, 25 Sep 2020 10:52:37 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 74E001DD85 for ; Fri, 25 Sep 2020 10:52:36 +0200 (CEST) IronPort-SDR: UiJo+k6PIyDIyYfA/pDuK2tbpOIUpaUZK36ugIjbnZdWE2ZCfldQPK2dnG0UG5GIpxKDrMdfAW PHohmLTFeikQ== X-IronPort-AV: E=McAfee;i="6000,8403,9754"; a="141503188" X-IronPort-AV: E=Sophos;i="5.77,301,1596524400"; d="scan'208";a="141503188" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 01:52:35 -0700 IronPort-SDR: 1EOol/C71dc5VeHCEiZHNi28bTPH/0wJ+AwPG5VAE7YqOcF8PUHZ4nnuptlPuWk2MSJu22Mq4s slzH1G6IBvYQ== X-IronPort-AV: E=Sophos;i="5.77,301,1596524400"; d="scan'208";a="487387158" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.252.10.211]) ([10.252.10.211]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 01:52:34 -0700 To: Thomas Monjalon Cc: dev@dpdk.org, arybchenko@solarflare.com, Tetsuya Mukawa , Anatoly Burakov References: <20200913220711.3768597-1-thomas@monjalon.net> <736c2ece-136d-19d0-e7bf-a23f5382a36f@intel.com> <3167472.YmleaKYWZ9@thomas> <9908596.DBVW2PyNQy@thomas> From: Ferruh Yigit Message-ID: <315841ef-2f36-6a43-0855-416a8e1b3b4b@intel.com> Date: Fri, 25 Sep 2020 09:52:32 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <9908596.DBVW2PyNQy@thomas> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 10/20] net/null: release port upon close 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 9/24/2020 10:58 PM, Thomas Monjalon wrote: > 23/09/2020 22:47, Thomas Monjalon: >> 23/09/2020 18:44, Ferruh Yigit: >>> On 9/13/2020 11:07 PM, Thomas Monjalon wrote: >>>> The flag RTE_ETH_DEV_CLOSE_REMOVE is set so all port resources >>>> can be freed by rte_eth_dev_close(). >>>> >>>> Signed-off-by: Thomas Monjalon >>>> --- >>>> --- a/drivers/net/null/rte_eth_null.c >>>> +++ b/drivers/net/null/rte_eth_null.c >>>> +static int >>>> +eth_dev_close(struct rte_eth_dev *dev) >>>> +{ >>>> + PMD_LOG(INFO, "Closing null ethdev on NUMA socket %u", >>>> + rte_socket_id()); >>>> + >>>> + /* mac_addrs must not be freed alone because part of dev_private */ >>>> + dev->data->mac_addrs = NULL; >>>> + >>>> + return 0; >>>> +} >>> >>> should check 'RTE_PROC_PRIMARY' in 'eth_dev_close()'? >> >> Yes, looks to be a miss for this new function. > > Sorry no, this function is not freeing any shared data, > so no restriction on secondary process. > "dev->data->mac_addrs = NULL", won't this change the shared data?