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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D85FBEB64DC for ; Fri, 21 Jul 2023 16:27:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233006AbjGUQ1b (ORCPT ); Fri, 21 Jul 2023 12:27:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232938AbjGUQ1K (ORCPT ); Fri, 21 Jul 2023 12:27:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C216165AD for ; Fri, 21 Jul 2023 09:24:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 52DC361CC1 for ; Fri, 21 Jul 2023 16:22:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17C49C433C7; Fri, 21 Jul 2023 16:22:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689956578; bh=Ew/4v1UbqQoZb20JkMzVmOCzBgdeH1pynDMmIlPkrEM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=eQZfFq4H2O53duuZx0xDupi2JgSJ+w6qoYQwPDqw0N9WeaLxg0UDAhgWguoUy+HeH 6kR3WQuNy1RtWqPJcV9+jAlF+QSl/ZdNN2rjEDzw56/aMxO8u6jQ2G9sjT+Vo/Abco JS3TF41A4nHUJbhiKGBM971t50MOf37nEgb19kUNbMSEVuPicvcQ7dV1e6Uf2LWInW q5SyIEgjyzCdBJQtwtPR5afInW7MJXZcSFQ4TlQ21fSQfmNLRAB/z0pxkDr/xPwbWT PFG7vztmFl/tr2eI7+N13atfihHYhofUnv81z5uu9IKb+5+rtlRsiaUpbYqKXHE6rN U/bKoy49yJHOg== Message-ID: <68485bf5-0550-4954-cbaa-7f6a5443e4aa@kernel.org> Date: Fri, 21 Jul 2023 18:22:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [Enable Designware XGMAC VLAN Stripping Feature 2/2] net: stmmac: dwxgmac2: Add support for HW-accelerated VLAN Stripping Content-Language: en-US To: Florian Fainelli , "Ng, Boon Khai" , "Boon@ecsmtp.png.intel.com" , "Khai@ecsmtp.png.intel.com" , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , "netdev@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Cc: "Shevchenko, Andriy" , "Tham, Mun Yew" , "Swee, Leong Ching" , "G Thomas, Rohan" , Shevchenko Andriy References: <20230721062617.9810-1-boon.khai.ng@intel.com> <20230721062617.9810-3-boon.khai.ng@intel.com> <7549a014-4f5e-cf87-f07d-c4980ab44dc1@gmail.com> From: Krzysztof Kozlowski In-Reply-To: <7549a014-4f5e-cf87-f07d-c4980ab44dc1@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/07/2023 17:59, Florian Fainelli wrote: >>>> + /* Rx VLAN HW Stripping */ >>>> + if (of_property_read_bool(np, "snps,rx-vlan-offload")) { >>>> + dev_info(&pdev->dev, "RX VLAN HW Stripping\n"); >>> >>> Why? Drop. >>> >> >> This is an dts option export to dts for user to choose whether or not they >> Want a Hardware stripping or a software stripping. >> >> May I know what is the reason to drop this? > > Because the networking stack already exposes knobs for drivers to > advertise and control VLAN stripping/insertion on RX/TX using ethtool > and feature bits (NETIF_F_HW_VLAN_CTAG_RX, NETIF_F_HW_VLAN_CTAG_TX). > > What you are doing here is encode a policy as a Device Tree property > rather than describe whether the hardware supports a given feature and > this is frowned upon. That's even better reason... Best regards, Krzysztof