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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 776C9C3DA6E for ; Mon, 8 Jan 2024 14:23:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID: In-Reply-To:Subject:cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6KUIxrrpqufkm2WjQug2SmEZYuEDL0x+PVZiT+s6Wos=; b=2s4v6ye/IrOsbZ mt0dp3ta+/H2LjinidGrJ8Bkf2coqZo8f6cvJRLadGy0mdE8F2j3/BLWM3VfBB+lxB2IczkpKKdM1 KOB2DquftTrI7B1xPU88Fh+UqdpQRu+5n+by5bmpLjvpCImuAkWYxiRpO4Hq6erwGtnwTMPtN+Ifk 4wWTTt2tfCEA2OHmWRHQDk6fdiHPqIziRjHJZ6xFwLaQ1uJATGoDcooHa0xBFzsp1XesOoUZkcMDg Jfa4cYq+GDI1y5ngr1UEd9ditws9NkW4BIrIxEnqNPOBLax7QnULaRbAJ3DMrO/fzG/Ns4oTceHZw qmWz+KcZFTKh+aSAu2QQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rMqXI-005Lak-0I; Mon, 08 Jan 2024 14:23:28 +0000 Received: from relay8-d.mail.gandi.net ([217.70.183.201]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rMqXE-005LYl-1m for linux-arm-kernel@lists.infradead.org; Mon, 08 Jan 2024 14:23:26 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 96F241BF20B; Mon, 8 Jan 2024 14:23:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1704723798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8/7gyP7Ro6EIbSwHo4bXO7Wl4exbJDbw0YZeICc6ouA=; b=icnrmGyALvII03k+3GInGbojmaxtepRoQ7+GtXT2w0spXvKR1ks6erFkOAI2x9pIX0BBsc MJcD5ANmD/A92ILssF2Da2xZ3qNH8sHiZ28QKKl8Kp8c4BPpaRUagJZtHuDNWMgnVAGDnq hJO3W1ZMAJDbgqABnXKC0prKgPjmlcM+tlVXS2aYXWhl1HGZqKNgqDyyxABbjrYfebXu2X lq0L96omGzIS6TEXJTBrR+ETUHeUwhT94HYhhVSMyopDtf1aDp1t5HuBBACmaIoWIYTNn7 fifQ+OACszEyUZ8XKo4P6W3Fs+rzBjyaVpXgx/CT18/mxUNwgMmUmc1z1Y4XEg== Date: Mon, 8 Jan 2024 15:23:38 +0100 (CET) From: Romain Gantois To: Vladimir Oltean cc: Romain Gantois , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Miquel Raynal , Maxime Chevallier , Sylvain Girard , Pascal EBERHARD , Richard Tresidder , Linus Walleij , Florian Fainelli , Andrew Lunn , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org Subject: Re: [PATCH net v3 1/1] net: stmmac: Prevent DSA tags from breaking C In-Reply-To: <20240108130238.j2denbdj3ifasbqi@skbuf> Message-ID: <3c2f6555-53b6-be1c-3d7b-7a6dc95b46fe@bootlin.com> References: <20240108130238.j2denbdj3ifasbqi@skbuf> MIME-Version: 1.0 X-GND-Sasl: romain.gantois@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240108_062324_725459_321F0270 X-CRM114-Status: GOOD ( 12.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 8 Jan 2024, Vladimir Oltean wrote: ... > Nitpick: you could render this in kernel-doc format. > https://docs.kernel.org/doc-guide/kernel-doc.html > > > +static inline bool stmmac_has_ip_ethertype(struct sk_buff *skb) > > Nitpick: in netdev it is preferred not to use the "inline" keyword at > all in C files, only "static inline" in headers, and to let the compiler > decide by itself when it is appropriate to inline the code (which it > does by itself even without the "inline" keyword). For a bit more > background why, you can view Documentation/process/4.Coding.rst, section > "Inline functions". I see, the kernel docs were indeed enlightening on this point. As a side note, I've just benchmarked both the "with-inline" and "without-inline" versions. First of all, objdump seems to confirm that GCC does indeed follow this pragma in this particular case. Also, RX perfs are better with stmmac_has_ip_ethertype inlined, but TX perfs are actually consistently worse with this function inlined, which could very well be caused by cache effects. In any case, I think it is better to remove the "inline" pragma as you said. I'll do that in v4. Best Regards, -- Romain Gantois, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel