From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 117A5A04E7; Thu, 5 Nov 2020 16:18:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA6A3C88E; Thu, 5 Nov 2020 16:18:40 +0100 (CET) Received: from mail-ot1-f66.google.com (mail-ot1-f66.google.com [209.85.210.66]) by dpdk.org (Postfix) with ESMTP id C318FC882 for ; Thu, 5 Nov 2020 16:18:38 +0100 (CET) Received: by mail-ot1-f66.google.com with SMTP id j14so1747322ots.1 for ; Thu, 05 Nov 2020 07:18:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ntFk9Q281EroP6GLHrNWk2ZJcOk6pR6W1vbU0HBeyW4=; b=DrUrZL6CqjQu2m0KvyB+2DoggqgIZjAMKKNYpCI7FFfIVPIi6uMdEQblJFMJFfe6z4 1NGkHJsVY6EIXax+Hw8vk1XXiUxCg26PJAgc9ONNLO/RaHZUBNyPyGivn9u10M8uQRY0 224Ju3TXzKlGr0fkhGnxvJnXNFpxwF487oEQ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ntFk9Q281EroP6GLHrNWk2ZJcOk6pR6W1vbU0HBeyW4=; b=FHB4iouBJi751xxQ8YLgJmYX9T7CaWZtIBFbGbTA2Kic4xV/khQ5b2uwH8ZHpgW086 JlyYssD7wYcSeiKjz9UnoTry3+a3s9l3vMaDE6qLo77lEp/dk0Z662aSd4j2bEvd1rWN ASOSr7t5kRhGr8m1wVnFsEOmaQXzqDIvoHQHhB1/ViFkov5QAkeOBH6l34ZATPMEvIT+ eW3SEmEjBswtkJ/KzgmFJmMItBDSsY/V0fh2xY32Eo523lvbcmgEJd8NBQcZMBC29Bik DZxVrnTj7jQsPkXl9VfrB/9mK+qJC7VlGlNEBzSC2xkBze6HP071rbYlQ7v6NXq8J+dk gdTA== X-Gm-Message-State: AOAM530v9a+VaQoRsIwTOPAehFSFFrJEgCDMjT0eP6GX422GrxCxhhUl gATZh2YBy/wO1oPu9ikflx5B+CBSsD4E1Sn6fVRBTw== X-Google-Smtp-Source: ABdhPJxtlCYXwbS5IlXO3W6u1hNSsMAqLTxYnK8oh11kauT/jGQbtVOqSejaNq2sWo1m4C564FZYNBhuUrNAAUAVDzE= X-Received: by 2002:a9d:7a59:: with SMTP id z25mr2042706otm.267.1604589517969; Thu, 05 Nov 2020 07:18:37 -0800 (PST) MIME-Version: 1.0 References: <20201104170310.2509-1-stephen@networkplumber.org> In-Reply-To: <20201104170310.2509-1-stephen@networkplumber.org> From: Lance Richardson Date: Thu, 5 Nov 2020 10:18:26 -0500 Message-ID: To: Stephen Hemminger Cc: Ajit Kumar Khaparde , Somnath Kotur , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] net/bnxt: remove useless prefetches X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Nov 4, 2020 at 12:03 PM Stephen Hemminger wrote: > > Prefetching only helps performance if it is done several 100 > instructions before the actual use. The purpose of the prefetch > is to read ahead, it doesn't help if the next instruction > will block. > > The code in the bnxt driver was doing these unnecessary prefetches. > > Signed-off-by: Stephen Hemminger > --- > drivers/net/bnxt/bnxt_rxr.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c > index 2645ed61f402..140d79e0e829 100644 > --- a/drivers/net/bnxt/bnxt_rxr.c > +++ b/drivers/net/bnxt/bnxt_rxr.c > @@ -305,7 +305,6 @@ static inline struct rte_mbuf *bnxt_tpa_end( > mbuf = tpa_info->mbuf; > RTE_ASSERT(mbuf != NULL); > > - rte_prefetch0(mbuf); > if (agg_bufs) { > bnxt_rx_pages(rxq, mbuf, raw_cp_cons, agg_bufs, tpa_info); > } > @@ -733,8 +732,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, > if (mbuf == NULL) > return -EBUSY; > > - rte_prefetch0(mbuf); > - > mbuf->data_off = RTE_PKTMBUF_HEADROOM; > mbuf->nb_segs = 1; > mbuf->next = NULL; > @@ -867,7 +864,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, > /* Handle RX burst request */ > while (1) { > cons = RING_CMP(cpr->cp_ring_struct, raw_cons); > - rte_prefetch0(&cpr->cp_desc_ring[cons]); > rxcmp = (struct rx_pkt_cmpl *)&cpr->cp_desc_ring[cons]; > > if (!CMP_VALID(rxcmp, raw_cons, cpr->cp_ring_struct)) > -- > 2.27.0 > Acked-by: Lance Richardson