[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230627151222.bn3vboqjutkqzxjs@skbuf>
Date: Tue, 27 Jun 2023 18:12:22 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Claudiu Manoil <claudiu.manoil@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
UNGLinuxDriver@...rochip.com,
Xiaoliang Yang <xiaoliang.yang_1@....com>,
Richard Cochran <richardcochran@...il.com>,
Antoine Tenart <atenart@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 3/3] net: dsa: felix: don't drop PTP frames with
tag_8021q when RX timestamping is disabled
On Mon, Jun 26, 2023 at 06:40:03PM +0300, Vladimir Oltean wrote:
> drivers/net/dsa/ocelot/felix.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
> index 80861ac090ae..7b494d975073 100644
> --- a/drivers/net/dsa/ocelot/felix.c
> +++ b/drivers/net/dsa/ocelot/felix.c
> @@ -1725,6 +1725,9 @@ static bool felix_rxtstamp(struct dsa_switch *ds, int port,
> u32 tstamp_hi;
> u64 tstamp;
>
> + if (ocelot->ports[port]->ptp_rx_filter == HWTSTAMP_FILTER_NONE)
> + return false;
> +
> /* If the "no XTR IRQ" workaround is in use, tell DSA to defer this skb
> * for RX timestamping. Then free it, and poll for its copy through
> * MMIO in the CPU port module, and inject that into the stack from
> --
> 2.34.1
>
>
This is still not as good as I had wanted it, because simply checking
for HWTSTAMP_FILTER_NONE does not distinguish between L2 and L4
timestamping filters, and a port configured just with L2 traps will
still drop L4 PTP packets.
Preparing a v2.
Powered by blists - more mailing lists