netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Vadim Fedorenko <vadfed@meta.com>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	David Ahern <dsahern@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Alexander Duyck <alexanderduyck@fb.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/5] eth: fbnic: add initial PHC support
Date: Wed, 11 Sep 2024 11:47:08 -0700	[thread overview]
Message-ID: <20240911114708.6863aed6@kernel.org> (raw)
In-Reply-To: <006042c0-e1d5-4fbc-aa7f-94a74cfbef0e@lunn.ch>

On Wed, 11 Sep 2024 18:25:11 +0200 Andrew Lunn wrote:
> > +#define FBNIC_PTP_CDC_FIFO_STATUS	0x0480c		/* 0x12030 */
> > +#define FBNIC_PTP_SPARE			0x0480d		/* 0x12034 */
> > +#define FBNIC_CSR_END_PTP		0x0480d /* CSR section delimiter */  
> 
> We know the PCS is a licensed block. Is this also licensed? Should it
> be placed in driver/ptp so others who licence the same block can
> re-uses it?

Nope, the timestamping itself happens in the MAC, obviously,
but the clock / ticker module is fairly straightforward.
IDK if there's even shared IPs for that.

> > +/* FBNIC timing & PTP implementation
> > + * Datapath uses truncated 40b timestamps for scheduling and event reporting.
> > + * We need to promote those to full 64b, hence we periodically cache the top
> > + * 32bit of the HW time counter. Since this makes our time reporting non-atomic
> > + * we leave the HW clock free running and adjust time offsets in SW as needed.
> > + * Time offset is 64bit - we need a seq counter for 32bit machines.
> > + * Time offset and the cache of top bits are independent so we don't need
> > + * a coherent snapshot of both - READ_ONCE()/WRITE_ONCE() + writer side lock
> > + * are enough.
> > + *
> > + * TBD: alias u64_stats_sync & co. with some more appropriate names upstream.  
> 
> This is upstream, so maybe now is a good time to decide?

Ha!

  reply	other threads:[~2024-09-11 18:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-11 12:45 [PATCH net-next 0/5] eth: fbnic: add timestamping support Vadim Fedorenko
2024-09-11 12:45 ` [PATCH net-next 1/5] eth: fbnic: add software TX " Vadim Fedorenko
2024-09-11 18:48   ` Jakub Kicinski
2024-09-11 12:45 ` [PATCH net-next 2/5] eth: fbnic: add initial PHC support Vadim Fedorenko
2024-09-11 16:25   ` Andrew Lunn
2024-09-11 18:47     ` Jakub Kicinski [this message]
2024-09-11 19:49     ` Vadim Fedorenko
2024-09-11 20:10       ` Jakub Kicinski
2024-09-11 20:45         ` Andrew Lunn
2024-09-11 22:25           ` Jakub Kicinski
2024-09-11 12:45 ` [PATCH net-next 3/5] eth: fbnic: add RX packets timestamping support Vadim Fedorenko
2024-09-11 12:45 ` [PATCH net-next 4/5] eth: fbnic: add TX " Vadim Fedorenko
2024-09-11 12:45 ` [PATCH net-next 5/5] eth: fbnic: add ethtool timestamping statistics Vadim Fedorenko

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=20240911114708.6863aed6@kernel.org \
    --to=kuba@kernel.org \
    --cc=alexanderduyck@fb.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vadfed@meta.com \
    --cc=vadim.fedorenko@linux.dev \
    /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).