From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: [PATCH] examples/load_balancer: enable the build for lesser lcores Date: Mon, 17 Jul 2017 14:11:42 +0530 Message-ID: <1500280902-7333-1-git-send-email-hemant.agrawal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain Cc: To: Return-path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0064.outbound.protection.outlook.com [104.47.32.64]) by dpdk.org (Postfix) with ESMTP id 814982C6A for ; Mon, 17 Jul 2017 10:41:51 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" load_balancer app can also work for lower number of cores. Limit the cores Worker and IO cores to 16 as defined in original App. Otherwise use the actual number of lcores as MAX. Signed-off-by: Hemant Agrawal --- examples/load_balancer/main.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/load_balancer/main.h b/examples/load_balancer/main.h index d98468a..8b8963d 100644 --- a/examples/load_balancer/main.h +++ b/examples/load_balancer/main.h @@ -56,10 +56,11 @@ #endif #ifndef APP_MAX_IO_LCORES +#if (APP_MAX_LCORES > 16) #define APP_MAX_IO_LCORES 16 +#else +#define APP_MAX_IO_LCORES APP_MAX_LCORES #endif -#if (APP_MAX_IO_LCORES > APP_MAX_LCORES) -#error "APP_MAX_IO_LCORES is too big" #endif #ifndef APP_MAX_NIC_RX_QUEUES_PER_IO_LCORE @@ -74,10 +75,11 @@ #endif #ifndef APP_MAX_WORKER_LCORES +#if (APP_MAX_LCORES > 16) #define APP_MAX_WORKER_LCORES 16 +#else +#define APP_MAX_WORKER_LCORES APP_MAX_LCORES #endif -#if (APP_MAX_WORKER_LCORES > APP_MAX_LCORES) -#error "APP_MAX_WORKER_LCORES is too big" #endif -- 2.7.4