From patchwork Mon Nov 15 18:24:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Richardson X-Patchwork-Id: 104343 X-Patchwork-Delegate: ajit.khaparde@broadcom.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F2D1AA0032; Mon, 15 Nov 2021 19:24:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3861D4117E; Mon, 15 Nov 2021 19:24:21 +0100 (CET) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id 8D2A24117D for ; Mon, 15 Nov 2021 19:24:20 +0100 (CET) Received: by mail-pg1-f170.google.com with SMTP id m15so11409987pgu.11 for ; Mon, 15 Nov 2021 10:24:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=4z78BEUHprTIJauQLdIJQtGM1CwYvEfzSt4dC6O3sBk=; b=bwT3CYRxRhym4XIOKwC573OE2QnQyTuO79CoYSK+G6F9o1uTYSe3T4cemdRwwEBXzY Yh2pCzppwKOD89kSmV4onYcBsyiRM9Vg4Dp1RK1nHfSD8hnY9we5kcDeR3T+I0Rn64ff Ozudrn3m3Pag3+nes1wA9LuLNIovDk9DU8+48= 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; bh=4z78BEUHprTIJauQLdIJQtGM1CwYvEfzSt4dC6O3sBk=; b=h2cXoAo+jY0plbOg+jIy3po6Du+sf5ugFopNv/3tKpDue7rQRngfq7jwjT6wxttIoG GVyyqHOc/8lcQ2lIB+Qveav0CftXblHqGH3CGIwNDRBaL+9/eZuJWk+LUpUDyLOSMjN0 TEG4rJY4t6avl1LmNyhx7+cc1BXCY4zEjy9AfQJtss4V1JyXM3hgwET3z7ZvMifIgjQ+ ZLjSrJnQuRzS7wfCLhrTJCWnTDMotAu3kYGjl65SImrWz1jFrzYEQIVARg4G4jlrH/B7 efL4ZRHMxun9kZFgqOrvSjMh9S8B+WrDztMEjcupYbx0lxF+sAbP82MHBGpuMOUCj2Vy Tmww== X-Gm-Message-State: AOAM5321pmf5tgmyG7WfmfR5vnoVrOteD4QG3WW8mUYndPxbBSebj2lj /llm0TCzat5UenZ4AbcyZR4Brkj44IbbQQ== X-Google-Smtp-Source: ABdhPJyZUach79fosLsgwCHRDrtlE/inBzLgH1+SyUUhN2zniOrS8LryTHdKLID0ulzBYhp6QVDvYA== X-Received: by 2002:a05:6a00:2496:b0:49f:eba0:6575 with SMTP id c22-20020a056a00249600b0049feba06575mr34863006pfv.78.1637000659734; Mon, 15 Nov 2021 10:24:19 -0800 (PST) Received: from lrichardson-VirtualBox.dhcp.broadcom.net ([192.19.11.250]) by smtp.gmail.com with ESMTPSA id w7sm12419785pgo.56.2021.11.15.10.24.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 10:24:19 -0800 (PST) From: Lance Richardson To: Bruce Richardson , Konstantin Ananyev , Ajit Khaparde , Somnath Kotur Cc: dev@dpdk.org, stable@dpdk.org Subject: [PATCH 2/2] net/bnxt: remove software prefetches from AVX2 Rx path Date: Mon, 15 Nov 2021 13:24:10 -0500 Message-Id: <20211115182410.5545-3-lance.richardson@broadcom.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211115182410.5545-1-lance.richardson@broadcom.com> References: <20211115182410.5545-1-lance.richardson@broadcom.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Testing has shown no performance benefit from software prefetching of receive completion descriptors in the AVX2 burst receive path, and slightly better performance without them on some CPU families, so this patch removes them. Fixes: c4e4c18963b0 ("net/bnxt: add AVX2 RX/Tx") Cc: stable@dpdk.org Signed-off-by: Lance Richardson --- drivers/net/bnxt/bnxt_rxtx_vec_avx2.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c b/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c index 54e3af22ac..34bd22edf0 100644 --- a/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c +++ b/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c @@ -92,12 +92,6 @@ recv_burst_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) cons = raw_cons & (cp_ring_size - 1); mbcons = (raw_cons / 2) & (rx_ring_size - 1); - /* Prefetch first four descriptor pairs. */ - rte_prefetch0(&cp_desc_ring[cons + 0]); - rte_prefetch0(&cp_desc_ring[cons + 4]); - rte_prefetch0(&cp_desc_ring[cons + 8]); - rte_prefetch0(&cp_desc_ring[cons + 12]); - /* Return immediately if there is not at least one completed packet. */ if (!bnxt_cpr_cmp_valid(&cp_desc_ring[cons], raw_cons, cp_ring_size)) return 0; @@ -136,14 +130,6 @@ recv_burst_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) _mm256_storeu_si256((void *)&rx_pkts[i + 4], t0); #endif - /* Prefetch eight descriptor pairs for next iteration. */ - if (i + BNXT_RX_DESCS_PER_LOOP_VEC256 < nb_pkts) { - rte_prefetch0(&cp_desc_ring[cons + 16]); - rte_prefetch0(&cp_desc_ring[cons + 20]); - rte_prefetch0(&cp_desc_ring[cons + 24]); - rte_prefetch0(&cp_desc_ring[cons + 28]); - } - /* * Load eight receive completion descriptors into 256-bit * registers. Loads are issued in reverse order in order to