Devices can set this flag to ignore any incoming signaling messages which request interval change.
Signed-off-by: Vedang Patel <vedang.pa...@intel.com> --- config.c | 1 + configs/automotive-slave.cfg | 1 + configs/default.cfg | 1 + port.c | 1 + port_private.h | 2 ++ port_signaling.c | 4 ++++ ptp4l.8 | 4 ++++ 7 files changed, 14 insertions(+) diff --git a/config.c b/config.c index 232131082b2e..6775f66d94c6 100644 --- a/config.c +++ b/config.c @@ -240,6 +240,7 @@ struct config_item config_tab[] = { GLOB_ITEM_INT("gmCapable", 1, 0, 1), GLOB_ITEM_ENU("hwts_filter", HWTS_FILTER_NORMAL, hwts_filter_enu), PORT_ITEM_INT("hybrid_e2e", 0, 0, 1), + PORT_ITEM_INT("ignore_interval_update_req", 0, 0, 1), PORT_ITEM_INT("ignore_source_id", 0, 0, 1), PORT_ITEM_INT("ignore_transport_specific", 0, 0, 1), PORT_ITEM_INT("ingressLatency", 0, INT_MIN, INT_MAX), diff --git a/configs/automotive-slave.cfg b/configs/automotive-slave.cfg index 94d45b640ae5..fc8d0c909acd 100644 --- a/configs/automotive-slave.cfg +++ b/configs/automotive-slave.cfg @@ -31,3 +31,4 @@ asCapable true ignore_source_id 1 # Required to quickly correct Time Jumps in master step_threshold 1 +ignore_interval_update_req 1 diff --git a/configs/default.cfg b/configs/default.cfg index 3ee3a9b57fed..13b30de0c32a 100644 --- a/configs/default.cfg +++ b/configs/default.cfg @@ -36,6 +36,7 @@ asCapable auto BMCA ptp inhibit_announce 0 ignore_source_id 0 +ignore_interval_update_req 0 # # Run time options # diff --git a/port.c b/port.c index 015766103e05..81e340938fc9 100644 --- a/port.c +++ b/port.c @@ -1606,6 +1606,7 @@ int port_initialize(struct port *p) p->logPdelayReqInterval = p->logMinPdelayReqInterval; p->neighborPropDelayThresh = config_get_int(cfg, p->name, "neighborPropDelayThresh"); p->min_neighbor_prop_delay = config_get_int(cfg, p->name, "min_neighbor_prop_delay"); + p->ignore_interval_update_req = config_get_int(cfg, p->name, "ignore_interval_update_req"); if (config_get_int(cfg, p->name, "asCapable") == AS_CAPABLE_TRUE) { p->asCapable = ALWAYS_CAPABLE; diff --git a/port_private.h b/port_private.h index b02137847e44..2182dd3a9151 100644 --- a/port_private.h +++ b/port_private.h @@ -145,6 +145,8 @@ struct port { /* unicast service mode */ struct unicast_service *unicast_service; int inhibit_multicast_service; + /* interval update timer */ + int ignore_interval_update_req; }; #define portnum(p) (p->portIdentity.portNumber) diff --git a/port_signaling.c b/port_signaling.c index 5bfb7584b999..d18318b20510 100644 --- a/port_signaling.c +++ b/port_signaling.c @@ -86,6 +86,10 @@ static int process_interval_request(struct port *p, { struct msg_interval_req_tlv *r; + if (p->ignore_interval_update_req) { + return 0; + } + r = (struct msg_interval_req_tlv *) extra->tlv; if (r->subtype[2] != 2) { diff --git a/ptp4l.8 b/ptp4l.8 index 99b085c148c9..c3e26fbbe32f 100644 --- a/ptp4l.8 +++ b/ptp4l.8 @@ -715,6 +715,10 @@ This will disable source port identity checking for Sync and Follow_Up messages. This is useful when the announce messages are disabled in the master and the slave does not have any way to know it's identity. The default is 0 (disabled). +.TP +.B ignore_interval_update_req +Ignore all the incoming signaling requests which request a change in Sync, +Announce or Link delay intervals. The default is 0(requests are not ignored). .SH UNICAST DISCOVERY OPTIONS -- 2.7.3 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel