Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp536502rdb; Tue, 5 Dec 2023 12:08:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFAtu/fCw+SIoJrCxgZ3/aPYz1VXt2jnbsa6X7ESTwd2TcK9aeT7yxnlnizDlNsrpvGSC0+ X-Received: by 2002:a05:6a20:9795:b0:18f:97c:ba12 with SMTP id hx21-20020a056a20979500b0018f097cba12mr3660673pzc.108.1701806930152; Tue, 05 Dec 2023 12:08:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701806930; cv=none; d=google.com; s=arc-20160816; b=wxI9DHyCuE7dsOhGxrgjseNolIG0/mb1lcZHHF5zIZSoQQMuJUdxbMkb/e/MHzFZ72 lCHt75eivEuGIFR44VGFn/6sByFzydzcYig+SwhdBHNgcLNLU7Ui33MazekTSFrIn10w G4URNip9Ni5KznlDhzQm0uI78H56ZLgBY32QYrTisD/FqG++m2x1PbVCZ9G8nmddVSoe aXPKFdh/zb+ftoPY8jm9g5l1BmKO+Ke0/5h7pf5FWcrQgDrmEzPtNnOAzYe6P5bGgNsf QiQf+aGTEd/KtP5eS0odo3vI3LgKXqc0Uv2iBcjGjjSZVQimwMGI91YAxxUsFuQ5erkE HT2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=bSrsxMtqGFne/rd9wakrOSxYSu6JhQYC9mQGxjxNaLs=; fh=ynaqbgsJYrCYlVSQQTAr7qd1CHeaorTM5heafnUHBfg=; b=ONaXhWsSrmgoZQf4rnE/kD3Bhq+fNYK4vd5+7WSi/8uX97SeXxW7d1xpuPsX1g0+pe yU/LwYjfQ8zBbDhXxGms3h9Icb7VD71hACdUHvb1F7d0M8itPlWriydnGiyAp4Z/45yD 8M3UdYisN1p/3bOmRTBR4FnpsoUO9FS3GMXT9Po4wA0jMt6mQ4BF6cV1p47Lh9UsU9lC t+9n6wKztIwHJ2cMDIpKi3MEi2vdLpgUNXwKdXkEJUl4GAi0UNsaoEXjDsMGBaGLA++n RzJ372b0MAp6h5InTD1jRMXaSdh5pgG3k0qDmF3EIrHjc22Wh+x5ON1X2+rnNHoY+TW9 iDcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="Nkej/qX5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id c7-20020a656747000000b005bdf5961d87si10174311pgu.266.2023.12.05.12.08.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:08:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="Nkej/qX5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 3349C80AE228; Tue, 5 Dec 2023 12:08:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345648AbjLEUIY (ORCPT + 99 others); Tue, 5 Dec 2023 15:08:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229710AbjLEUIX (ORCPT ); Tue, 5 Dec 2023 15:08:23 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48D1E183 for ; Tue, 5 Dec 2023 12:08:27 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-54744e66d27so2334a12.0 for ; Tue, 05 Dec 2023 12:08:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701806906; x=1702411706; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bSrsxMtqGFne/rd9wakrOSxYSu6JhQYC9mQGxjxNaLs=; b=Nkej/qX5KPlULdY17d8saOt9nG58vBfKivU5+ekIFTPEr6Mr82mUOjFL9a0FETH1dv agMOMzvDhH4bOsf1vZjHBPNa5okI0KCyr841RRUZL7HJF3w/0daKxzr3ZL9d60IKas1N 3f1Ftz0fvIxw8sqYMD9d3GScY+uEdoseI5WxaeFo26jlkr3hxW/cQCDz+nscQM8XlVE3 UYNz7f++a/UjTLpsT6PQS+caTiQ0S8B0aHMk/cPMucBB8WXSX7sXNExMjTsi6Tdiv3DF V8qhfifY3UZVvRPm0fvUVFx0S4uKCKf2VoqNtAhCdVKPgiCOBMd9fQDPZIdsONoVOEVK KlRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701806906; x=1702411706; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bSrsxMtqGFne/rd9wakrOSxYSu6JhQYC9mQGxjxNaLs=; b=boUFxUDvZZ2qkf20ai/XY3dlk5jjLu8BeGuwocvlCvJLGxqSSbPSIV15Rn7dMiJXyy SRhezLbI0Db7Dt9mL9eMPP6hmFb/r+M+iVysCHVOR1imPKH47R/k8q3FljW9KOoipN9l 1sIi8cMy0PDQfRbEJdV8B3NAJ8Ft2099e652TmMpgaJstkdRkaiN0Uf0fxudQGiLaYRM Fn4aBnoFb1UyM7L/HAH7BFfBPTWF9KUWmHMeBKexfJwqDO7hxdEhwVnTclImwH6F1n1l dzl/r3Zf/TtyQuur2bod2vCrUPHtzgJFnhsVN007+81E1KLVgcuPMUL5oATgdI0BU+8o 9Tjg== X-Gm-Message-State: AOJu0YztNM2Sxav6xBbyZzwzILuE0uaswhEMe6LqCL88PDBZhpeuKsd8 BbOhYgdKwtCBB77cpc2CzxYiY34yd4vKs/F94pw12Q== X-Received: by 2002:a50:f61b:0:b0:54c:794b:875b with SMTP id c27-20020a50f61b000000b0054c794b875bmr13467edn.1.1701806905505; Tue, 05 Dec 2023 12:08:25 -0800 (PST) MIME-Version: 1.0 References: <20231205190951.67-1-yx.0xffff@gmail.com> In-Reply-To: <20231205190951.67-1-yx.0xffff@gmail.com> From: Eric Dumazet Date: Tue, 5 Dec 2023 21:08:12 +0100 Message-ID: Subject: Re: [PATCH] net: remove ___neigh_lookup_noref(). To: YangXin Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 05 Dec 2023 12:08:47 -0800 (PST) On Tue, Dec 5, 2023 at 8:10=E2=80=AFPM YangXin wrote: > > key_eq() and hash() are functions of struct neigh_table, so we just need = to call tbl->key_eq() and tbl->hash(), instead of passing them in as parame= ters. > > And if those two parameters were removed, ___neigh_lookup_noref() would = be pointless, so I replaced ___neigh_lookup_noref() with __neigh_lookup_nor= ef(). > > Signed-off-by: YangXin > --- > Last time I comitted this patch, Mr Dumazet said "this might defeat inlin= ing.". > So I compiled kernel on my computer with defconfig, made sure that this p= atch would not lead __neigh_lookup_noref() fail to inline. Not sure how you checked, but I found the opposite. This patch adds additional indirect function calls, with additional RETPOLINE costs. Look at ip_neigh_gw4() disassembly before/after your patch.