[dpdk-dev] [PATCH v2 3/5] app/testpmd: add command for writing personalization profile

Ferruh Yigit ferruh.yigit at intel.com
Wed Mar 8 13:10:34 CET 2017


On 3/3/2017 7:39 AM, Beilei Xing wrote:
> This patch is to add testpmd CLI for writing personalization
> profile.
> 
> Signed-off-by: Beilei Xing <beilei.xing at intel.com>

<...>

> +static void
> +cmd_write_ppp_parsed(
> +	void *parsed_result,
> +	__attribute__((unused)) struct cmdline *cl,
> +	__attribute__((unused)) void *data)
> +{
> +	struct cmd_write_ppp_result *res = parsed_result;
> +	uint8_t *buff;
> +	int ret = -ENOTSUP;
> +
> +	if (res->port_id > nb_ports) {
> +		printf("Invalid port, range is [0, %d]\n", nb_ports - 1);
> +		return;
> +	}
> +
> +	if (!all_ports_stopped()) {
> +		printf("Please stop all ports first\n");
> +		return;
> +	}
> +
> +	buff = open_package_file(res->filename);

Can you please update function name to indicate package is ppp package

> +	if (!buff)
> +		return;
> +
> +	ret = i40e_process_package(res->port_id, buff);

What if i40e support not compiled into library?

> +	if (ret < 0)
> +		printf("Failed to write profile.\n");
> +
> +	close_package_file(buff);
> +}
> +

<...>


More information about the dev mailing list