From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F41AAC28CC5 for ; Wed, 5 Jun 2019 16:13:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C68A72075C for ; Wed, 5 Jun 2019 16:13:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728673AbfFEQNV (ORCPT ); Wed, 5 Jun 2019 12:13:21 -0400 Received: from mga18.intel.com ([134.134.136.126]:52241 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728421AbfFEQNV (ORCPT ); Wed, 5 Jun 2019 12:13:21 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jun 2019 09:13:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,550,1549958400"; d="scan'208";a="181987363" Received: from unknown (HELO localhost) ([10.241.225.31]) by fmsmga002.fm.intel.com with ESMTP; 05 Jun 2019 09:13:20 -0700 Date: Wed, 5 Jun 2019 09:13:19 -0700 From: Jesse Brandeburg To: Kefeng Wang Cc: , "David S. Miller" , Alexey Kuznetsov , "Hideaki YOSHIFUJI" , Vlad Yasevich , Neil Horman , Marcelo Ricardo Leitner , , , jesse.brandeburg@intel.com Subject: Re: [PATCH net-next] net: Drop unlikely before IS_ERR(_OR_NULL) Message-ID: <20190605091319.000054e9@intel.com> In-Reply-To: <20190605142428.84784-3-wangkefeng.wang@huawei.com> References: <20190605142428.84784-1-wangkefeng.wang@huawei.com> <20190605142428.84784-3-wangkefeng.wang@huawei.com> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.30; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 5 Jun 2019 22:24:26 +0800 Kefeng wrote: > IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag, > so no need to do that again from its callers. Drop it. > > segs = __skb_gso_segment(skb, features, false); > - if (unlikely(IS_ERR_OR_NULL(segs))) { > + if (IS_ERR_OR_NULL(segs)) { > int segs_nr = skb_shinfo(skb)->gso_segs; > The change itself seems reasonable, but did you check to see if the paths changed are faster/slower with your fix? Did you look at any assembly output to see if the compiler actually generated different code? Is there a set of similar changes somewhere else in the kernel we can refer to? I'm not sure in the end that the change is worth it, so would like you to prove it is, unless davem overrides me. :-)