From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f48.google.com (mail-pg0-f48.google.com [74.125.83.48]) by dpdk.org (Postfix) with ESMTP id 2B3A9E5D for ; Fri, 8 Sep 2017 23:51:59 +0200 (CEST) Received: by mail-pg0-f48.google.com with SMTP id t3so6836572pgt.0 for ; Fri, 08 Sep 2017 14:51:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7GlFr92pVBouxSmnndVLw8A+37mYb/eQN7IgWSabi68=; b=LAhfA+YcYNKvlXZgL5vt2cuwWGQs2q6F/eBmu/g4rpLQmwOyVC3rQfyNwyOJQ4tXwO sWCu6OymX5vfdMdbtCTnsBi8mamIH0aJK4rbCVXa7YU7cQh7EEa5kSQAazllWlvtluUl RU25krtsFEbmAEB8oLqQ+h9pQrVOgLoXNe+YJiPE7eWOceDPaHsEdZClYXNSIem67oq3 9lBOY7ZYkd5iXUixvp5YgYoOxH2Vgl+supWM21fXUS/lan+4/v6AZQMtzSDXggeB7OK1 P9xzvtzbmVs83pgVc/K/bzwVd2usTNgAyIjUVYA/1SFVG/Xkieuh9syVD79pj89nsSPj k9yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7GlFr92pVBouxSmnndVLw8A+37mYb/eQN7IgWSabi68=; b=PFqxQN5lnfXMIBwDT8GfDIlg7heX2uNGC4e7pAVWnSNBrx/AeykbJoSAk4AngNL7r4 APoqIa+VbwrwdxcWD+LQO2D4PJF4r9z/cOwdVmqsSY7EyAOpeO3pZnKRM+TV/Il4rL9N CwMgoMAlUawjQFK+aO7p9te+LaB5bglXbUqPjIKlvEp9Blbf210Ug+y4IvsUPxk2CBIK UyHSPmIbiTQaWZkah1u8mjMzbWt6M4UpPZynpX1g1HjfKsQOCqPXAZRNi1M9iApWi7yz cvh/Qju7WFStkjqP7SSHCgt1oPblaR2ngwtwJZ9xHj07idNQNNyLEMciPucn2CxDXOhF /7Gg== X-Gm-Message-State: AHPjjUjHQQSMaAcT4BOx9kkCKrqYETSS3xbHZIUWJFS13e8TwDsMs8ir jw8lqzQY2gNbyOTu X-Google-Smtp-Source: ADKCNb6UwbmwnBS1n92mufsXHnpSz7CmpICeu472BiR4+1/1SO6Hrj53ZFVaSdQLR5GO1zaLcF9Rlg== X-Received: by 10.99.112.20 with SMTP id l20mr4382435pgc.56.1504907518337; Fri, 08 Sep 2017 14:51:58 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id o78sm6004356pfj.19.2017.09.08.14.51.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Sep 2017 14:51:58 -0700 (PDT) Date: Fri, 8 Sep 2017 14:51:50 -0700 From: Stephen Hemminger To: Yuyong Zhang Cc: "users@dpdk.org" Message-ID: <20170908145150.1aad2b4e@xeon-e3> In-Reply-To: References: <20170908120814.6c515149@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-users] compile warning in dpdk lib header files "error: inlining failed in call .... call is unlikely and code size would grow" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 21:51:59 -0000 On Fri, 8 Sep 2017 19:15:51 +0000 Yuyong Zhang wrote: > Thanks Stephen for the quick response. >=20 >=20 >=20 > For performance considerations, which one is better: >=20 >=20 >=20 > 1. Use =E2=80=93Wno-error=3Dinline to turn off the warning which comp= iler will not do inline for the warned inline function >=20 > or >=20 > 2. Modify dpdk header file to add __attribute__((always_inline)) to f= orce complier to always do inline for these functions. >=20 >=20 >=20 > I assume option-2 is better for performance, any suggestions? >=20 The unlikely() branches are all error cases, there is no reason they should= impact performance. In fact excessive inline can cause code to grow and larger code causes more= instruction cache misses. Just use option 1. You obviously already changed the compile flags because= the default DPDK make files have macro WERROR which does not enable this.