Why do you also introduce the set action? This is a snip from port_management_set:
static int port_management_set(struct port *target, struct port *ingress, int id, struct ptp_message *req) { ... switch (id) { case TLV_MASTERONLY: mtd = (struct management_tlv_datum *) tlv->data; master_only = !!mtd->val; respond = 1; if (!!target->master_only != master_only) { if (target->bmca == BMCA_NOOP && target->transport != TRANS_UDS) { if (master_only) { target->state_machine = designated_master_fsm; } else if (clock_slave_only(target->clock)) { target->state_machine = designated_slave_fsm; } else { pr_err("Please enable at least one of masterOnly or slaveOnly when BMCA == noop.\n"); respond = 0; } } else { target->state_machine = clock_slave_only(target->clock) ? ptp_slave_fsm : ptp_fsm; } if (respond) { target->master_only = master_only; port_dispatch(target, EV_INITIALIZE, 0); } } break; ... } ciao luigi Il giorno gio 22 apr 2021 alle ore 15:06 Erez Geva <erez.geva....@siemens.com> ha scritto: > > As we support the new master only flag. > Add the master only TLV to pmc tool. > > Erez Geva (1): > Add master only management TLV > > pmc.c | 5 +++++ > pmc_common.c | 2 ++ > port.c | 6 ++++++ > tlv.h | 1 + > 4 files changed, 14 insertions(+) > > -- > 2.20.1 > > > > _______________________________________________ > Linuxptp-devel mailing list > Linuxptp-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linuxptp-devel -- Luigi 'Comio' Mantellini My Professional Profile "UNIX is very simple, it just needs a genius to understand its simplicity." [cit.] _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel