[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3eb3bb21-eee9-44b6-b680-4c629df29d34@lunn.ch>
Date: Wed, 9 Apr 2025 14:04:37 +0200
From: Andrew Lunn <andrew@...n.ch>
To: "Ng, Boon Khai" <boon.khai.ng@...era.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-stm32@...md-mailman.stormreply.com" <linux-stm32@...md-mailman.stormreply.com>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Russell King <linux@...linux.org.uk>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
"Gerlach, Matthew" <matthew.gerlach@...era.com>,
"Ang, Tien Sung" <tien.sung.ang@...era.com>,
"Tham, Mun Yew" <mun.yew.tham@...era.com>,
"G Thomas, Rohan" <rohan.g.thomas@...era.com>
Subject: Re: [PATCH net-next v3 2/2] net: stmmac: dwxgmac2: Add support for
HW-accelerated VLAN stripping
On Wed, Apr 09, 2025 at 03:12:53AM +0000, Ng, Boon Khai wrote:
> > This appears to be identical to dwmac4_wrback_get_rx_vlan_tci() ?
> >
> > Can it be moved into the shared code, or am i missing something?
> >
> > Andrew
>
> Hi Andrew thanks for the quick response.
>
> For the dwmac4 IP it has the following format at the
> Receive Normal Descriptor 0 (RDES0)
>
> 31 0
> ------------------------------------- -----------------------------------
> RDES0 | Inner VLAN TAG [31:16] | Outer VLAN TAG [31:16 |
> ------------------------------------- -----------------------------------
>
> While for dwxgmac2 IP it has the following format at the RDES0
> Depending on the Tunneled Frame bit (TNP)
>
> For Non-Tunneled Frame (TNP=0)
> 31 0
> ------------------------------------- -----------------------------------
> RDES0 | Inner VLAN TAG [31:16 ] | Outer VLAN TAG [31:16] |
> ------------------------------------- -----------------------------------
>
> For Tunneled Frame (TNP=1)
> 31 8 7 3 2 0
> -------------------------------- ----------------------- ----------------
> RDES0 | VNID/VSID | Reserved | OL2L3 |
> -------------------------------- ----------------------- ----------------
>
> While the logic for handling Tunneled Frame and Non-Tunneled
> Frame is not yet implemented in the
> dwxgmac2_wrback_get_rx_vlan_tci() function, I believe it is
> prudent to maintain separate functions within their respective
> descriptor driver files, (dwxgmac2_descs.c and dwmac4_descs.c)
Please add a comment, or describe this in the commit message.
Andrew
Powered by blists - more mailing lists