From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 42C894372C; Mon, 18 Dec 2023 08:49:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E6D840E78; Mon, 18 Dec 2023 08:49:27 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2050.outbound.protection.outlook.com [40.107.244.50]) by mails.dpdk.org (Postfix) with ESMTP id 4CE7D40DDB; Mon, 18 Dec 2023 08:49:25 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GYE6iUl8CA0BiuLKy+ZfztlMSg8WQqVSsun+suBz3itzwqgaGtg1qxWrm/hMVyvxo+9DgFiMADiM9EZdlAkCJt04AArvcWWlOY0jtH/FyTzUeSijVCHlw+k0dc1GeIPn4aCkGpLEPBCnLKvfp6gPdhu5agHKVPE8IpSvNXuSu+NvO7gSp+j2u3WseKDEy8ZKzbdURtMRLhXwyX3inKe3hQ19b01ErVvBNujwIznUhGmiidTFzAoKpn/nafj6Mum5SXk7ByIvyha+Va/EZG4Z4BQOxtHdq/HXoPeMwc0VItIDiPWMbT6zpvx0jfei12bDFieTNLyXrybwUtgm0HgSDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3FxPbbY2wHmlFk7VjKHA8lesOUoPv/shc8XoFWT+kIY=; b=Gpv1WkETvUruL+cZV//lGSorwcr1mccr2nltZ2fUOuG2JjhkLN9qLvfoctID6j0f8HhfczMElDfhYbDpYci0uev8hupqBpxX2axXPL/BYyqkAl6GTAopCxYY4gxMLxNifCQU8GYkLk8FVvScvruadNgHA7RlHESjUDYbFNGQTLQjEBBtvXP6XA+n/za65ivkbjhv+weSBCr168GWdC1f7rBbbxGIWU4XQygdLBWAdGdX9y/K5t3L89kzDrD6Z41t+qFwu9nSdKo09suqFQk8TLRP+IbrOJad4MIP+FD2phX0oH4gHAuFcaFXstepc7yQ2PV2tEhOMhV69m9Rivag9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3FxPbbY2wHmlFk7VjKHA8lesOUoPv/shc8XoFWT+kIY=; b=Xablr7FQyZpheg/TXirEBpZh9/HbpGc5NH2JjU5KcHTJVEqHzr2Mp/vDy1Yt5ntLSNat7gEOy60OsjrpsxNKpxvJ9Cp/+d7eJcVCf0BYgVecEs8LINTadhGtU+6RPMKADdcGZPQ8S4bcGUqNPtrLSjzRDg89M+N40EGsmONEtYo= Received: from MW2PR16CA0017.namprd16.prod.outlook.com (2603:10b6:907::30) by SA1PR12MB8859.namprd12.prod.outlook.com (2603:10b6:806:37c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Mon, 18 Dec 2023 07:49:21 +0000 Received: from MWH0EPF000989EB.namprd02.prod.outlook.com (2603:10b6:907:0:cafe::f9) by MW2PR16CA0017.outlook.office365.com (2603:10b6:907::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37 via Frontend Transport; Mon, 18 Dec 2023 07:49:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by MWH0EPF000989EB.mail.protection.outlook.com (10.167.241.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7113.14 via Frontend Transport; Mon, 18 Dec 2023 07:49:21 +0000 Received: from 7dbylenovo.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 18 Dec 2023 01:49:19 -0600 From: Sivaprasad Tummala To: , , , , , , , CC: , , Subject: [PATCH 3/6] examples/l3fwd-graph: fix lcore ID restriction Date: Mon, 18 Dec 2023 07:49:02 +0000 Message-ID: <20231218074905.42749-3-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218074905.42749-1-sivaprasad.tummala@amd.com> References: <20231218074905.42749-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EB:EE_|SA1PR12MB8859:EE_ X-MS-Office365-Filtering-Correlation-Id: c6b62dde-f726-4700-66fc-08dbff9dd8b3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XLT9Y06Ta5OWdj01oY4aOYQSSX801urDSUdPq5aZTkykBoSMcYJRn/e7OlKr7DOkrvwmAsTAmDE0ttFnjiRzkfNexw6voKYsJht6KVcIjWkXgpIJjfQD+Ku4QoN4ZPfJp43fVwsxLQwWLmoxbXM/d6gAsfHzxy+mVRKqYvlS0PnSzG6KNY4SHFp+ElXWhoGVqb3yr5bINLwtJXOSo4fePTnbjcFYdplrxDMcoYOUxQZhKfQlbQfmWP6WD59dQ4lRiA9Yy+LJ3HHKgSVlHK4geq9D1accwsogdxCgZFWR6N9byiYRkaSsuzUVCwyc57BN/i30K7rim5hOoUwkvLuQ8dRIxunLacJjlY5QELf/CqL/KqbL7tPC/xcqdnYeqge+2dL5nTvY56vhOvA1UA58eFVAEYKoFhr+cxB/9q6ExEuGaLEFQBJmFIa1aR1YVhASXXPIkbisZJyIVj4cf8fq8aapFNA5XAccwZUjXxA+s4rMjihsU3smrE6RsTCFnZkoXV2f9hBH97n3iLyrVYyiZ26S20i1xLPZNqV1xaB4WuQ/j31fBmGnJfIX7zdD1YkooBQ8CF0kCi0oNEYkuNbNK6PdGHB1AlPRSU2XaKCDad4LZ9QJaz90490TGD+iu5I1jUS0LsQj6g4mWtSjcsJIjtKQ89emCegZMc8Fcvqo5yt4wQt0CRLfIlvrx2Mxi8CkTmoLqfXnVtfXADhQyoLt1ao/FEwIyzgKCMhGHEJehxlSjZ1KCiZTep7RBZ/rRrmwkoZGi+721p6nS08hZ+7XyQ== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(396003)(376002)(136003)(39860400002)(346002)(230922051799003)(1800799012)(82310400011)(451199024)(186009)(64100799003)(46966006)(36840700001)(40470700004)(40480700001)(478600001)(2616005)(1076003)(70586007)(336012)(426003)(83380400001)(6666004)(70206006)(316002)(54906003)(110136005)(5660300002)(44832011)(7696005)(47076005)(8676002)(4326008)(8936002)(36860700001)(26005)(16526019)(7416002)(40460700003)(2906002)(81166007)(356005)(82740400003)(41300700001)(86362001)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2023 07:49:21.1922 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c6b62dde-f726-4700-66fc-08dbff9dd8b3 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000989EB.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8859 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Currently the config option allows lcore IDs up to 255, irrespective of RTE_MAX_LCORES and needs to be fixed. The patch allows config options based on DPDK config. Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton") Cc: ndabilpuram@marvell.com Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala --- examples/l3fwd-graph/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c index 96cb1c81ff..149677a3cc 100644 --- a/examples/l3fwd-graph/main.c +++ b/examples/l3fwd-graph/main.c @@ -111,7 +111,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE]; struct lcore_params { uint16_t port_id; uint8_t queue_id; - uint8_t lcore_id; + uint16_t lcore_id; } __rte_cache_aligned; static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS]; @@ -205,9 +205,9 @@ check_worker_model_params(void) static int check_lcore_params(void) { - uint8_t queue, lcore; + uint8_t queue; int socketid; - uint16_t i; + uint16_t i, lcore; for (i = 0; i < nb_lcore_params; ++i) { queue = lcore_params[i].queue_id; @@ -282,7 +282,7 @@ static int init_lcore_rx_queues(void) { uint16_t i, nb_rx_queue; - uint8_t lcore; + uint16_t lcore; for (i = 0; i < nb_lcore_params; ++i) { lcore = lcore_params[i].lcore_id; @@ -452,7 +452,7 @@ parse_config(const char *q_arg) lcore_params_array[nb_lcore_params].queue_id = (uint8_t)int_fld[FLD_QUEUE]; lcore_params_array[nb_lcore_params].lcore_id = - (uint8_t)int_fld[FLD_LCORE]; + (uint16_t)int_fld[FLD_LCORE]; ++nb_lcore_params; } lcore_params = lcore_params_array; -- 2.25.1