From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4C469A053D for ; Fri, 17 Jul 2020 18:33:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 436361BEB4; Fri, 17 Jul 2020 18:33:07 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 9004F1BEDF for ; Fri, 17 Jul 2020 18:33:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595003585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yIA/ldsHwEfpRgDR4bhBBFFlM4rQraItfcIwEq4rN2Q=; b=OMTIgzcUcYfk8HeR8RSQoIJnOk21qlWWtAIk82eV6kZK4tYPp7AjOjfXW5Tcq7ZPi4afSW c6lFjSrEPsc1cb+Cl9wb7Hab2cPLWfGaA0vgP7o26kLjTETOdU3pRVuHrhBCx+V8SJX73M sjBukr9ujjh3oqkkzYI1IYijsCkiuXo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-163-OxUH7seGOLKepw8Jch-G1A-1; Fri, 17 Jul 2020 12:32:55 -0400 X-MC-Unique: OxUH7seGOLKepw8Jch-G1A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F13EC1081; Fri, 17 Jul 2020 16:32:53 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2DE57555D; Fri, 17 Jul 2020 16:32:52 +0000 (UTC) From: Kevin Traynor To: Harry van Haaren Cc: Jun W Zhou , Mao Jiang , dpdk stable Date: Fri, 17 Jul 2020 17:32:07 +0100 Message-Id: <20200717163214.4839-19-ktraynor@redhat.com> In-Reply-To: <20200717163214.4839-1-ktraynor@redhat.com> References: <20200717163214.4839-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/eventdev: fix 32-bit coremask' has been queued to LTS release 18.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/23/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/a11b34f6f2c3dad84f5fc876553ee40c087fe1ca Thanks. Kevin. --- >From a11b34f6f2c3dad84f5fc876553ee40c087fe1ca Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Tue, 16 Jun 2020 17:56:03 +0100 Subject: [PATCH] examples/eventdev: fix 32-bit coremask [ upstream commit ff0f1040b66edcbaf93fc217ea452e4a9ae424e2 ] This commit fixes a bug in 32-bit environments when a core mask greater than 32-bits is requested. The fix is to convert the bitmask logic to 64 bits, aligning 64 and 32 bit implementations. Fixes: adb5d548 ("examples/eventdev_pipeline_sw_pmd: add sample app") Reported-by: Jun W Zhou Suggested-by: Mao Jiang Signed-off-by: Harry van Haaren --- examples/eventdev_pipeline/main.c | 10 +++++----- examples/eventdev_pipeline/pipeline_common.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c index 85d8a624bc..86c42aa9c2 100644 --- a/examples/eventdev_pipeline/main.c +++ b/examples/eventdev_pipeline/main.c @@ -82,5 +82,5 @@ parse_coremask(const char *coremask) for (j = 0; j < BITS_HEX && idx < MAX_NUM_CORE; j++, idx++) { if ((1 << j) & val) { - mask |= (1UL << idx); + mask |= (1ULL << idx); count++; } @@ -233,8 +233,8 @@ parse_app_args(int argc, char **argv) for (i = 0; i < MAX_NUM_CORE; i++) { - fdata->rx_core[i] = !!(rx_lcore_mask & (1UL << i)); - fdata->tx_core[i] = !!(tx_lcore_mask & (1UL << i)); - fdata->sched_core[i] = !!(sched_lcore_mask & (1UL << i)); - fdata->worker_core[i] = !!(worker_lcore_mask & (1UL << i)); + fdata->rx_core[i] = !!(rx_lcore_mask & (1ULL << i)); + fdata->tx_core[i] = !!(tx_lcore_mask & (1ULL << i)); + fdata->sched_core[i] = !!(sched_lcore_mask & (1ULL << i)); + fdata->worker_core[i] = !!(worker_lcore_mask & (1ULL << i)); if (fdata->worker_core[i]) diff --git a/examples/eventdev_pipeline/pipeline_common.h b/examples/eventdev_pipeline/pipeline_common.h index 016a3f702b..b3fdf084ba 100644 --- a/examples/eventdev_pipeline/pipeline_common.h +++ b/examples/eventdev_pipeline/pipeline_common.h @@ -52,8 +52,8 @@ struct fastpath_data { bool tx_single; bool sched_single; - unsigned int rx_core[MAX_NUM_CORE]; - unsigned int tx_core[MAX_NUM_CORE]; - unsigned int sched_core[MAX_NUM_CORE]; - unsigned int worker_core[MAX_NUM_CORE]; + uint64_t rx_core[MAX_NUM_CORE]; + uint64_t tx_core[MAX_NUM_CORE]; + uint64_t sched_core[MAX_NUM_CORE]; + uint64_t worker_core[MAX_NUM_CORE]; struct setup_data cap; } __rte_cache_aligned; -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-17 17:17:01.063144606 +0100 +++ 0019-examples-eventdev-fix-32-bit-coremask.patch 2020-07-17 17:16:59.994771125 +0100 @@ -1 +1 @@ -From ff0f1040b66edcbaf93fc217ea452e4a9ae424e2 Mon Sep 17 00:00:00 2001 +From a11b34f6f2c3dad84f5fc876553ee40c087fe1ca Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ff0f1040b66edcbaf93fc217ea452e4a9ae424e2 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 21958269f7..4ac5821539 100644 +index 85d8a624bc..86c42aa9c2 100644 @@ -46 +47 @@ -index c7245f7f0f..6a4287602e 100644 +index 016a3f702b..b3fdf084ba 100644