From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by dpdk.org (Postfix) with ESMTP id 1266A58FA for ; Mon, 7 Sep 2015 14:25:56 +0200 (CEST) Received: by wiclk2 with SMTP id lk2so82489497wic.1 for ; Mon, 07 Sep 2015 05:25:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=NxYo7kcTQvJ6E7cvIu5AlOGvsh0YEgiL64SZIQW5o9Y=; b=BXLEuMKMaEHw1Wn5IyAEIB1b/fZLmFJw/CGkP4c/5gXCSpHbOzHCxuMy6MPC2CMXso gDWByhGhBIjLsBVEPW7GAwlgt/MLeWlU/xko1O8g9b/2ypCTPzVKAoVy4kGn/vIO9Wzq wji/lFlJ2t9zdPiNV5qCTAN49XetgN48mSED5KtM3b9w1/l1rLUbbUar6dvx2+9fPFP8 mpsmkmg8ikFeli4Sti7tedHq/1rZoGgylYeCCNQ+FXatxJ2m5mYh+2RANbkbb8xGipQz fDm4/5vP/dMGGBQS8VW5i6MoWL++jtM4AonHV12tXgls7CK3kCT2F0b727Mzg2qp/Qaf heTw== X-Gm-Message-State: ALoCoQnxwaIiuNxpUBRKZ+7s90Nbc/JtJr8naMNWy5pGWZ7tC4n9GsOEeapz94USlJG98E88uvh5 X-Received: by 10.180.89.41 with SMTP id bl9mr33942561wib.85.1441628755884; Mon, 07 Sep 2015 05:25:55 -0700 (PDT) Received: from [192.168.0.101] ([90.152.119.35]) by smtp.googlemail.com with ESMTPSA id ne7sm19937562wic.12.2015.09.07.05.25.55 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Sep 2015 05:25:55 -0700 (PDT) To: dev@dpdk.org References: <1441135036-7491-1-git-send-email-zoltan.kiss@linaro.org> From: Zoltan Kiss Message-ID: <55ED8252.1020900@linaro.org> Date: Mon, 7 Sep 2015 13:25:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1441135036-7491-1-git-send-email-zoltan.kiss@linaro.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] ixgbe: prefetch packet headers in vector PMD receive function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2015 12:25:56 -0000 Hi, I just realized I've missed the "[PATCH]" tag from the subject. Did anyone had time to review this? Regards, Zoltan On 01/09/15 20:17, Zoltan Kiss wrote: > The lack of this prefetch causes a significant performance drop in > OVS-DPDK: 13.3 Mpps instead of 14 when forwarding 64 byte packets. Even > though OVS prefetches the next packet's header before it starts processing > the current one, it doesn't get there fast enough. This aligns with the > behaviour of other receive functions. > > Signed-off-by: Zoltan Kiss > --- > diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec.c b/drivers/net/ixgbe/ixgbe_rxtx_vec.c > index cf25a53..51299fa 100644 > --- a/drivers/net/ixgbe/ixgbe_rxtx_vec.c > +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec.c > @@ -502,6 +502,15 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, > _mm_storeu_si128((void *)&rx_pkts[pos]->rx_descriptor_fields1, > pkt_mb1); > > + rte_packet_prefetch((char*)(rx_pkts[pos]->buf_addr) + > + RTE_PKTMBUF_HEADROOM); > + rte_packet_prefetch((char*)(rx_pkts[pos + 1]->buf_addr) + > + RTE_PKTMBUF_HEADROOM); > + rte_packet_prefetch((char*)(rx_pkts[pos + 2]->buf_addr) + > + RTE_PKTMBUF_HEADROOM); > + rte_packet_prefetch((char*)(rx_pkts[pos + 3]->buf_addr) + > + RTE_PKTMBUF_HEADROOM); > + > /* C.4 calc avaialbe number of desc */ > var = __builtin_popcountll(_mm_cvtsi128_si64(staterr)); > nb_pkts_recd += var; >