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 79F45A0032 for ; Fri, 18 Feb 2022 13:45:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 75B9E40141; Fri, 18 Feb 2022 13:45:22 +0100 (CET) Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by mails.dpdk.org (Postfix) with ESMTP id 0513440E2D for ; Fri, 18 Feb 2022 13:45:22 +0100 (CET) Received: by mail-ej1-f41.google.com with SMTP id hw13so14718494ejc.9 for ; Fri, 18 Feb 2022 04:45:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kl67XxzhtDcrDCckDZnPnHeZLDUpAXwVyvLzP3AOO6s=; b=DTFS9iGM4o2U0oNUdbUhb7vkno70rgeGz7H+YKBnckQxbS3VcvAUPDZV/XVHGe8r/v 3yv6U0EB0v6Mv4ToEu+68sJmD3U8r76VYBFd/0LNdEF2jRKCujbUH208Ed6zAzTzD25A fMohubgu7l3jERTDYtiKvu6Upw0mkU3mTlxlmjlOGZqTLCjTXdmln91mL6cWJw3cDyiQ fCkNjbB7t2ykCP/Mni9nxQdLK4evOPGaeD4T6iEvd3/s3zwgcTfjlAGJEbz/NNsmCXNN yknXKSjWhpg8cDVyQpV05xaLBnHoGf8jKxLJCtJZEmfsx/m7ZHXJGX06CA875rydhuI3 pwNw== 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=kl67XxzhtDcrDCckDZnPnHeZLDUpAXwVyvLzP3AOO6s=; b=2GBxRs+ne/74xsWK29VsCIIbYxaD5ZjhVN/9IE1CJvtWB1V48iXVnNt9kUPHQse5RP iyATh6vqC2C5dgQuk3bc1xVB7QRH6rdfo48w34LHk+AZfG+h3ZNzEdDdCsAj03pY6YRo /QUF3GKpohqfUhdDZRDL69CjmEt+kOoT4jP+fXvIwjyt2fO5Z64I/7smRyPk8YLKiLPo Oz52/5qGzvFpdcpxQDrxeZMV+lUEQAQHAhGwGOwc9uY9Vd8NWpQsUofEvqF6+Y99Hhgb tJc+9aXOW+g8Q5cDZWrzpIliyilvzBumA77iyAsvGQaQkEV/R7351MLeIPrZJtNS3dPR IBxA== X-Gm-Message-State: AOAM532SgoZMfBSDDJllvMCo7feLB9+Fm5QrmINL1goJJRkeNL3bH6mX /GgT+3E8r4CS+WEvCm9z8L0= X-Google-Smtp-Source: ABdhPJwyt1FBGUKIS8Sx0HccVyIZ/8EZRc3BZuhJmXS6WlCo+pcsHrXUBoDOajuYjeua91joPxk57Q== X-Received: by 2002:a17:906:d0c5:b0:6cd:f8fe:2f2e with SMTP id bq5-20020a170906d0c500b006cdf8fe2f2emr6463774ejb.395.1645188321673; Fri, 18 Feb 2022 04:45:21 -0800 (PST) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id q7sm2194584ejj.8.2022.02.18.04.45.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:45:21 -0800 (PST) From: luca.boccassi@gmail.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 20.11.5 Date: Fri, 18 Feb 2022 12:39:21 +0000 Message-Id: <20220218123931.1749595-112-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-1-luca.boccassi@gmail.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 20.11.5 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/20/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/3152179d55301a71e4157c51debf8cc374be357c Thanks. Luca Boccassi --- >From 3152179d55301a71e4157c51debf8cc374be357c 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 8c5bfcecbc..dfc3f906ee 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -1714,7 +1714,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; const uint32_t *ptype_tbl = rxq->vsi->adapter->ptype_tbl; @@ -1745,9 +1745,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.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:42.053702550 +0000 +++ 0112-net-iavf-count-continuous-DD-bits-for-Arm.patch 2022-02-18 12:37:37.850795494 +0000 @@ -1 +1 @@ -From 3d88d5e401f6d04882415866012a98bced0c3cb8 Mon Sep 17 00:00:00 2001 +From 3152179d55301a71e4157c51debf8cc374be357c 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 8c5bfcecbc..dfc3f906ee 100644 @@ -24 +25 @@ -@@ -1897,7 +1897,7 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq) +@@ -1714,7 +1714,7 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq) @@ -33 +34 @@ -@@ -1928,9 +1928,27 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq) +@@ -1745,9 +1745,27 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq)