[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <292391c2-e59c-7c53-6bdd-164d9f3fd867@ti.com>
Date: Wed, 5 Aug 2020 22:15:04 +0300
From: Grygorii Strashko <grygorii.strashko@...com>
To: Kurt Kanzenbach <kurt@...utronix.de>,
Russell King - ARM Linux admin <linux@...linux.org.uk>
CC: Petr Machata <petrm@...lanox.com>,
Richard Cochran <richardcochran@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jiri Pirko <jiri@...lanox.com>,
Ido Schimmel <idosch@...lanox.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>,
Samuel Zou <zou_wei@...wei.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function
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.
>
>>
>> I'll try use skb_reset_mac_header(skb);
>> As spectrum does:
>> skb_reset_mac_header(skb);
>> mlxsw_sp1_ptp_got_packet(mlxsw_sp, skb, local_port, true);
>>
>> if doesn't help PATCH 6 is to drop.
>
> 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 skb come to .xmit() properly initialized.
As I've just replied for patch 6 - skb_reset_mac_header() helps.
Rhetorical question - is below check really required?
Bad packets (short, crc) expected to be discarded by HW
/* Ensure that the entire header is present in this packet. */
if (ptr + sizeof(struct ptp_header) > skb->data + skb->len)
return NULL;
And I'd like to ask you to update ptp_parse_header() documentation
with description of expected SKB state for this function to work.
--
Best regards,
grygorii
Powered by blists - more mailing lists