Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-06 Thread Grygorii Strashko
On 05/08/2020 12:29, Kurt Kanzenbach wrote: On Wed Aug 05 2020, Russell King - ARM Linux admin wrote: On Wed, Aug 05, 2020 at 01:04:31AM +0300, Grygorii Strashko wrote: On 05/08/2020 00:44, Russell King - ARM Linux admin wrote: On Wed, Aug 05, 2020 at 12:34:47AM +0300, Grygorii Strashko wro

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-06 Thread Kurt Kanzenbach
On Wed Aug 05 2020, Grygorii Strashko wrote: > On 05/08/2020 16:57, Kurt Kanzenbach wrote: >> So, only patch 6 is to drop or 5 as well? Anyhow, I'll wait for your >> test results. Thanks! > > Patch 5 not affected as all RX packet have timestamp and it's coming > different way. > TX not affected as

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-05 Thread Kurt Kanzenbach
On Wed Aug 05 2020, Grygorii Strashko wrote: > I really do not want touch netcp, sry. > There are other internal code based on this even if there is only one hooks > in LKML now. > + my comment above. OK, I see. The use of lists makes more sense now. > > I'll try use skb_reset_mac_header(skb); >

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-05 Thread Grygorii Strashko
On 05/08/2020 16:57, Kurt Kanzenbach wrote: On Wed Aug 05 2020, Grygorii Strashko wrote: I really do not want touch netcp, sry. There are other internal code based on this even if there is only one hooks in LKML now. + my comment above. OK, I see. The use of lists makes more sense now.

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-05 Thread Richard Cochran
On Tue, Aug 04, 2020 at 11:56:12PM +0300, Grygorii Strashko wrote: > So, skb->data pints on Eth header, but skb_mac_header() return garbage. This triggers an ancient memory in my head. Now I vaguely recall that there was a reason I made different parsing routines. :( Still I think it would be g

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-05 Thread Kurt Kanzenbach
On Wed Aug 05 2020, Russell King - ARM Linux admin wrote: > On Wed, Aug 05, 2020 at 01:04:31AM +0300, Grygorii Strashko wrote: >> On 05/08/2020 00:44, Russell King - ARM Linux admin wrote: >> > On Wed, Aug 05, 2020 at 12:34:47AM +0300, Grygorii Strashko wrote: >> > > On 05/08/2020 00:07, Russell Ki

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-04 Thread Russell King - ARM Linux admin
On Wed, Aug 05, 2020 at 01:04:31AM +0300, Grygorii Strashko wrote: > On 05/08/2020 00:44, Russell King - ARM Linux admin wrote: > > On Wed, Aug 05, 2020 at 12:34:47AM +0300, Grygorii Strashko wrote: > > > On 05/08/2020 00:07, Russell King - ARM Linux admin wrote: > > > > On Tue, Aug 04, 2020 at 11:

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-04 Thread Grygorii Strashko
On 05/08/2020 00:44, Russell King - ARM Linux admin wrote: On Wed, Aug 05, 2020 at 12:34:47AM +0300, Grygorii Strashko wrote: On 05/08/2020 00:07, Russell King - ARM Linux admin wrote: On Tue, Aug 04, 2020 at 11:56:12PM +0300, Grygorii Strashko wrote: On 31/07/2020 13:06, Kurt Kanzenbach

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-04 Thread Russell King - ARM Linux admin
On Wed, Aug 05, 2020 at 12:34:47AM +0300, Grygorii Strashko wrote: > On 05/08/2020 00:07, Russell King - ARM Linux admin wrote: > > On Tue, Aug 04, 2020 at 11:56:12PM +0300, Grygorii Strashko wrote: > > > > > > > > > On 31/07/2020 13:06, Kurt Kanzenbach wrote: > > > > On Thu Jul 30 2020, Petr Mac

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-04 Thread Grygorii Strashko
On 05/08/2020 00:07, Russell King - ARM Linux admin wrote: On Tue, Aug 04, 2020 at 11:56:12PM +0300, Grygorii Strashko wrote: On 31/07/2020 13:06, Kurt Kanzenbach wrote: On Thu Jul 30 2020, Petr Machata wrote: Kurt Kanzenbach writes: @@ -107,6 +107,37 @@ unsigned int ptp_classify_raw(c

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-04 Thread Russell King - ARM Linux admin
On Tue, Aug 04, 2020 at 11:56:12PM +0300, Grygorii Strashko wrote: > > > On 31/07/2020 13:06, Kurt Kanzenbach wrote: > > On Thu Jul 30 2020, Petr Machata wrote: > > > Kurt Kanzenbach writes: > > > > > > > @@ -107,6 +107,37 @@ unsigned int ptp_classify_raw(const struct sk_buff > > > > *skb) > >

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-04 Thread Grygorii Strashko
On 31/07/2020 13:06, Kurt Kanzenbach wrote: On Thu Jul 30 2020, Petr Machata wrote: Kurt Kanzenbach writes: @@ -107,6 +107,37 @@ unsigned int ptp_classify_raw(const struct sk_buff *skb) } EXPORT_SYMBOL_GPL(ptp_classify_raw); +struct ptp_header *ptp_parse_header(struct sk_buff *skb,

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-02 Thread Florian Fainelli
On 7/30/2020 1:00 AM, Kurt Kanzenbach wrote: > Reason: A lot of the ptp drivers - which implement hardware time stamping - > need > specific fields such as the sequence id from the ptp v2 header. Currently all > drivers implement that themselves. > > Introduce a generic function to retrieve a

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-02 Thread Richard Cochran
On Thu, Jul 30, 2020 at 10:00:40AM +0200, Kurt Kanzenbach wrote: > Reason: A lot of the ptp drivers - which implement hardware time stamping - > need > specific fields such as the sequence id from the ptp v2 header. Currently all > drivers implement that themselves. > > Introduce a generic functi

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-07-31 Thread Kurt Kanzenbach
On Thu Jul 30 2020, Petr Machata wrote: > Kurt Kanzenbach writes: > >> @@ -107,6 +107,37 @@ unsigned int ptp_classify_raw(const struct sk_buff *skb) >> } >> EXPORT_SYMBOL_GPL(ptp_classify_raw); >> >> +struct ptp_header *ptp_parse_header(struct sk_buff *skb, unsigned int type) >> +{ >> +u8

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-07-30 Thread Petr Machata
Kurt Kanzenbach writes: > @@ -107,6 +107,37 @@ unsigned int ptp_classify_raw(const struct sk_buff *skb) > } > EXPORT_SYMBOL_GPL(ptp_classify_raw); > > +struct ptp_header *ptp_parse_header(struct sk_buff *skb, unsigned int type) > +{ > + u8 *data = skb_mac_header(skb); > + u8 *ptr =