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 3C529235 for ; Tue, 27 Jun 2017 11:55:58 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2017 02:55:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,399,1493708400"; d="scan'208";a="101867929" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.91]) ([10.237.220.91]) by orsmga004.jf.intel.com with ESMTP; 27 Jun 2017 02:55:52 -0700 To: Andrey Chilikin , dev@dpdk.org Cc: beilei.xing@intel.com, jingjing.wu@intel.com References: <1495901077-11845-1-git-send-email-andrey.chilikin@intel.com> <1498551492-17214-3-git-send-email-andrey.chilikin@intel.com> From: Ferruh Yigit Message-ID: <4760b55e-875a-c6a7-dde2-ae0bd3ea4e33@intel.com> Date: Tue, 27 Jun 2017 10:55:51 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1498551492-17214-3-git-send-email-andrey.chilikin@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 2/2] app/testpmd: enable ddp remove profile feature 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 Jun 2017 09:56:00 -0000 On 6/27/2017 9:18 AM, Andrey Chilikin wrote: > New command 'ddp del (port) (profile_path)' removes previously > loaded profile and deletes it from the list of the loaded profiles. > > Signed-off-by: Andrey Chilikin <...> > @@ -12860,6 +12863,9 @@ cmd_ddp_add_parsed( > struct cmd_ddp_add_result *res = parsed_result; > uint8_t *buff; > uint32_t size; > + char *filepath; > + char *file_fld[2]; > + int file_num; > int ret = -ENOTSUP; > > if (res->port_id > nb_ports) { > @@ -12872,9 +12878,18 @@ cmd_ddp_add_parsed( > return; > } > > - buff = open_ddp_package_file(res->filepath, &size); > - if (!buff) > + filepath = strdup(res->filepath); > + if (filepath == NULL) { > + printf("Failed to allocate memory\n"); > return; > + } > + file_num = rte_strsplit(filepath, strlen(filepath), file_fld, 2, ','); > + > + buff = open_ddp_package_file(file_fld[0], &size); > + if (!buff) { > + free((void *)filepath); > + return; > + } <...> Can you please export ddp_add related changes into different patch? Thanks, ferruh