>On Tue, Jun 14, 2022 at 06:17:51AM -0700, Vadim Fedorenko via Linuxptp-devel
>wrote:
>> After first timeout of Announce message ptp4l will send Announce
>> requests messages to all of configured non-master clock peers
>> without updating timeout on approval packet making huge unneeded
>> workload on servers. Fix it by updating announce timeout correctly.
>
>> --- a/unicast_client.c
>> +++ b/unicast_client.c
>> @@ -467,6 +467,7 @@ void unicast_client_grant(struct port *p, struct
>> ptp_message *m,
>> ucma->granted |= 1 << mtype;
>>
>> switch (ucma->state) {
>> + case UC_HAVE_ANN:
>> case UC_WAIT:
>> if (mtype == ANNOUNCE) {
>> ucma->state = unicast_fsm(ucma->state,
>> UC_EV_GRANT_ANN);
>
>The fix looks good to me.
>
>As an alternative or follow up cleanup patch, I think the identical
>unicast_client_set_renewal() calls from the different cases could be
>moved outside of the switch. The renewal needs to be updated on any
>grant.
>
>Ideally, each message type would have its own renewal, but I guess
>there is no reason for a server to give different durations for
>different types.
Ok, cool. I will make a follow up cleanup patch for other cases, but it would
be great to have this patch merged as is.
Thank you,
Vadim
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel