Re: [PATCH v1 0/2] ptp: Add generic header parsing function

2020-07-25 Thread Kurt Kanzenbach
On Fri Jul 24 2020, Richard Cochran wrote: > On Fri, Jul 24, 2020 at 08:25:59AM +0200, Kurt Kanzenbach wrote: >> |static inline u8 ptp_get_msgtype(const struct ptp_header *hdr, unsigned int >> type) >> |{ >> |u8 msg; >> | >> |if (unlikely(type & PTP_CLASS_V1)) >> |/* msg type i

Re: [PATCH v1 0/2] ptp: Add generic header parsing function

2020-07-24 Thread Richard Cochran
On Fri, Jul 24, 2020 at 08:25:59AM +0200, Kurt Kanzenbach wrote: > These three drivers also deal with ptp v1 and they need access to the > message type. However, the message type is located at a different offset > depending on the ptp version. They all do: > > |if (unlikely(ptp_class & PTP_CLASS_V

Re: [PATCH v1 0/2] ptp: Add generic header parsing function

2020-07-23 Thread Kurt Kanzenbach
On Thu Jul 23 2020, Richard Cochran wrote: > Kurt, > > On Thu, Jul 23, 2020 at 09:49:44AM +0200, Kurt Kanzenbach wrote: >> in order to reduce code duplication in the ptp code of DSA drivers, move the >> header parsing function to ptp_classify. This way the Marvell and the >> hellcreek >> drivers c

Re: [PATCH v1 0/2] ptp: Add generic header parsing function

2020-07-23 Thread Richard Cochran
Kurt, On Thu, Jul 23, 2020 at 09:49:44AM +0200, Kurt Kanzenbach wrote: > in order to reduce code duplication in the ptp code of DSA drivers, move the > header parsing function to ptp_classify. This way the Marvell and the > hellcreek > drivers can share the same implementation. And probably more

[PATCH v1 0/2] ptp: Add generic header parsing function

2020-07-23 Thread Kurt Kanzenbach
Hi, in order to reduce code duplication in the ptp code of DSA drivers, move the header parsing function to ptp_classify. This way the Marvell and the hellcreek drivers can share the same implementation. And probably more drivers can benefit from it. Implemented as discussed [1] [2]. @DSA maintai