port: Add inhibit_delay_req.
Add provision to disable delay requests. Designated masters who do not need to calculate pdelay can use this option. This is required by Automotive Profile to reduce network load. Signed-off-by: Vedang Patel <vedang.patel@intel.com>master
parent
3f5f5653d7
commit
450b1ed844
3
config.c
3
config.c
|
@ -244,8 +244,9 @@ struct config_item config_tab[] = {
|
||||||
PORT_ITEM_INT("ignore_transport_specific", 0, 0, 1),
|
PORT_ITEM_INT("ignore_transport_specific", 0, 0, 1),
|
||||||
PORT_ITEM_INT("ingressLatency", 0, INT_MIN, INT_MAX),
|
PORT_ITEM_INT("ingressLatency", 0, INT_MIN, INT_MAX),
|
||||||
PORT_ITEM_INT("inhibit_announce", 0, 0, 1),
|
PORT_ITEM_INT("inhibit_announce", 0, 0, 1),
|
||||||
PORT_ITEM_INT("inhibit_multicast_service", 0, 0, 1),
|
|
||||||
GLOB_ITEM_INT("initial_delay", 0, 0, INT_MAX),
|
GLOB_ITEM_INT("initial_delay", 0, 0, INT_MAX),
|
||||||
|
PORT_ITEM_INT("inhibit_delay_req", 0, 0, 1),
|
||||||
|
PORT_ITEM_INT("inhibit_multicast_service", 0, 0, 1),
|
||||||
GLOB_ITEM_INT("kernel_leap", 1, 0, 1),
|
GLOB_ITEM_INT("kernel_leap", 1, 0, 1),
|
||||||
PORT_ITEM_INT("logAnnounceInterval", 1, INT8_MIN, INT8_MAX),
|
PORT_ITEM_INT("logAnnounceInterval", 1, INT8_MIN, INT8_MAX),
|
||||||
PORT_ITEM_INT("logMinDelayReqInterval", 0, INT8_MIN, INT8_MAX),
|
PORT_ITEM_INT("logMinDelayReqInterval", 0, INT8_MIN, INT8_MAX),
|
||||||
|
|
|
@ -26,3 +26,4 @@ BMCA noop
|
||||||
masterOnly 1
|
masterOnly 1
|
||||||
inhibit_announce 1
|
inhibit_announce 1
|
||||||
asCapable true
|
asCapable true
|
||||||
|
inhibit_delay_req 1
|
||||||
|
|
|
@ -37,6 +37,7 @@ G.8275.portDS.localPriority 128
|
||||||
asCapable auto
|
asCapable auto
|
||||||
BMCA ptp
|
BMCA ptp
|
||||||
inhibit_announce 0
|
inhibit_announce 0
|
||||||
|
inhibit_pdelay_req 0
|
||||||
ignore_source_id 0
|
ignore_source_id 0
|
||||||
#
|
#
|
||||||
# Run time options
|
# Run time options
|
||||||
|
|
10
port.c
10
port.c
|
@ -1056,6 +1056,10 @@ int port_set_announce_tmo(struct port *p)
|
||||||
|
|
||||||
int port_set_delay_tmo(struct port *p)
|
int port_set_delay_tmo(struct port *p)
|
||||||
{
|
{
|
||||||
|
if (p->inhibit_delay_req) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (p->delayMechanism == DM_P2P) {
|
if (p->delayMechanism == DM_P2P) {
|
||||||
return set_tmo_log(p->fda.fd[FD_DELAY_TIMER], 1,
|
return set_tmo_log(p->fda.fd[FD_DELAY_TIMER], 1,
|
||||||
p->logPdelayReqInterval);
|
p->logPdelayReqInterval);
|
||||||
|
@ -1657,6 +1661,12 @@ int port_initialize(struct port *p)
|
||||||
p->asCapable = NOT_CAPABLE;
|
p->asCapable = NOT_CAPABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p->inhibit_delay_req = config_get_int(cfg, p->name, "inhibit_delay_req");
|
||||||
|
if (p->inhibit_delay_req && p->asCapable != ALWAYS_CAPABLE) {
|
||||||
|
pr_err("inhibit_delay_req can only be set when asCapable == 'true'.");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < N_TIMER_FDS; i++) {
|
for (i = 0; i < N_TIMER_FDS; i++) {
|
||||||
fd[i] = -1;
|
fd[i] = -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,6 +100,7 @@ struct port {
|
||||||
int bmca;
|
int bmca;
|
||||||
int inhibit_announce;
|
int inhibit_announce;
|
||||||
int ignore_source_id;
|
int ignore_source_id;
|
||||||
|
int inhibit_delay_req;
|
||||||
/* portDS */
|
/* portDS */
|
||||||
struct PortIdentity portIdentity;
|
struct PortIdentity portIdentity;
|
||||||
enum port_state state; /*portState*/
|
enum port_state state; /*portState*/
|
||||||
|
|
5
ptp4l.8
5
ptp4l.8
|
@ -186,6 +186,11 @@ the interval specified by this config option after the interval_update_timer
|
||||||
expires. It's specified as a power of two in seconds. The default value is 0 (1
|
expires. It's specified as a power of two in seconds. The default value is 0 (1
|
||||||
second).
|
second).
|
||||||
.TP
|
.TP
|
||||||
|
.B inhibit_delay_req
|
||||||
|
Don't send any delay requests. This will need the asCapable config option to be
|
||||||
|
set to 'true'. This is useful when running as a designated master who does not
|
||||||
|
need to calculate offset from slave. The default is 0 (disabled).
|
||||||
|
.TP
|
||||||
.B announceReceiptTimeout
|
.B announceReceiptTimeout
|
||||||
The number of missed Announce messages before the last Announce messages
|
The number of missed Announce messages before the last Announce messages
|
||||||
expires.
|
expires.
|
||||||
|
|
Loading…
Reference in New Issue