Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1742190
| From | Brandon Streiff <brandon.streiff@ni.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock |
| Date | 2017-09-29 17:20 +0200 |
| Message-ID | <uv5f4-7SN-9@gated-at.bofh.it> (permalink) |
| References | <uuIVb-2ep-3@gated-at.bofh.it> <uuJ4T-2hz-43@gated-at.bofh.it> <uuKtX-3hQ-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: Thursday, September 28, 2017 12:03 PM
>
> > + bool timeout = time_is_before_jiffies(chip->last_overflow_check +
> > + MV88E6XXX_TAI_OVERFLOW_PERIOD);
> > +
> > + if (timeout) {
>
> Why do you need this timeout? Do you think the kernel will call this
> more often than required?
>
> Also, if it did call this function early, you skip the read, and
> reschedule. There is then a danger the next read is after the
> wraparound.....
That was, conceptually, a copy-paste from ixgbe_ptp.c as I was looking for how to implement the overflow accounting; that driver has a similar time_is_before_jiffies check in ixgbe_ptp_overflow_check.
Although now that I'm looking it over again, I'm also not certain of the need. Even if we're called more frequently than we expect, that doesn't seem to be harmful with regard to timekeeping. Hmm.
-- brandon
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next RFC 0/9] net: dsa: PTP timestamping for mv88e6xxx Brandon Streiff <brandon.streiff@ni.com> - 2017-09-28 17:40 +0200
[PATCH net-next RFC 4/9] net: dsa: mv88e6xxx: add support for event capture Brandon Streiff <brandon.streiff@ni.com> - 2017-09-28 17:40 +0200
[PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock Brandon Streiff <brandon.streiff@ni.com> - 2017-09-28 17:40 +0200
Re: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock Andrew Lunn <andrew@lunn.ch> - 2017-09-28 19:00 +0200
RE: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock Brandon Streiff <brandon.streiff@ni.com> - 2017-09-29 17:50 +0200
Re: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock Andrew Lunn <andrew@lunn.ch> - 2017-09-28 19:10 +0200
RE: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock Brandon Streiff <brandon.streiff@ni.com> - 2017-09-29 17:20 +0200
Re: [PATCH net-next RFC 0/9] net: dsa: PTP timestamping for mv88e6xxx Andrew Lunn <andrew@lunn.ch> - 2017-09-28 19:40 +0200
Re: [PATCH net-next RFC 0/9] net: dsa: PTP timestamping for mv88e6xxx Florian Fainelli <f.fainelli@gmail.com> - 2017-09-28 20:00 +0200
RE: [PATCH net-next RFC 0/9] net: dsa: PTP timestamping for mv88e6xxx Brandon Streiff <brandon.streiff@ni.com> - 2017-09-29 17:40 +0200
Re: [PATCH net-next RFC 0/9] net: dsa: PTP timestamping for mv88e6xxx Richard Cochran <richardcochran@gmail.com> - 2017-09-29 11:50 +0200
csiph-web