Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7467649ybi; Wed, 5 Jun 2019 18:44:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRUCg6kHhyjKOThTuVIRa5YLDh6SligJIMsfpc/+ou+sr0VnroTIwkEsnkZv/frP0xd5/a X-Received: by 2002:a17:902:2ba9:: with SMTP id l38mr41289834plb.300.1559785484371; Wed, 05 Jun 2019 18:44:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559785484; cv=none; d=google.com; s=arc-20160816; b=UxISSXwB97dbDnFRK3JqFKfIpL+hB8g+jTbRulL9kcxYFqh4NssNlNm/LlQQbVKnv0 f0+uk+tJef9uBRJSPtJ4ZB5jkBEGhlds0z6hIMvdLNWn8U+u7WaWGK21CDDXPI7A4xjG e3+bSrPIvhmgYXMoRH/SitwSgAJLQyR4qHflNuUdcNBQ1Om0Eb50JOmhOEicYzifNPv2 E1HscY/jrc6T3WT3+p3JhotbwTLTvfpYN+yUv38DaM5NCr5SR6eM0TdIjhEP5zu8zJKw hWxi8EjxrDPbl7KbenRuinMTXjF4P+E2p4F77E4/EDVGwiv4tSGFnMBySs64YsxJev7Z ikFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=k0uWZoB9YONIvUNtIyXoSDvJVRivj4BJ3XZq594/szE=; b=y5PICRDp0NJdPrhB1dkpLeyc37ZmDm39AAUjtNXu70Fg1LBIKx14pQuSYGn/L5INBE XZYdE8eKxAffhcZztWX8CGwcHU46APdm8ZycKyyTUYOFPCONAKGNroZksCtMUwYv39w5 oOIJlLoeSKCeLzqjryXDFVQYkmnLRwTjy5Ba6SweLyqYAhdXX2RGPZIXG0dJAuGMyS5b myYu8b+rTXfUYAOFIhk8NPPJNvCAVjEPHCJp2eehaw35gKOenCW9A9rr6v1IPOZaBFot dE/h2wP9EKLWmbDkZ/Thr0HruXdbT5l/Fmc7NriXCgJX5+e6sZOe7xIETjFTlY25tpEv Az9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x13si389681pjq.98.2019.06.05.18.44.27; Wed, 05 Jun 2019 18:44:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726691AbfFFBnJ (ORCPT + 99 others); Wed, 5 Jun 2019 21:43:09 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:18089 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726561AbfFFBnJ (ORCPT ); Wed, 5 Jun 2019 21:43:09 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 620AAF014900085AD60D; Thu, 6 Jun 2019 09:43:07 +0800 (CST) Received: from [127.0.0.1] (10.177.19.180) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Thu, 6 Jun 2019 09:43:05 +0800 Subject: Re: [PATCH net-next] net: Drop unlikely before IS_ERR(_OR_NULL) To: Jesse Brandeburg CC: , "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , Vlad Yasevich , Neil Horman , Marcelo Ricardo Leitner , , , "Enrico Weigelt, metux IT consult" References: <20190605142428.84784-1-wangkefeng.wang@huawei.com> <20190605142428.84784-3-wangkefeng.wang@huawei.com> <20190605091319.000054e9@intel.com> From: Kefeng Wang Message-ID: <721a48ce-c09a-a35e-86ae-eac5eec26668@huawei.com> Date: Thu, 6 Jun 2019 09:39:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <20190605091319.000054e9@intel.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.177.19.180] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/6/6 0:13, Jesse Brandeburg wrote: > 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? +Enrico Weigelt There is no different in assembly output (only check the x86/arm64), and the Enrico Weigelt have finished a cocci script to do this cleanup. > > 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. :-) > > > . >