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 F31CAA0350 for ; Mon, 21 Feb 2022 16:42:36 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED63A4013F; Mon, 21 Feb 2022 16:42:36 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 5E4814013F for ; Mon, 21 Feb 2022 16:42:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645458155; 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=rldwzFXZ7oj97suTkZ2GXWmT37G13AbcbeqmqJZiUOg=; b=XDBflEBKtR+lTWvmLM858vd38DJzO9ss1s6Ke46QjzvRt3WaBHna5Ym4tVcWfxSlj0i5hA YvUlxbK+FCTbK2HQ4asEj6a7llCCfhA4AlfQNT0v858sgk9OP7DHOyX/pc2MrcqX8OksYZ QXhfFtYSEl5MkeUpoHWVxzKb/7I958A= 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-134-EJr13uXDMXC7BJcLfA9Bng-1; Mon, 21 Feb 2022 10:42:30 -0500 X-MC-Unique: EJr13uXDMXC7BJcLfA9Bng-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 91052801ADA; Mon, 21 Feb 2022 15:42:29 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6C8537E131; Mon, 21 Feb 2022 15:42:28 +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 in flex Rx' has been queued to stable release 21.11.1 Date: Mon, 21 Feb 2022 15:35:56 +0000 Message-Id: <20220221153625.152324-167-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/5dc74f1348eadcf83df42b1ed81ed2510ad57d78 Thanks. Kevin --- >From 5dc74f1348eadcf83df42b1ed81ed2510ad57d78 Mon Sep 17 00:00:00 2001 From: Kathleen Capella Date: Sat, 5 Feb 2022 00:26:30 +0000 Subject: [PATCH] net/iavf: count continuous DD bits for Arm in flex Rx [ upstream commit 32e38011fc35625efdd74dc83edf7e53c54ef13e ] 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: b8b4c54ef9b0 ("net/iavf: support flexible Rx descriptor in normal path") 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 4fc1bf5e78..ba272bb211 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -1820,5 +1820,5 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq) uint16_t stat_err0; uint16_t pkt_len; - 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; @@ -1845,7 +1845,25 @@ iavf_rx_scan_hw_ring_flex_rxd(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_FLEX_DESC_STATUS0_DD_S); + /* 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_FLEX_DESC_STATUS0_DD_S); +#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.159859480 +0000 +++ 0167-net-iavf-count-continuous-DD-bits-for-Arm-in-flex-Rx.patch 2022-02-21 15:22:44.321704644 +0000 @@ -1 +1 @@ -From 32e38011fc35625efdd74dc83edf7e53c54ef13e Mon Sep 17 00:00:00 2001 +From 5dc74f1348eadcf83df42b1ed81ed2510ad57d78 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 32e38011fc35625efdd74dc83edf7e53c54ef13e ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index f07d886821..41244055e5 100644 +index 4fc1bf5e78..ba272bb211 100644 @@ -24 +25 @@ -@@ -1819,5 +1819,5 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq) +@@ -1820,5 +1820,5 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq) @@ -31 +32 @@ -@@ -1844,7 +1844,25 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq) +@@ -1845,7 +1845,25 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)