Am 2018-07-03 07:21, schrieb Richard Cochran:
On Mon, Jun 25, 2018 at 05:06:49PM +0200, Michael Walle wrote:
Since commit 7fe69e7ba0c3bdce88d3a89d5ed43d0b382ef022 management
messages are dropped in some cases because the tlv_count isn't 1.
Further analysis shows that this is the case when the message is
forwarded in clock_forward_mgmt_msg(). This is because msg_post_recv()
will append TLVs and - in the forwarding case - there is already one TLV
in the list, which results in tlv_count being 2 and thus dropped in
subsequent code.

Why not simply delete msg.tlv_count altogether?

Coming back to this first. We could drop tlv_count and replace it with a msg_tlv_count() which iterates over the tlv_extra list. But that doesn't fix this bug, because the tlv_extra is still appended twice to the list (eg. its not that only tlv_count is incorrect).

But I guess replacing it with a function is a nice cleanup. And the computational overhead is rather small, because the lists should be small and it is only used in management paths (yet!).

-michael

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to