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 D2C24A0350 for ; Mon, 21 Feb 2022 16:42:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CCC00410F6; Mon, 21 Feb 2022 16:42:33 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 1C1794114A for ; Mon, 21 Feb 2022 16:42:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645458152; 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=Z1ijLzTMcigzrJ0u3xyXnUvf6MtJYp3U1kzryeddAPA=; b=B57K1N/t+j1OS6PPvGPDrC5mZlHs7KKjF9oW2JvhK3wJMa/pDVQJpsMbASyy3W0Gvwy9Cc yYmA9sxlrzopzllu0MMT8QiAEDhn7bneOM0JJjS2bZqPQmNzIPsfAPLR615J4uV15SHoxs +cfD60tInAI7HCdOqcLIoxwnDnT9Mrc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-133-5bSQliN0Oa-Q6lc2YtOfZA-1; Mon, 21 Feb 2022 10:42:29 -0500 X-MC-Unique: 5bSQliN0Oa-Q6lc2YtOfZA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 191711853020; Mon, 21 Feb 2022 15:42:28 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id E723B7E131; Mon, 21 Feb 2022 15:42:26 +0000 (UTC) From: Kevin Traynor 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 21.11.1 Date: Mon, 21 Feb 2022 15:35:55 +0000 Message-Id: <20220221153625.152324-166-ktraynor@redhat.com> In-Reply-To: <20220221153625.152324-1-ktraynor@redhat.com> References: <20220221153625.152324-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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 21.11.1 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/26/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/68522027e305f1199758c7e644ba063ef4ff763d Thanks. Kevin --- >From 68522027e305f1199758c7e644ba063ef4ff763d 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 59623ac820..4fc1bf5e78 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -1899,5 +1899,5 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq) 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; @@ -1930,7 +1930,25 @@ 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.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-21 15:22:48.139456937 +0000 +++ 0166-net-iavf-count-continuous-DD-bits-for-Arm.patch 2022-02-21 15:22:44.319704639 +0000 @@ -1 +1 @@ -From 3d88d5e401f6d04882415866012a98bced0c3cb8 Mon Sep 17 00:00:00 2001 +From 68522027e305f1199758c7e644ba063ef4ff763d 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 59623ac820..4fc1bf5e78 100644 @@ -24 +25 @@ -@@ -1898,5 +1898,5 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq) +@@ -1899,5 +1899,5 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq) @@ -31 +32 @@ -@@ -1929,7 +1929,25 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq) +@@ -1930,7 +1930,25 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq)