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 50075A034C for ; Fri, 25 Feb 2022 18:18:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47FED410FD; Fri, 25 Feb 2022 18:18:31 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id 8B51B410FD for ; Fri, 25 Feb 2022 18:18:29 +0100 (CET) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id EA9B640303 for ; Fri, 25 Feb 2022 17:18:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645809507; bh=enJM4dQbA/vkt0/XzArL54ApxyDvU4iqvMQv1L5HOHQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=k6TvjnUThhx7+odULXhPq3f7c/PZwBDvBAOFvM0ZEIcuZyA/pI0uFkUyAtIDgHvTe slZVqUdQwlpK4jaLfVGOHjP0rk+eK2mms91n0R8h2uTU9lzmG6l202b0a/eX6hCxCJ LyRwq+0aGVpZMoiTkWV5vvJgbVJG+Kxy6MJzL/cRcge/HQF/DZa9Vlg0Qp4k0kSmxa eo2PzR2Ol40XHb7mFiBOnIEfdWkEKW0MFvAQSy+HVekkLJISIunzvhVXaZn/besRqV pNorwlbpbng0Jktz1RswH4tB89tBla+Z33etREHubegZSD6CHh0kgxp7cnPxlvHsEz I4QpQEbhUDQRQ== Received: by mail-wm1-f70.google.com with SMTP id c5-20020a1c3505000000b0034a0dfc86aaso1836677wma.6 for ; Fri, 25 Feb 2022 09:18:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=enJM4dQbA/vkt0/XzArL54ApxyDvU4iqvMQv1L5HOHQ=; b=itcFMxSlBRlZBMVVaQ29w7f5EuVTsvAfoQtJuFvwHBLkOdWDAhSZtY/547BDxPvBOm z1Is0dU73JB0TzE9sGEfyhYaw+z870VTzbWppfPV+kv2F13x896Fd+CIa9fqpLYZs3e+ PSR+zu9rqDyDOHbNh6x9t1ozNSAhYpqayFJPxjPKWBncO0j5vDlg0b1vGDgIAOtYE2Ah KGNyTMWf5I67bYWDsQYIC4LPbjCDlaxAObzAzJqdrf3t0wdLguEjGJguBP2W64bMct+P KZe9HCevxe73wdqdxMesl9gzntbywFv9xp+IttCW16ayElLiuupmi2vV3EjgaciIdSAv rwYg== X-Gm-Message-State: AOAM530aGdc/JBolefiUIz8GRNVYoBwe9eaCAwGQA2jqpsNNbpLnCsek 63WGUfeyVRcve/cdRdf9NnbiF7XM4RYyRbfCJF/ApW1+mUj3syHj2F7a9dLTu5EIVq1i35l7Opn mzmZnmrcqlOnzoE4egkTOqrsL X-Received: by 2002:adf:fc48:0:b0:1ef:7cb8:56bd with SMTP id e8-20020adffc48000000b001ef7cb856bdmr873227wrs.665.1645809504581; Fri, 25 Feb 2022 09:18:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwtjkX+k4y9T0NShnof9nA0VKbYTOksX6CdDA5s8utuBAWIH2ZJIRnYKD8DDGcT/Vr+JgwlaQ== X-Received: by 2002:adf:fc48:0:b0:1ef:7cb8:56bd with SMTP id e8-20020adffc48000000b001ef7cb856bdmr873217wrs.665.1645809504378; Fri, 25 Feb 2022 09:18:24 -0800 (PST) Received: from Keschdeichel.fritz.box (068-133-067-156.ip-addr.inexio.net. [156.67.133.68]) by smtp.gmail.com with ESMTPSA id u4-20020adfdb84000000b001e8d8ac5394sm2880337wri.110.2022.02.25.09.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 09:18:23 -0800 (PST) From: christian.ehrhardt@canonical.com To: Kathleen Capella Cc: Honnappa Nagarahalli , Qi Zhang , dpdk stable Subject: patch 'net/iavf: count continuous DD bits for Arm' has been queued to stable release 19.11.12 Date: Fri, 25 Feb 2022 18:15:47 +0100 Message-Id: <20220225171550.3499040-54-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220225171550.3499040-1-christian.ehrhardt@canonical.com> References: <20220225171550.3499040-1-christian.ehrhardt@canonical.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 Hi, FYI, your patch has been queued to stable release 19.11.12 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/27/22. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/55f2ea35c7cafdb178e59862d66eaf73b3282706 Thanks. Christian Ehrhardt --- >From 55f2ea35c7cafdb178e59862d66eaf73b3282706 Mon Sep 17 00:00:00 2001 From: Kathleen Capella Date: Sat, 5 Feb 2022 00:26:29 +0000 Subject: [PATCH] net/iavf: count continuous DD bits for Arm [ upstream commit 3d88d5e401f6d04882415866012a98bced0c3cb8 ] On Arm platforms, reading of descriptors may be re-ordered causing the status of DD bits to be discontinuous. Add logic to only process continuous descriptors by checking DD bits. Fixes: 1060591eada5 ("net/avf: enable bulk allocate Rx") Signed-off-by: Kathleen Capella Reviewed-by: Honnappa Nagarahalli Reviewed-by: Qi Zhang --- drivers/net/iavf/iavf_rxtx.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index bc67712d9c..d406f0d992 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -1101,7 +1101,7 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq) uint16_t pkt_len; uint64_t qword1; uint32_t rx_status; - int32_t s[IAVF_LOOK_AHEAD], nb_dd; + int32_t s[IAVF_LOOK_AHEAD], var, nb_dd; int32_t i, j, nb_rx = 0; uint64_t pkt_flags; static const uint32_t ptype_tbl[UINT8_MAX + 1] __rte_cache_aligned = { @@ -1150,9 +1150,27 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq) rte_smp_rmb(); - /* Compute how many status bits were set */ - for (j = 0, nb_dd = 0; j < IAVF_LOOK_AHEAD; j++) - nb_dd += s[j] & (1 << IAVF_RX_DESC_STATUS_DD_SHIFT); + /* Compute how many contiguous DD bits were set */ + for (j = 0, nb_dd = 0; j < IAVF_LOOK_AHEAD; j++) { + var = s[j] & (1 << IAVF_RX_DESC_STATUS_DD_SHIFT); +#ifdef RTE_ARCH_ARM + /* For Arm platforms, count only contiguous descriptors + * whose DD bit is set to 1. On Arm platforms, reads of + * descriptors can be reordered. Since the CPU may + * be reading the descriptors as the NIC updates them + * in memory, it is possbile that the DD bit for a + * descriptor earlier in the queue is read as not set + * while the DD bit for a descriptor later in the queue + * is read as set. + */ + if (var) + nb_dd += 1; + else + break; +#else + nb_dd += var; +#endif + } nb_rx += nb_dd; -- 2.35.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-25 16:58:46.315135552 +0100 +++ 0054-net-iavf-count-continuous-DD-bits-for-Arm.patch 2022-02-25 16:58:44.300990467 +0100 @@ -1 +1 @@ -From 3d88d5e401f6d04882415866012a98bced0c3cb8 Mon Sep 17 00:00:00 2001 +From 55f2ea35c7cafdb178e59862d66eaf73b3282706 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3d88d5e401f6d04882415866012a98bced0c3cb8 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 7158938643..f07d886821 100644 +index bc67712d9c..d406f0d992 100644 @@ -24 +25 @@ -@@ -1897,7 +1897,7 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq) +@@ -1101,7 +1101,7 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq) @@ -32,2 +33,2 @@ - const uint32_t *ptype_tbl = rxq->vsi->adapter->ptype_tbl; -@@ -1928,9 +1928,27 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq) + static const uint32_t ptype_tbl[UINT8_MAX + 1] __rte_cache_aligned = { +@@ -1150,9 +1150,27 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq)