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 68E45A00C4; Thu, 23 Apr 2020 19:45:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DAE931C22D; Thu, 23 Apr 2020 19:45:30 +0200 (CEST) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id D73D51C1F7 for ; Thu, 23 Apr 2020 19:45:29 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id w20so7330724iob.2 for ; Thu, 23 Apr 2020 10:45:29 -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=fuCEY0pISK+W4Sm77OdD7wKQhbih/7H+/3OP9wNsy+A=; b=fOYVfD04p7rT3//ivdFsM1qYVAPKNuc7/O0gU+LIkofK1AFjTESqHoMw4wE3BbbTRz Y/u+6XTYGEGITNTPAlIq4G0EErmi0KMlfm3t7Yrt0iC5ZaYqZLqNFHkBOr3KlhVcIlwb 9o0JcQOG2bkph/1aumNVal+L1B3GaAhMLEgjCbE1AR/NA2fART/hpOcUBIj7XEhyW/jo /UgEA9vMaV71ECmpajwhhUi3Y3k39XiyC+AzdNZLtBtUQDc+X0LiBcO+SwEUmOtQvcD5 M8Wq7J0zWaIM3roPPERh9kF7Nr1y2zV8SOqtQn25KdT7hk6Ef7d7VCMrekTTHDBiytJa KlMQ== 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=fuCEY0pISK+W4Sm77OdD7wKQhbih/7H+/3OP9wNsy+A=; b=OhwmtmxOROGAW5XqVfNb9zwLAEHK6qNYdIFElPrgBuRkuVIwIidTc4CYnqAKPSne/J HO8w/OK2ewVzhj8/SfjAZK4YyuRvoRXVZJXkWKGTP/WJExyCJQ7s5g76YTw+yu7a8w6a CYKizfrCIU8cthMdcQ4uerJhOjdbYah7+bo17cSSb4M+V0s+ds+joOmVmD9hC3dDNtnK 48FOW7TlWuHozE9kiTPXW2OfhUhPmaU1rjTutVsHIrruhRfP6N+Pgikgspg23MwrGXtJ jxr0CyWSGIDNGVeWVFz+P83F6Z3e12JKAdHOxj3qTP781E0lm2zaC8XKKk/5FkkhKsgn 9qzQ== X-Gm-Message-State: AGi0PubQWnLQGxVu5MyCXL2dd/7ejjEs0UdaPNFQ0rCwtpYOZ5g/PsqD xM21TfSea6j8aj3FODJYfSNyIILKRsgIv3FAAsI= X-Google-Smtp-Source: APiQypJvy32RrhLdKaqh/LXjrPmJLZ+4pX7pRCEZYuWDj0VyXW/6Emq8SJrLGf+MPPDYyI2gWmebG7FtBpivCeevUas= X-Received: by 2002:a05:6602:21c6:: with SMTP id c6mr4675797ioc.163.1587663928923; Thu, 23 Apr 2020 10:45:28 -0700 (PDT) MIME-Version: 1.0 References: <1584407863-774-7-git-send-email-phil.yang@arm.com> <1587662187-28193-1-git-send-email-phil.yang@arm.com> In-Reply-To: <1587662187-28193-1-git-send-email-phil.yang@arm.com> From: Jerin Jacob Date: Thu, 23 Apr 2020 23:15:12 +0530 Message-ID: To: Phil Yang Cc: "Ananyev, Konstantin" , dpdk-dev , Thomas Monjalon , Bernard Iremonger , Vladimir Medvedkin , Honnappa Nagarahalli , Gavin Hu , "Ruifeng Wang (Arm Technology China)" , nd Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2] ipsec: optimize with c11 atomic for sa outbound sqn update 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, Apr 23, 2020 at 10:47 PM Phil Yang wrote: > > For SA outbound packets, rte_atomic64_add_return is used to generate > SQN atomically. This introduced an unnecessary full barrier by calling > the '__sync' builtin implemented rte_atomic_XX API on aarch64. This > patch optimized it with c11 atomic and eliminated the expensive barrier > for aarch64. > > Signed-off-by: Phil Yang > Reviewed-by: Ruifeng Wang > Reviewed-by: Gavin Hu > diff --git a/lib/librte_ipsec/meson.build b/lib/librte_ipsec/meson.build > index fc69970..9335f28 100644 > --- a/lib/librte_ipsec/meson.build > +++ b/lib/librte_ipsec/meson.build > @@ -6,3 +6,8 @@ sources = files('esp_inb.c', 'esp_outb.c', 'sa.c', 'ses.c', 'ipsec_sad.c') > headers = files('rte_ipsec.h', 'rte_ipsec_group.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h') > > deps += ['mbuf', 'net', 'cryptodev', 'security', 'hash'] > + > +# for clang 32-bit compiles we need libatomic for 64-bit atomic ops > +if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false > + ext_deps += cc.find_library('atomic') > +endif The following patch has been merged in master now. You don't need this anymore. commit da4eae278b56e698c64d0c39939a7a55c5b6abdd Author: Pavan Nikhilesh Date: Sun Apr 19 15:31:01 2020 +0530 build: add global libatomic dependency for 32-bit clang Add libatomic as a global dependency when compiling for 32-bit using clang. As we need libatomic for 64-bit atomic ops. Signed-off-by: Pavan Nikhilesh Acked-by: Bruce Richardson