From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1D342557A; Wed, 24 Sep 2025 23:05:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758755138; cv=none; b=f8reu2CRJ37vAoupHhtRg2fmupjEV05L0HHTpNwJW8eiUW73IJxeXS+NlBz1JOisVX6GsZgToSnp4UZjcjP6gdCJ3fPlVrqMxMyWpjRNMUrlzrKZscWWa5Dm9PQz6vEY8b24bfDfHb6zl2rxJbYhRdiBlC9EQMJOXmF283xyHU0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758755138; c=relaxed/simple; bh=5nkOcXtCrUSyUylrHVFJ3GThi+rvDI6+s49nr6gVhIE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TuOHLXdVwATsPgLkMWJmSq1VhEWKj3iaLtYp4Ci/NebEQ/yPl+2hXKcvYBaa+mVrv6VqVx1EtCOiE1Z+IFWnYonh4htQLioDa+kW6Fi+2lOkg+gs54ueNrJttbR9IW4hAg5UZMdcaT3KsmNIDLWb/0tA5PJl5nVWUqzi2ga4khc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=o2B+AppW; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="o2B+AppW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ABB16C4CEE7; Wed, 24 Sep 2025 23:05:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758755137; bh=5nkOcXtCrUSyUylrHVFJ3GThi+rvDI6+s49nr6gVhIE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=o2B+AppW01bYd+MqBDecD+SP/V9GbfDTxn/PBf73IXN0zz71y/75bOrFOH1ffL15l USGG9YEhz/ZHlUOgLnforvbQS70LJIVGswy1eM+35tuLEoraYhcsC4TOMRB/nDPuP9 UADMv215SbIq3RyGg+xQmp5dQE3fV9nuKNwp0YJI2/OLnxu07gQV3lZez3r72J2WPx HSVgGio6T3k726XlmEkC3RNro04vRJDTrStw/cz/LJD4R/4yLir25W9T8CwRkGhQtw zFjHFI+2VjPlHvpJveCKeZrMfZC6ylNEHRf2mC9dv1I/l9MGMjgTl68qnLo78IAmRP QtvXZM8V6kR2g== Date: Wed, 24 Sep 2025 16:05:35 -0700 From: Jakub Kicinski To: "G Thomas, Rohan" Cc: Rohan G Thomas via B4 Relay , Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Jose Abreu , Rohan G Thomas , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Matthew Gerlach , "Ng, Boon Khai" Subject: Re: [PATCH net v2 2/2] net: stmmac: Consider Tx VLAN offload tag length for maxSDU Message-ID: <20250924160535.12c14ae9@kernel.org> In-Reply-To: References: <20250915-qbv-fixes-v2-0-ec90673bb7d4@altera.com> <20250915-qbv-fixes-v2-2-ec90673bb7d4@altera.com> <20250917154920.7925a20d@kernel.org> <20250917155412.7b2af4f1@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 24 Sep 2025 10:24:44 +0530 G Thomas, Rohan wrote: > >> Is the device adding the same VLAN tag twice if the proto is 8021AD? > >> It looks like it from the code, but how every strange.. > >> > >> In any case, it doesn't look like the driver is doing anything with > >> the NETIF_F_HW_VLAN_* flags right? stmmac_vlan_insert() works purely > >> off of vlan proto. So I think we should do the same thing here? > > > > I suppose the double tagging depends on the exact SKU but first check > > looks unnecessary. Maybe stmmac_vlan_insert() should return the number > > of vlans it decided to insert? > > > > I overlooked the behavior of stmmac_vlan_insert(). It seems the hardware > supports inserting only one VLAN tag at a time, with the default setting > being SVLAN for 802.1AD and CVLAN for 802.1Q. I'll update the patch to > simply add VLAN_HLEN when stmmac_vlan_insert() returns true. Please let > me know if you have any further concerns. SG, no further concerns. Please make sure to CC "Ng, Boon Khai" who wrote the VLAN support (IIRC).