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 1F1C5A00C2 for ; Thu, 13 Oct 2022 01:51:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A875042CC4; Thu, 13 Oct 2022 01:51:09 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id B1CDE42C27; Thu, 13 Oct 2022 01:51:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665618665; x=1697154665; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GY8NflP+AHL895eegPOvOeOvNKmF3B++ggChPIyyCo4=; b=P/tKFQQ5gnpezdbG8adcF1G2bhmo1OaESoqL/DhqFH8Pi/ipCZdUSgMc Ydud5Vnar4k43/7mb7BYgNgghz6Kw6U42liGwNsi85w0rhhMzfarjKypf sfXPESVbSXGndhFgfCDG4U6J1O5Tj9x0LWOYFl6fqfIHOhxBwHqeYXEr8 W9qQIqVVW9C1V67HIYT9bOPNPjfiGxGDfMK9jpBsaS0ZueVw8gLlBPqAH Iaa3bkThIudT/1k4PzctSW8euZx0tSin2WOm1IJExALX1S58mttbocofY IV/HfkcS22lTzLc1fG/NciGdKH+X38UfHPqKcKvXqHMGcp77pMWUBYjtc Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="366936413" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="366936413" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2022 16:50:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="604746860" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="604746860" Received: from txanpdk02.an.intel.com ([10.123.117.76]) by orsmga006.jf.intel.com with ESMTP; 12 Oct 2022 16:50:44 -0700 From: Abdullah Sevincer To: dev@dpdk.org Cc: jerinj@marvell.com, Abdullah Sevincer , stable@dpdk.org Subject: [PATCH v2 4/4] event/dlb2: fix port cos override calculation Date: Wed, 12 Oct 2022 18:50:37 -0500 Message-Id: <20221012235037.3293072-4-abdullah.sevincer@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221012235037.3293072-1-abdullah.sevincer@intel.com> References: <20221012143247.3239356-1-abdullah.sevincer@intel.com, shivani.doneria@intel.com> <20221012235037.3293072-1-abdullah.sevincer@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org This commit fixes a calculation error of total number of ldb ports during port cos override from dlb2 event structure. Fixes: bec8901bfe9f ("event/dlb2: support ldb port specific COS") Cc: stable@dpdk.org Signed-off-by: Abdullah Sevincer --- drivers/event/dlb2/dlb2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c index b200c9484e..02f0e57208 100644 --- a/drivers/event/dlb2/dlb2.c +++ b/drivers/event/dlb2/dlb2.c @@ -848,10 +848,11 @@ dlb2_hw_create_sched_domain(struct dlb2_eventdev *dlb2, } cfg->cos_strict = 0; /* Best effort */ - cfg->num_cos_ldb_ports[0] = resources_asked->num_ldb_ports - cos_ports; + cfg->num_cos_ldb_ports[0] = dlb2->cos_ports[0]; cfg->num_cos_ldb_ports[1] = dlb2->cos_ports[1]; cfg->num_cos_ldb_ports[2] = dlb2->cos_ports[2]; cfg->num_cos_ldb_ports[3] = dlb2->cos_ports[3]; + cfg->num_ldb_ports = resources_asked->num_ldb_ports - cos_ports; if (device_version == DLB2_HW_V2) cfg->num_ldb_credits = resources_asked->num_ldb_credits; -- 2.25.1