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

Reply via email to