Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10703243rwp; Fri, 21 Jul 2023 03:44:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlHs66maS21aIDROUQwB/12PsKuEDX9CgG69aVCqQyk8wPSXHC584mPW2FVhOTR3rTLBHxTr X-Received: by 2002:a17:902:da88:b0:1b8:adc:7c3d with SMTP id j8-20020a170902da8800b001b80adc7c3dmr1747312plx.40.1689936287712; Fri, 21 Jul 2023 03:44:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689936287; cv=none; d=google.com; s=arc-20160816; b=M1colT+cJulUCl78MJs1wueMnikIRE9o9WiA5KosMyyUVGUah+6d0epvoUBHGF+j92 YeDYuPhyVOjmjNKEE7exWr4CTKOYUc90XvCkVkr12vRE50/jAV5v0+yLgi1yROq/RaNm OBCmLO21CnQs/q+upXNSqxSYfHACKmyyaUZkI3J/IXoZLm8/BTej804N9TwNJT7ozlsH SBVz5cp5IQfPTUMZQj5b0KeAqLglUqUheozhkjg/bjhI4FyHmryR7aaRyTkrPzgXSz/8 kvMptiEDeQrH11lTnbeZwypXXObsKgqD9pnpUmqmihGZK0ivYQIF+ndYqMXZ8SGmk+rZ 1MGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=CyAAVodQnRj55ezMPL98DBu/UnsuaRB0SgR+Yzv285I=; fh=su4xjCNhqJBFzhEMkXYwJ/JL+r/xVhc9sr3jAPsCqUk=; b=Mir79vK53GcFy4FMEKhLMdJ4epgXT6qAct6EBUe8D9zQ1TXMRIjLMQDIk42YpJAANW 30+hkhO2vzY5SyU8aYor1aHrOu6xsgFZR/bf16JCDZlFW8u8l62um0jFwz0kK4Fk31kS fjlm4qZDSgMy+zBBY7wBTXA4ZaqXIJBY5EsioMi3SkSmiVnNmrgZPuvnbuLx+ikuyzkZ HneYp0xSiiAic0TwNmDFdf4PfwtYeLJLJSFGVikKxGuO/rfIQZKBmPgxGsKEf3rAlRKx oqorcAtAbKIHAHQUl4iyYtt5GaCTiWDsG4PXwqqB9OZ7sh3YxdzOI2PNQdrJ7rp4Wnmn Mu6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K7zk8MwQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n15-20020a170902f60f00b001b3eeaad177si2928457plg.99.2023.07.21.03.44.35; Fri, 21 Jul 2023 03:44:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K7zk8MwQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231210AbjGUKLk (ORCPT + 99 others); Fri, 21 Jul 2023 06:11:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231405AbjGUKLi (ORCPT ); Fri, 21 Jul 2023 06:11:38 -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 8E23B2727 for ; Fri, 21 Jul 2023 03:11:36 -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 AF57A61059 for ; Fri, 21 Jul 2023 10:11:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4389C433C8; Fri, 21 Jul 2023 10:11:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689934295; bh=k8eV/3qHdnbYgcZI2X9fFCwH8gqs3YzalZZPqB9YJ08=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=K7zk8MwQYLqclUypLaTrXMCzvlgETP5wEUWYH0H/6hRQCVlJ2XF8oY1b2h0EY0uRn qGH6fUjQz9xO3zkx9Ef4VLHWU8jiD9CtFogqDBwrTdIrA2rlAiF7t0sLqGfWMBJ06N sd+tv+6e6gLU0xZZ7K+kl5RSz3I8Gk1mR36ZRrVUKpER3jHGaJu7uPgtzFJqSbRt9u 24aHlOVN+bmSPukO3e79iQUiANVgAdvct/SgdK88yqoVHlphiDOJJjTpODhfz6Z/6e 4MoV3J7h8ISpE3hwy0qAl4T2Dm+rguLoiTFK/keQqTv5crxgOCzcqv7SwLKYj6E/vA jd/LUNYKARcLQ== Message-ID: Date: Fri, 21 Jul 2023 12:11:25 +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: Boon@ecsmtp.png.intel.com, Khai@ecsmtp.png.intel.com, "Ng , 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: Boon Khai Ng , Shevchenko Andriy , Mun Yew Tham , Leong Ching Swee , G Thomas Rohan , Shevchenko Andriy References: <20230721062617.9810-1-boon.khai.ng@intel.com> <20230721062617.9810-3-boon.khai.ng@intel.com> From: Krzysztof Kozlowski In-Reply-To: <20230721062617.9810-3-boon.khai.ng@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/07/2023 08:26, Boon@ecsmtp.png.intel.com wrote: > From: Boon Khai Ng > > Currently, VLAN tag stripping is done by software driver in > stmmac_rx_vlan(). This patch is to Add support for VLAN tag > stripping by the MAC hardware and MAC drivers to support it. > This is done by adding rx_hw_vlan() and set_hw_vlan_mode() > callbacks at stmmac_ops struct which are called from upper > software layer. ... > if (priv->dma_cap.vlhash) { > ndev->features |= NETIF_F_HW_VLAN_CTAG_FILTER; > ndev->features |= NETIF_F_HW_VLAN_STAG_FILTER; > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > index 23d53ea04b24..bd7f3326a44c 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > @@ -543,6 +543,12 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac) > plat->flags |= STMMAC_FLAG_TSO_EN; > } > > + /* 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. Best regards, Krzysztof