From: Simon Horman <horms@kernel.org>
To: Boon Khai Ng <boon.khai.ng@altera.com>
Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Russell King <linux@armlinux.org.uk>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
Furong Xu <0x1207@gmail.com>,
Matthew Gerlach <matthew.gerlach@altera.com>,
Tien Sung Ang <tien.sung.ang@altera.com>,
Mun Yew Tham <mun.yew.tham@altera.com>,
G Thomas Rohan <rohan.g.thomas@altera.com>
Subject: Re: [PATCH net-next v4 2/2] net: stmmac: dwxgmac2: Add support for HW-accelerated VLAN stripping
Date: Thu, 24 Apr 2025 13:17:21 +0100 [thread overview]
Message-ID: <20250424121721.GF3042781@horms.kernel.org> (raw)
In-Reply-To: <20250421162930.10237-3-boon.khai.ng@altera.com>
On Tue, Apr 22, 2025 at 12:29:30AM +0800, Boon Khai Ng wrote:
> This patch adds support for MAC level VLAN tag stripping for the
> dwxgmac2 IP. This feature can be configured through ethtool.
> If the rx-vlan-offload is off, then the VLAN tag will be stripped
> by the driver. If the rx-vlan-offload is on then the VLAN tag
> will be stripped by the MAC.
>
> Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com>
> Reviewed-by: Matthew Gerlach <matthew.gerlach@altera.com>
...
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c
...
> @@ -69,6 +70,21 @@ static int dwxgmac2_get_tx_ls(struct dma_desc *p)
> return (le32_to_cpu(p->des3) & XGMAC_RDES3_LD) > 0;
> }
>
> +static u16 dwxgmac2_wrback_get_rx_vlan_tci(struct dma_desc *p)
> +{
> + return (le32_to_cpu(p->des0) & XGMAC_RDES0_VLAN_TAG_MASK);
nit: The outer parentheses are not needed on the line above.
return le32_to_cpu(p->des0) & XGMAC_RDES0_VLAN_TAG_MASK;
> +}
...
next prev parent reply other threads:[~2025-04-24 12:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-21 16:29 [PATCH net-next v4 0/2] Refactoring designware VLAN code Boon Khai Ng
2025-04-21 16:29 ` [PATCH net-next v4 1/2] net: stmmac: Refactor VLAN implementation Boon Khai Ng
2025-04-24 12:04 ` Paolo Abeni
2025-04-24 12:32 ` Russell King (Oracle)
2025-04-25 7:12 ` Ng, Boon Khai
2025-04-25 7:08 ` Ng, Boon Khai
2025-04-24 12:16 ` Simon Horman
2025-04-28 8:34 ` Ng, Boon Khai
2025-04-21 16:29 ` [PATCH net-next v4 2/2] net: stmmac: dwxgmac2: Add support for HW-accelerated VLAN stripping Boon Khai Ng
2025-04-24 11:53 ` Paolo Abeni
2025-04-25 7:09 ` Ng, Boon Khai
2025-04-24 12:17 ` Simon Horman [this message]
2025-04-25 7:15 ` Ng, Boon Khai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250424121721.GF3042781@horms.kernel.org \
--to=horms@kernel.org \
--cc=0x1207@gmail.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=boon.khai.ng@altera.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux@armlinux.org.uk \
--cc=matthew.gerlach@altera.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mun.yew.tham@altera.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rohan.g.thomas@altera.com \
--cc=tien.sung.ang@altera.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).