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 F1718A056A; Fri, 6 Mar 2020 08:45:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2BD211BFD2; Fri, 6 Mar 2020 08:45:07 +0100 (CET) Received: from mail-il1-f193.google.com (mail-il1-f193.google.com [209.85.166.193]) by dpdk.org (Postfix) with ESMTP id 9D2DE1BFCE for ; Fri, 6 Mar 2020 08:45:05 +0100 (CET) Received: by mail-il1-f193.google.com with SMTP id b17so1226798iln.3 for ; Thu, 05 Mar 2020 23:45:05 -0800 (PST) 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=p9NjJlRxBaHIaG3aGYM91SOLjK13/u2FcYbpqE1ID/8=; b=i+rzkZoGm+fr8uXMp93x11arKDdnfdvTDQiXZLhKt8F9dQhWs+/ddVoTYQ1wSE4a7E uRrBtmi08nZYQGdFMW4J13HpsU0beWNu78jEXNJ1z+kRK1nyuViP9Vu1M1SxZOxskk8r O1FsqvjtzefVoudvqpvIxJWkrEycoU0hRwOjvaIeJyZK1kqDw56lDAWZIK0r/93bKG0q ORsgQg8IGQYP3Sz8ZfzzCU7c5a9l/1whkYU7Xc3txA6kW6P/32Y2JLHzvTHGcGK6t8JQ PD3HD5SZJo8gPdbUI7WtZuTjrVDV95G7CdfDVE3ckeyzlh3Y1/KQ6QNSiEgj0ng4rF+a oLog== 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=p9NjJlRxBaHIaG3aGYM91SOLjK13/u2FcYbpqE1ID/8=; b=EKAx8gchVvVayO7RMBcQ+R9DD9tru1Zby5dg8gpCIqSDKBwJo5BFKa3a3NE/w1+B9+ T0r0ghb9IZAqXdJlFa5NqVx0g0SdTNSCTOlDPCbyllfb0xd3VxFVw+69tk476trZBiRw qe+FQCYs3GNIkovppUSxZFvqeJhfSigaYLkfyg9VDDbpkp4BhicEchKD+xgqhlrFeTKx crfnOT2IMBCKzqs9IEm8rQKCT8BZto4YpSSbJyay6FWuCA5cTZqzNrFSQWZH+qgwQWec 2h2LUxqOBCnGyTqBJYCr/2PfHVmD9nw2fe+/wpZU/ZDAC2VHYQyYXJUvlhHrsa5ZQDEv qODw== X-Gm-Message-State: ANhLgQ1gD/90qfMlGdFOqS1g9b0/LSveQrvHeNr4fm6qOJgqhBObfzxU wJN/WxqX0OitGPlJfBk2JbNbbUCGSLnccA7NmWE= X-Google-Smtp-Source: ADFU+vu1NlwdPYVR3OmXlJBxGE49BIgk1wBS9IbVwf2PPJHeEkZO045p0LoDKX1Iz4qbUiJLGEUFZf+ySS57XIn5tIY= X-Received: by 2002:a92:cd0e:: with SMTP id z14mr2067572iln.294.1583480704808; Thu, 05 Mar 2020 23:45:04 -0800 (PST) MIME-Version: 1.0 References: <20200306050427.66114-1-gavin.hu@arm.com> <20200306050427.66114-4-gavin.hu@arm.com> In-Reply-To: <20200306050427.66114-4-gavin.hu@arm.com> From: Jerin Jacob Date: Fri, 6 Mar 2020 13:14:48 +0530 Message-ID: To: Gavin Hu Cc: dpdk-dev , nd , David Marchand , Thomas Monjalon , Jerin Jacob , "Ye, Xiaolong" , Honnappa Nagarahalli , "Ruifeng Wang (Arm Technology China)" , Phil Yang , Joyce Kong , Steve Capper Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v1 3/3] net/i40e: auto-vectorization to speed up Tx free 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 Fri, Mar 6, 2020 at 10:35 AM Gavin Hu wrote: > > Tx mbuf free is a hotspot for i40e on aarch64, as there are no > inter-loop dependencies, it is safe to enable auto-vectorization > to speed up. > > This patch showed 2~3% performance lift on ThunderX2 and no degradation > on Arm N1SDP. The test case is single core RFC2544 zero-loss test. > > Signed-off-by: Gavin Hu > Reviewed-by: Steve Capper > --- > drivers/net/i40e/i40e_rxtx_vec_common.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h > index 0e6ffa007..fc0fa45d4 100644 > --- a/drivers/net/i40e/i40e_rxtx_vec_common.h > +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h > @@ -98,6 +98,11 @@ i40e_tx_free_bufs(struct i40e_tx_queue *txq) > if (likely(m != NULL)) { > free[0] = m; > nb_free = 1; > +#if defined(__clang__) > +#pragma clang loop vectorize(assume_safety) > +#elif defined(__GNUC__) > +#pragma GCC ivdep > +#endif IMO, It is better to abstract the compiler features (above compiler feature and __restrict__) as macros in rte_common.h or so. It will help to support other compilers(ICC or Windows) and enable them to have "changes" in one place. > for (i = 1; i < n; i++) { > m = rte_pktmbuf_prefree_seg(txep[i].mbuf); > if (likely(m != NULL)) { > -- > 2.17.1 >