[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <edfa1585-c10c-4211-a985-ebfcb8e671d5@redhat.com>
Date: Thu, 24 Apr 2025 13:53:39 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Boon Khai Ng <boon.khai.ng@...era.com>, netdev@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
"David S . Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
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>, Furong Xu <0x1207@...il.com>,
Matthew Gerlach <matthew.gerlach@...era.com>,
Tien Sung Ang <tien.sung.ang@...era.com>,
Mun Yew Tham <mun.yew.tham@...era.com>,
G Thomas Rohan <rohan.g.thomas@...era.com>
Subject: Re: [PATCH net-next v4 2/2] net: stmmac: dwxgmac2: Add support for
HW-accelerated VLAN stripping
On 4/21/25 6:29 PM, Boon Khai Ng wrote:
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c
> index 389aad7b5c1e..55921c88efd0 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c
> @@ -4,6 +4,7 @@
> * stmmac XGMAC support.
> */
>
> +#include <linux/bitfield.h>
> #include <linux/stmmac.h>
> #include "common.h"
> #include "dwxgmac2.h"
> @@ -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);
> +}
> +
> +static inline bool dwxgmac2_wrback_get_rx_vlan_valid(struct dma_desc *p)
Please, avoid 'inline' function in .c files, especially for functions
that will land into function pointer like this one.
Thanks,
Paolo
Powered by blists - more mailing lists