From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] app/testpmd: support non contiguous socket ids Date: Sun, 07 May 2017 14:14:49 +0200 Message-ID: <213478826.uc3EAffF5t@xps> References: <20170503134429.22723-1-shahafs@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, jingjing.wu@intel.com, stable@dpdk.org To: Shahaf Shuler Return-path: In-Reply-To: <20170503134429.22723-1-shahafs@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.