[dpdk-dev] [PATCH v2 2/2] app/testpmd: enable ddp remove profile feature
Ferruh Yigit
ferruh.yigit at intel.com
Tue Jun 27 11:55:51 CEST 2017
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 <andrey.chilikin at intel.com>
<...>
> @@ -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
More information about the dev
mailing list