On Wed, Aug 24, 2022 at 04:32:22PM +0530, SyncMonk Technologies wrote:
> adding APTS to participate in BMCA
> 
> Passing the announce message for external source to ptp4l using virtual
> port to avoid selection of master from PTP source.
> 
> Signed-off-by: Greg Armstrong <greg.armstrong...@renesas.com>
> Signed-off-by: Leon Goldin <leon.goldin...@renesas.com>
> Signed-off-by: Vipin Sharma <vipin.sha...@syncmonk.net>
> Signed-off-by: Devasish Dey <devasish....@syncmonk.net>

> @@ -94,6 +105,11 @@ struct ts2phc_pps_source 
> *ts2phc_phc_pps_source_create(struct config *cfg,
>       }
>       s->pps_source.destroy = ts2phc_phc_pps_source_destroy;
>       s->pps_source.getppstime = ts2phc_phc_pps_source_getppstime;
> +     s->vport = ts2phc_vport_create(cfg);
> +     if (!s->vport) {
> +             free(s);
> +             return NULL;
> +     }

Why would we want to call this function and allocate the vport structure inside 
it if the
config file does not request this? Seems wasteful to me.

Regards
Maciek



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to