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 AD4DEA0032 for ; Fri, 18 Feb 2022 13:45:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A1ACC41143; Fri, 18 Feb 2022 13:45:23 +0100 (CET) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id F21CD41143 for ; Fri, 18 Feb 2022 13:45:22 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id d14-20020a05600c34ce00b0037bf4d14dc7so6316978wmq.3 for ; Fri, 18 Feb 2022 04:45:22 -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=/V25SKqiCiB5/o1GErYSEfpnkwNIf4cN5Rlhs0FRW/8=; b=YDQSTWaJvRCr4EAI6j8iYbzOkPQiEmTN5COLdD/7y2aFoZCLVm2cCajKMni+vCCYN5 o3CX05OgE7RgcGYYCVEt3FVYk3u3tHuT77faYFOJtTnockZqPoEm9D4HZcrJ/VtPnMvn 44s1lQd6gOFKHMScTQjBdlYZ7mMn+UUEu6sknAeCqYOJITYuP8NvbpyHHL6ESp/VlU/F wad7XR+Sd+ZrTllAa9zTW/6vT9e02GGIY8iN6RHOvogk/UDKzhaUFbJo1F116oYHlec4 NGXWtBmcwPtpDB6IfI5mtIGKkBeSq7Tf9N/TDbjqsRk3PoCsm2jn4ezRRTXPCQUnhN+B Jd+w== 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=/V25SKqiCiB5/o1GErYSEfpnkwNIf4cN5Rlhs0FRW/8=; b=3mtQjtVWcS5CnPssqqy3ZQyCktOEHFMamlev6ZLwNjR3Utob8Yxss7zwIIDQ3eD6LO y65y3GT6U9Wti6/i28pPJI68aH47+iuv6SWJuKWQtb/UwQgQA6AyqjDls7NcM6MNOSis Gu5HdvqznG2TzFg4/s9lO+m9TxdCG2+I+sgQwdH6P2K7QUlEccdoSKtrtIjyf+e8GLOw PRMe6PdT/9JFlMwts5VGBeU3WfJWZyXFPapQsOefdFSAyS4QAq102UImif9XRHGpMLQg kLOlrue0/SS8X6uC0MfSrKIWicJkvaq16taDbkfhHL1Dr7+15ykYyi/uYqUY+3R3vF1J 24Ug== X-Gm-Message-State: AOAM531+1wWeSXwXiPjP6BnI8Y4sAFbep4NX2qcEDYs0+WUgtuRM9bMM BANfOkv94Wl6Ivch07AU6PY= X-Google-Smtp-Source: ABdhPJxSCcuqMa/Vvce9j+7LVOfH8b8VjLbDMRkKLPNDLH1Ty3OQcbgWNpGz3MqZyMhWO8e7azDxaA== X-Received: by 2002:a7b:c744:0:b0:37b:d7f4:f092 with SMTP id w4-20020a7bc744000000b0037bd7f4f092mr10376621wmk.6.1645188322709; Fri, 18 Feb 2022 04:45:22 -0800 (PST) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id i9sm20316948wrf.79.2022.02.18.04.45.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:45:22 -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 in flex Rx' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:39:22 +0000 Message-Id: <20220218123931.1749595-113-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/da0833ea1f2be8c1aa0c1f4994486fd76d8d2a74 Thanks. Luca Boccassi --- >From da0833ea1f2be8c1aa0c1f4994486fd76d8d2a74 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 dfc3f906ee..c2a9c4f37b 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -1637,7 +1637,7 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq) struct rte_mbuf *mb; 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; const uint32_t *ptype_tbl = rxq->vsi->adapter->ptype_tbl; @@ -1662,9 +1662,27 @@ 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.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:42.087784974 +0000 +++ 0113-net-iavf-count-continuous-DD-bits-for-Arm-in-flex-Rx.patch 2022-02-18 12:37:37.854795583 +0000 @@ -1 +1 @@ -From 32e38011fc35625efdd74dc83edf7e53c54ef13e Mon Sep 17 00:00:00 2001 +From da0833ea1f2be8c1aa0c1f4994486fd76d8d2a74 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 dfc3f906ee..c2a9c4f37b 100644 @@ -24 +25 @@ -@@ -1818,7 +1818,7 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq) +@@ -1637,7 +1637,7 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq) @@ -33 +34 @@ -@@ -1843,9 +1843,27 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq) +@@ -1662,9 +1662,27 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)