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 546A7A0518 for ; Fri, 24 Jul 2020 14:05:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4B4CC1C0CC; Fri, 24 Jul 2020 14:05:45 +0200 (CEST) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by dpdk.org (Postfix) with ESMTP id D70541C0D0 for ; Fri, 24 Jul 2020 14:05:43 +0200 (CEST) Received: by mail-wm1-f50.google.com with SMTP id k20so395535wmi.5 for ; Fri, 24 Jul 2020 05:05:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZPoIKvB+h+mQMlnIy+3gaCRRrEvmFotnig+hj+RaC6M=; b=UoRGVrmLnWPV1Wl8TZBqJXWUD8Vg6h44xK5c60rmoc3Twxg9gwOEwZq6Su74ePnlRH iLMB7JW1cJDlXoWIWtv7vT9jY0Mj0IdrJs0//nf98SBqt0ymY49m7WolPWArkkBFcnKW 8e7OEs4QJnPaxP6W+3T0LhZUpZQKVIygV1KuzQZGu0UZK3vG+wDgC7lMqNMp9x3lKfL2 egg/spdO/zgQgCa8sOmJdVlU0To+pUy71ftxmysjSIYFl0otmQNJ80sId34ZrvKM0guG YpmnmSPWZO+MUnpBRT7hCI1AAV673oD7PR67/szoQ1UY1VTYnA3LOVxQngFpS8p37p5Q W9Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZPoIKvB+h+mQMlnIy+3gaCRRrEvmFotnig+hj+RaC6M=; b=nOiHxQP6TSbi05jXD7p6mQUO9iQQbur+ZjpnwtTwbzV0AM+10UQK08x3y8TkjVzG/g WQFKRPXZ6ttZqZCdS4OnklEQRDaUVoQuWYR2Ot5o5ruCNIrWd9EsL005Z5NK08p6gqzr +g2URSr6T8BzooRNmy5ibpEn8n7xHDdro9KojeqDuMGHwS+3qVgEFO6/n5lkc321hVOV EY54qwN4DJWTEo9Jh1pouIfQzSaWghDZBjsbgX2HjmS6C5HpR5RTydd5k19syus7ILQU B6zKgzGR0iUc6xcwsAi+VTnicWjq7QRqnIczSGa/cf8rfViTsYkSSF7eNIqzLqpZYdiy iyCQ== X-Gm-Message-State: AOAM533ZSkibsP2kL5/xO+IXTbVzNZCKE57rYxfd8I4FBUiE/hXPPsD2 oYvBsTwZJ1KITNcRFPVjI2qsgLtBsmSKHA== X-Google-Smtp-Source: ABdhPJwfLmdEpPdWL7l7A9+6fGG3pq05uSfhx3b4z/DyZSQnLd9d3jP4i2mSjCU7zfUNdBuds1oSZQ== X-Received: by 2002:a1c:cc0c:: with SMTP id h12mr6351414wmb.111.1595592343614; Fri, 24 Jul 2020 05:05:43 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id i14sm1550433wrc.19.2020.07.24.05.05.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:05:42 -0700 (PDT) From: luca.boccassi@gmail.com To: Harry van Haaren Cc: Jun W Zhou , Mao Jiang , dpdk stable Date: Fri, 24 Jul 2020 12:58:32 +0100 Message-Id: <20200724120030.1863487-74-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/eventdev: fix 32-bit coremask' has been queued to stable release 19.11.4 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 stable release 19.11.4 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/26/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. Thanks. Luca Boccassi --- >From 11908b39262384c5a2cd96e6a27ef5b259e61e49 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 21958269f..4ac582153 100644 --- a/examples/eventdev_pipeline/main.c +++ b/examples/eventdev_pipeline/main.c @@ -81,7 +81,7 @@ parse_coremask(const char *coremask) val = xdigit2val(c); for (j = 0; j < BITS_HEX && idx < MAX_NUM_CORE; j++, idx++) { if ((1 << j) & val) { - mask |= (1UL << idx); + mask |= (1ULL << idx); count++; } } @@ -232,10 +232,10 @@ parse_app_args(int argc, char **argv) usage(); 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]) cdata.num_workers++; diff --git a/examples/eventdev_pipeline/pipeline_common.h b/examples/eventdev_pipeline/pipeline_common.h index c7245f7f0..6a4287602 100644 --- a/examples/eventdev_pipeline/pipeline_common.h +++ b/examples/eventdev_pipeline/pipeline_common.h @@ -51,10 +51,10 @@ struct fastpath_data { bool rx_single; 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.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:51.431352056 +0100 +++ 0074-examples-eventdev-fix-32-bit-coremask.patch 2020-07-24 12:53:48.299006683 +0100 @@ -1,14 +1,15 @@ -From ff0f1040b66edcbaf93fc217ea452e4a9ae424e2 Mon Sep 17 00:00:00 2001 +From 11908b39262384c5a2cd96e6a27ef5b259e61e49 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") -Cc: stable@dpdk.org Reported-by: Jun W Zhou Suggested-by: Mao Jiang