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 12BB2A0521; Thu, 5 Nov 2020 23:25:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 618C0F90; Thu, 5 Nov 2020 23:25:18 +0100 (CET) Received: from mail-ot1-f65.google.com (mail-ot1-f65.google.com [209.85.210.65]) by dpdk.org (Postfix) with ESMTP id 3B925DED for ; Thu, 5 Nov 2020 23:25:16 +0100 (CET) Received: by mail-ot1-f65.google.com with SMTP id 79so2942674otc.7 for ; Thu, 05 Nov 2020 14:25:16 -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=paX5ujSgPRdCfKLz0sQVDXsZYfYDp6HHpD0iuKu/0Tw=; b=T1Qh9rx7+yt0NL236mOdAtVpkQ4auk3TYku6oq/+1cZfa1J9x9p8krFrXlGDx+rHKw 0I760X9DOSpDg6HKffMB9qHq09zoyjOKdhchbjUzjtuu6D+YhwVFV3o67JtUVhHPPWze mT0W6QgHkHOCKD+rvdmpS4nAnEB2Eeecc/Wv4= 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=paX5ujSgPRdCfKLz0sQVDXsZYfYDp6HHpD0iuKu/0Tw=; b=YTLjt3fPmm1QMJBFTd2JoemdLNRboYWUFWw3Can79bvvnHQz1nXveJePcpVeXinzAS 35/JM3m4yJhXCTW68wVtIfGo6zvyL1JWNBpMpzACyz7TK2hweFyfWgegrGVgrzm7rrQR 3NrwldoVXgDUSKUz46cFtxQg1oZ8XhwGQiukN/K0XG+8audkoO8c77WrOITN04iKu+ry skY7zmpirN1/R1ehi60ma4L0WeOo0T01cz2A4Wi1iOQ2c+Op6ovcQb/H9Y8nGcKqMtwD DP39s3ycQ6gA0QlPp6VSpVhX4KFoqxZuN8rS3LXiK0iZKuJldGPzct2GdszUp7/TyVb4 C+Xw== X-Gm-Message-State: AOAM530IchUF4gF1jMitURywNaV8/miHc7zK6ump9W40BNum4hxbKqi8 vRTQ3k8+hAyQElId6LKRKaC5vxZsJKKwQ7yKX50FKA== X-Google-Smtp-Source: ABdhPJzrQgb9JOYWrJ954LxX13enOryMymaJoXs+fueVcD0co7i5qwStgJuGfq/RuaAmZgaQ7EnZwb/8byP4l1EE79k= X-Received: by 2002:a9d:4d83:: with SMTP id u3mr3294155otk.283.1604615115449; Thu, 05 Nov 2020 14:25:15 -0800 (PST) MIME-Version: 1.0 References: <20201104170310.2509-1-stephen@networkplumber.org> In-Reply-To: From: Ajit Khaparde Date: Thu, 5 Nov 2020 14:24:59 -0800 Message-ID: To: Lance Richardson Cc: Stephen Hemminger , Somnath Kotur , dpdk-dev 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 Thu, Nov 5, 2020 at 7:18 AM Lance Richardson < lance.richardson@broadcom.com> wrote: > 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 > Updated commit log with fixes tag and applied to dpdk-next-net-brcm.