Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	UNGLinuxDriver@microchip.com,
	Xiaoliang Yang <xiaoliang.yang_1@nxp.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Antoine Tenart <atenart@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 3/3] net: dsa: felix: don't drop PTP frames with tag_8021q when RX timestamping is disabled
Date: Tue, 27 Jun 2023 18:12:22 +0300	[thread overview]
Message-ID: <20230627151222.bn3vboqjutkqzxjs@skbuf> (raw)
In-Reply-To: <20230626154003.3153076-4-vladimir.oltean@nxp.com>

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.

  reply	other threads:[~2023-06-27 15:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-26 15:40 [PATCH net 0/3] Fix PTP packet drops with ocelot-8021q DSA tag protocol Vladimir Oltean
2023-06-26 15:40 ` [PATCH net 1/3] net: mscc: ocelot: don't report that RX timestamping is enabled by default Vladimir Oltean
2023-06-26 15:40 ` [PATCH net 2/3] net: mscc: ocelot: don't keep PTP configuration of all ports in single structure Vladimir Oltean
2023-06-26 15:40 ` [PATCH net 3/3] net: dsa: felix: don't drop PTP frames with tag_8021q when RX timestamping is disabled Vladimir Oltean
2023-06-27 15:12   ` Vladimir Oltean [this message]
2023-06-27 15:46     ` Jakub Kicinski
2023-06-27 15:51       ` Vladimir Oltean
2023-06-27 15:53         ` Jakub Kicinski
2023-06-27 15:57           ` Vladimir Oltean

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=20230627151222.bn3vboqjutkqzxjs@skbuf \
    --to=olteanv@gmail.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=atenart@kernel.org \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=xiaoliang.yang_1@nxp.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