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 3F3F9A0524; Tue, 13 Apr 2021 20:41:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F1C216126C; Tue, 13 Apr 2021 20:41:02 +0200 (CEST) Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) by mails.dpdk.org (Postfix) with ESMTP id 7F1E6161262 for ; Tue, 13 Apr 2021 20:41:00 +0200 (CEST) Received: by mail-il1-f170.google.com with SMTP id e14so3622697ils.12 for ; Tue, 13 Apr 2021 11:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+PNPfIdk6ui1WW+zChm6zHkCPqLHoDjnvRneqBT98MY=; b=Dk267dUiPMl77LKV3x2VmJN49BV9zZH2oWilqwh+VqBugq8wvfYS28p9KO2u0D9EBL vGybpqeykl1o/ciSVVKk498jUO0Wd1djZbAgSqrIHR6l+PZolEMhaSAHdL+egTjZpHD7 VTaYwoJhyEE7sKy0uQr6SiaWIdraD4RLOiifqoj5199E5AdonjlGkJsYsS6cQBwzgpvJ nWamsZhaJPGT9+3t45ynJuuovfxt7xMmi/VJBM8dDZumYXtCJsMh9gWYmr3OXXT2j+Vi qK6rGEG7QmToKiNZuYrraNO8Mxp55QOOz5FNFWpF1CU1HVedrWJ97Nw77KKQRsnC9a/R e8tA== 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=+PNPfIdk6ui1WW+zChm6zHkCPqLHoDjnvRneqBT98MY=; b=HAvmsGtDjNtc0lyxTOS7+YIz/NjaakYA8KLBCU7/X4F23cDEuDQQaB0VzXX6GbOtzM FvsqeKFqOQNPNpL4fJ/BHA/CwgFtphLDgJsHs9I94ttfGBXfolfv5KacnXBr7RkTJcat afcjG8d6+7hAiD3dby3p4U5ummCFli+BBYhF3gvoGkOZWFikz5rfedAGFJ9/22wwGcFF mJxE+gTUQnLv7+T1fC7dZ2HQZqgXf1V1OQVqwGyXplCObQsYyYJnotWzvDU/P75TAksy W2crqc7pymkdqEA3XLDEF4e9XGVSMgxFRQeEg1lBIU/pY+N1dE6Tv2ayZmctxpAVq0fM judA== X-Gm-Message-State: AOAM531z5Zt/sKSOj2jfGOwZAj3rzeekHQZ/Mi7sV/D1MU6PmYqysD4b sqBVp0y+whrv01emflfgruApzjuz9ic7oabV++Q= X-Google-Smtp-Source: ABdhPJx8YDQiWQRqzh/9LbybS6B7oN0lQopNEngUEhMotD5BxGUhf/+f1+afIr2AiUe5SE8ZYoEwxhdjUEsWVdU59Nc= X-Received: by 2002:a92:d806:: with SMTP id y6mr28874608ilm.130.1618339259781; Tue, 13 Apr 2021 11:40:59 -0700 (PDT) MIME-Version: 1.0 References: <20210318102550.59265-1-ruifeng.wang@arm.com> <20210318102550.59265-3-ruifeng.wang@arm.com> In-Reply-To: <20210318102550.59265-3-ruifeng.wang@arm.com> From: Jerin Jacob Date: Wed, 14 Apr 2021 00:10:43 +0530 Message-ID: To: Ruifeng Wang Cc: Jerin Jacob , Hemant Agrawal , Ferruh Yigit , Thomas Monjalon , David Marchand , dpdk-dev , nd , Honnappa Nagarahalli Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 2/4] examples/l3fwd: eliminate unnecessary calculations 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 Sender: "dev" On Thu, Mar 18, 2021 at 3:56 PM Ruifeng Wang wrote: > > Both L2 and L3 headers will be used in forward processing. And these > two headers are in the same cache line. It has the same effect for > prefetching with L2 header address and prefetching with L3 header > address. > > Changed to use L2 header address for prefetching. The change showed > no measurable performance improvement, but it definitely removed Same here. > unnecessary instructions for address calculation. > > Signed-off-by: Ruifeng Wang Acked-by: Jerin Jacob > --- > examples/l3fwd/l3fwd_lpm_neon.h | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/examples/l3fwd/l3fwd_lpm_neon.h b/examples/l3fwd/l3fwd_lpm_neon.h > index ae8840694..1650ae444 100644 > --- a/examples/l3fwd/l3fwd_lpm_neon.h > +++ b/examples/l3fwd/l3fwd_lpm_neon.h > @@ -98,14 +98,14 @@ l3fwd_lpm_send_packets(int nb_rx, struct rte_mbuf **pkts_burst, > if (k) { > for (i = 0; i < FWDSTEP; i++) { > rte_prefetch0_write(rte_pktmbuf_mtod(pkts_burst[i], > - struct rte_ether_hdr *) + 1); > + void *)); > } > > for (j = 0; j != k - FWDSTEP; j += FWDSTEP) { > for (i = 0; i < FWDSTEP; i++) { > rte_prefetch0_write(rte_pktmbuf_mtod( > pkts_burst[j + i + FWDSTEP], > - struct rte_ether_hdr *) + 1); > + void *)); > } > > processx4_step1(&pkts_burst[j], &dip, &ipv4_flag); > @@ -125,17 +125,17 @@ l3fwd_lpm_send_packets(int nb_rx, struct rte_mbuf **pkts_burst, > switch (m) { > case 3: > rte_prefetch0_write(rte_pktmbuf_mtod(pkts_burst[j], > - struct rte_ether_hdr *) + 1); > + void *)); > j++; > /* fallthrough */ > case 2: > rte_prefetch0_write(rte_pktmbuf_mtod(pkts_burst[j], > - struct rte_ether_hdr *) + 1); > + void *)); > j++; > /* fallthrough */ > case 1: > rte_prefetch0_write(rte_pktmbuf_mtod(pkts_burst[j], > - struct rte_ether_hdr *) + 1); > + void *)); > j++; > } > > -- > 2.25.1 >