[dpdk-dev] [PATCH v2] app/testpmd: support non contiguous socket ids

Thomas Monjalon thomas at monjalon.net
Sun May 7 14:14:49 CEST 2017


03/05/2017 15:44, Shahaf Shuler:
> +			printf("Invalid socket id, options are: ");
> +			for (i = 0; i < num_sockets; i++) {
> +				printf("%u%s", socket_ids[i],
> +				(i == num_sockets - 1) ? "\n" : ",");
[...]
> +			printf("Invalid socket id, options are: ");
> +			for (i = 0; i < num_sockets; i++) {
> +				printf("%u%s", socket_ids[i],
> +				(i == num_sockets - 1) ? "\n" : ",");
[...]
> +					printf("socket id options are: ");
> +					for (i = 0; i < num_sockets; i++) {
> +						printf("%u%s", socket_ids[i],
> +						(i == num_sockets - 1) ?
> +						"\n" : ",");

It is three times the same copy pasted code.
Please make a function.


More information about the dev mailing list