From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 92EC02C2E for ; Fri, 8 Sep 2017 11:48:55 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Sep 2017 02:48:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,360,1500966000"; d="scan'208";a="1216279186" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.57]) ([10.237.220.57]) by fmsmga002.fm.intel.com with ESMTP; 08 Sep 2017 02:48:53 -0700 To: "Singh, Jasvinder" , "dev@dpdk.org" Cc: "Dumitrescu, Cristian" , "thomas@monjalon.net" References: <20170626164334.50621-2-jasvinder.singh@intel.com> <20170811124929.118564-1-jasvinder.singh@intel.com> <20170811124929.118564-2-jasvinder.singh@intel.com> <97795b7b-bfb4-f9da-b847-9b313916c374@intel.com> <54CBAA185211B4429112C315DA58FF6D3324AD8D@IRSMSX103.ger.corp.intel.com> From: Ferruh Yigit Message-ID: <2177af92-1192-a6c4-9dad-566c8ca3845e@intel.com> Date: Fri, 8 Sep 2017 10:48:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <54CBAA185211B4429112C315DA58FF6D3324AD8D@IRSMSX103.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3 1/4] net/softnic: add softnic PMD 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: Fri, 08 Sep 2017 09:48:56 -0000 On 9/8/2017 10:30 AM, Singh, Jasvinder wrote: > Hi Ferruh, > > Thank you for the review and feedback. Please see inline response; > >> -----Original Message----- >> From: Yigit, Ferruh >> Sent: Tuesday, September 5, 2017 3:53 PM >> To: Singh, Jasvinder ; dev@dpdk.org >> Cc: Dumitrescu, Cristian ; >> thomas@monjalon.net >> Subject: Re: [PATCH v3 1/4] net/softnic: add softnic PMD >> >> On 8/11/2017 1:49 PM, Jasvinder Singh wrote: >>> Add SoftNIC PMD to provide SW fall-back for ethdev APIs. >>> >>> Signed-off-by: Cristian Dumitrescu >>> Signed-off-by: Jasvinder Singh <...> >>> + >>> + /* Default */ >>> + status = default_init(p, params, numa_node); >>> + if (status) { >>> + rte_free(p); >>> + return NULL; >>> + } >>> + >>> + return p; >>> +} >>> + >>> +static void >>> +pmd_free(struct pmd_internals *p) >>> +{ >>> + default_free(p); >> >> p->hard.name also needs to be freed here. > > No, we don't allocate any memory to this varibale as it points to the value retrieved from the rte_eth_dev_get_port_by_name(); I guess it is otherway around, the rte_eth_dev_get_port_by_name() uses hard.name to get and store the port_id of the underlying hw. how hard.name set, if I don't miss anything, it is strdup from devargs: -- ret = rte_kvargs_process(kvlist, PMD_PARAM_HARD_NAME, &get_string, &p->hard.name); -- get_string() *(char **)extra_args = strdup(value); --