Article View: linux.kernel.netdev
Article #20040Re: [PATCH net-next] net: stmmac: xgmac: Report the VLAN tag type from the descriptor
From: Jakub Kicinski
Date: Sat, 21 Nov 2026 00:46
Date: Sat, 21 Nov 2026 00:46
24 lines
9186 bytes
9186 bytes
On Wed, 18 Nov 2026 17:21:34 +0100 Maxime Chevallier wrote:
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
> @@ -209,8 +209,12 @@ static void vlan_rx_hw(struct mac_device_info *hw,
> {
> if (hw->desc->get_rx_vlan_valid(rx_desc)) {
> u16 vid = hw->desc->get_rx_vlan_tci(rx_desc);
> + u16 proto = ETH_P_8021Q;
>
> - __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
> + if (hw->desc->get_rx_vlan_proto)
> + proto = hw->desc->get_rx_vlan_proto(rx_desc);
> +
> + __vlan_hwaccel_put_tag(skb, htons(proto), vid);
Heh, this function now does 3 indirect calls to get the info about
the stripped vlan. Isn't this slower than disabling the offload and
stripping in SW at this point? Maybe the low-end CPUs are very
different :) Or there's something else I'm missing?
(not really expecting you to do any digging, to be clear, just found
the level of complexity in SW to support a trivial HW offload kinda
funny)
Technical Details
Message-ID:
<20261120164601.07f932cd@kernel.org>Path:
mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368230-linux-kernel-netdev=dewy.ruReferences:
<20261118162136.2782405-1-maxime.chevallier@bootlin.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368230-linux-kernel-netdev=dewy.ru From: kuba@kernel.org (Jakub Kicinski) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next] net: stmmac: xgmac: Report the VLAN tag type from the descriptor Date: Fri, 20 Nov 2026 16:46:01 -0800 Organization: Usenet Network Message-ID: <20261120164601.07f932cd@kernel.org> References: <20261118162136.2782405-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="3303191"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:1ViwlQbVyUUoaTXz44txai6ePHo= sha256:QsGPbBiKzIxAMPehvS+V5VNsfFbSZoBIxnUfhYmnhvI= sha1:h10fEt5ISER2ETWhgJI1tJeQRRQ= sha256:CpuNpKjNsK4+bs97FB1Fa4L1Y4fx/hdmJyh+0ZOFFRw= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 39AB6115AF2; Sat, 21 Nov 2026 03:46:35 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rfJjkfmJv3BD; Sat, 21 Nov 2026 03:46:27 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-368230-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 41EF1115A68; Sat, 21 Nov 2026 03:46:17 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 5857B3D008; Sat, 21 Nov 2026 00:46:10 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795221969; b=eBW6QG6n7DvHThCCQz7/nyYACtoIniFHhUFa54t3kkodp60IqA645xJjby5tYwCqpKhD L9uVxaL++A4SRwQkeeihr1QqhtBjE0nOwuS2oYuIJsUyMLIkI29d7X1B1NHkVozPQOs0J o31ieOovPzg5pz0VXuj36LLMYVgR9fSCjMy7Cxd4r20Q9n/vx0Z/cH1GeE4nUt+/7Qf91 s/s1UJBcbE/fPBNjykhA5mI0AWtDKebN5D+ynjTv80H2xmULy8+SxuiNH6gvRoRJV/6/T oA+17styAuwH59LIY07voyF8Hq4q5rQ4+Kv7oXd1NssyTksKGNfbAiAxc5SWBuJgAew== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795221969; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:In-Reply-To:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=zVV1u4mdfEa+71QVfExLmY3W/TNv8r1nhMoxrEj/45c=; b=ejHmX1trIkqC2mcvclftGv1yTXnGBnEPw13c0VMUtg+93WUx6FK6j7vQOwkQpAWBTErn IbjKX7lNIArG5/RuklzhS1UqBCv6l314ClDSqjE122XpEFUKZfncoUJ5De4C8scw+7JcW SwW1VSyhhGBMXjBGrltBt+xXrGU1Xb4JG0AvxmlTAC0VSxGYnW9t6VIE1zTFqIAmyGMCK OFD2T1ATnY2GjG06ajGCdRfXJZrOf7+HdLyitT968nc4eRKd6u7gG1jB4KswZm+bOvi96 kfz71CeaDQs2KYWK7oA9YQ1FHyZYBISIwwudVZxMygiRN+6ipVc5q+tX7yFpAqBDDNg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=C0ixMRsY; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E638606A6BB; Sat, 21 Nov 2026 00:46:09 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=C0ixMRsY X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795221963; b=U8tUzIm9gqAqhAYbBOXnZwlTi+haPHzmHkLKW4WOI+VKCZ0l7vZSZ5rJ1V94fcZLHAH8 /k17AFsvwIwwwuAyxpzDJM6kr3LhEkadMrrAexNobe/LNIwgLNje/maFpDdu4P11+fJEI itt2nG2/iifTN4QvlDvNV6jVcffjZBoGLsfHblmO2+C0kP/hmMS+m8U12W36zPipeBrbM 4RHzOCoIifAH99x33yBPWrchMMZMpyAaleFsl55CFcS2upZ82DGYkLTIcmZpqs+Ots5vW zF4/vyYUgwRpcZ/Lh60DcbcRFBN+rdSaRe8MDjkOanC9HItlzG1af2PP3x2dg03vAmQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795221963; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=zVV1u4mdfEa+71QVfExLmY3W/TNv8r1nhMoxrEj/45c=; b=35vsRls8P1FDdDehGG1Leq063nC1rAkS5Vbo/zuuKrDgD41BTZ5x0X10YzFyv8wIDnOJ l99htTSMW6csFRWlWSm5CoON+8l0JtyVcgPmGx1TYQnpI/rnTKAwtqiWc+4ptoIoi085d OQsAbeN958cVvQpi90DWB94vMwxYCuXBqkpzwrGqdHNihynjuF89l40vH8gvtf81lAW2v ru/hiz715pEF+Z/p8IMfFsUai/fshLCqR+xewP4MWQnfGj3qQqi2SOkVtJ47udiZ++9rO 7E74w3Q3opeeNRu5S+l64SBuNDWolWdh4cpCb6nPyvxlRQE144+7NFbaaSzPd+iPBHA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=C0ixMRsY; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF84D606A6BE; Sat, 21 Nov 2026 00:46:02 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47BB21F000CA; Sat, 21 Nov 2026 00:46:02 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795221962; bh=zVV1u4mdfEa+71QVfExLmY3W/TNv8r1nhMoxrEj/45c=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=C0ixMRsYmnQsvPxUOAJUL4CWc1ZORHAvtzr/1U69M+NLovwI/CFQQmDX7n0kM1keU 4AuWYXo432kd1UVvyoSaoELIWovQhrPuKAaKLEdkdTWlUlR/rmSDWC/WtysIlZlaMo a7HYIoitwMoissaeVXVkgRZ8acd7Syl5+r6Q5gTbBYSqRxH+wlpKZIVrFA+PSUXnhd 9I2Dg+Ucl56KR4vNBkuIapcJ7TSdeJnNFvAdLu5oTiXvBakHaCLZhBt9cWNN0LfD24 25vGglILK5tuHoz4Lzpy07VzdQP4Xad1HgBUx5NI5VXGIm0+3PFm/taQgHNsWb0ole bLbkOO+a/fzDQ== X-Cc: Andrew Lunn <andrew+netdev@lunn.ch>, davem@davemloft.net, Eric Dumazet <edumazet@google.com>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Russell King <linux@armlinux.org.uk>, Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>, Nicolai Buchwitz <nb@tipi-net.de>, Ovidiu Panait <ovidiu.panait.rb@renesas.com>, Joseph Steel <recv.jo@gmail.com>, Muhammad Nazim Amirul Nazle Asmade <muhammad.nazim.amirul.nazle.asmade@altera.com>, thomas.petazzoni@bootlin.com, Alexis Lothorรฉ <alexis.lothore@bootlin.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-In-Reply-To: <20261118162136.2782405-1-maxime.chevallier@bootlin.com> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list